v0.9.420
This commit is contained in:
10
README.md
10
README.md
@@ -234,6 +234,16 @@ Work is in progress...
|
|||||||
|
|
||||||
---
|
---
|
||||||
## Version history
|
## Version history
|
||||||
|
### 0.9.420
|
||||||
|
**!!! a [full update](#update-over-web-interface) with Sketch data upload is required. After updating please press CTRL+F5 in browser !!!**
|
||||||
|
- added screensaver mode during playback, configurable via the web interface, pull request[#129](https://github.com/e2002/yoradio/pull/129)
|
||||||
|
- added blank screen mode to screensaver, configurable via the web interface, pull request[#129](https://github.com/e2002/yoradio/pull/129)
|
||||||
|
Thanks to @trip5 for the amazing code!
|
||||||
|
- speeding up indexing of SD cards (advice - don't put all files in one folder)
|
||||||
|
- i don't remember (honestly) why the AsyncTCP server worked on the same core with the player, now it works on the same core with the display
|
||||||
|
`#define CONFIG_ASYNC_TCP_RUNNING_CORE 0`
|
||||||
|
- bug fixes
|
||||||
|
|
||||||
### v0.9.412
|
### v0.9.412
|
||||||
**!!! a [full update](#update-over-web-interface) with Sketch data upload is required. After updating please press CTRL+F5 in browser !!!**
|
**!!! a [full update](#update-over-web-interface) with Sketch data upload is required. After updating please press CTRL+F5 in browser !!!**
|
||||||
- added mDNS support, configurable via the web interface, pull[#125](https://github.com/e2002/yoradio/pull/125)
|
- added mDNS support, configurable via the web interface, pull[#125](https://github.com/e2002/yoradio/pull/125)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ extern "C" {
|
|||||||
|
|
||||||
//If core is not defined, then we are running in Arduino or PIO
|
//If core is not defined, then we are running in Arduino or PIO
|
||||||
#ifndef CONFIG_ASYNC_TCP_RUNNING_CORE
|
#ifndef CONFIG_ASYNC_TCP_RUNNING_CORE
|
||||||
#define CONFIG_ASYNC_TCP_RUNNING_CORE 1 //any available core (-1)
|
#define CONFIG_ASYNC_TCP_RUNNING_CORE 0 //any available core (-1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_ASYNC_TCP_USE_WDT
|
#ifndef CONFIG_ASYNC_TCP_USE_WDT
|
||||||
@@ -43,7 +43,7 @@ extern "C" {
|
|||||||
#define XTASK_MEM_SIZE 6144 // 8192 / 2
|
#define XTASK_MEM_SIZE 6144 // 8192 / 2
|
||||||
#endif
|
#endif
|
||||||
#ifndef XTASK_PRIOTITY
|
#ifndef XTASK_PRIOTITY
|
||||||
#define XTASK_PRIOTITY 3 //3
|
#define XTASK_PRIOTITY 5 //3
|
||||||
#endif
|
#endif
|
||||||
#ifndef ATCP_TASK_DELAY
|
#ifndef ATCP_TASK_DELAY
|
||||||
#define ATCP_TASK_DELAY 2
|
#define ATCP_TASK_DELAY 2
|
||||||
|
|||||||
@@ -534,8 +534,14 @@ void Display::_time(bool redraw) {
|
|||||||
config.setBrightness();
|
config.setBrightness();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if(config.isScreensaver && network.timeinfo.tm_sec % 60 == 0)
|
if(config.isScreensaver && network.timeinfo.tm_sec % 60 == 0){
|
||||||
_clock.moveTo({clockConf.left, static_cast<uint16_t>(random(TFT_FRAMEWDT+clockConf.textsize, (dsp.height()-dsp.plItemHeight-TFT_FRAMEWDT*2))), 0});
|
#ifdef GXCLOCKFONT
|
||||||
|
uint16_t ft=static_cast<uint16_t>(random(TFT_FRAMEWDT, (dsp.height()-dsp.plItemHeight-TFT_FRAMEWDT*2-clockConf.textsize)));
|
||||||
|
#else
|
||||||
|
uint16_t ft=static_cast<uint16_t>(random(TFT_FRAMEWDT+clockConf.textsize, (dsp.height()-dsp.plItemHeight-TFT_FRAMEWDT*2)));
|
||||||
|
#endif
|
||||||
|
_clock.moveTo({clockConf.left, ft, 0});
|
||||||
|
}
|
||||||
_clock.draw();
|
_clock.draw();
|
||||||
/*#ifdef USE_NEXTION
|
/*#ifdef USE_NEXTION
|
||||||
nextion.printClock(network.timeinfo);
|
nextion.printClock(network.timeinfo);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef options_h
|
#ifndef options_h
|
||||||
#define options_h
|
#define options_h
|
||||||
|
|
||||||
#define YOVERSION "0.9.412"
|
#define YOVERSION "0.9.420"
|
||||||
|
|
||||||
/*******************************************************
|
/*******************************************************
|
||||||
DO NOT EDIT THIS FILE.
|
DO NOT EDIT THIS FILE.
|
||||||
|
|||||||
@@ -60,41 +60,50 @@ bool SDManager::_endsWith (const char* base, const char* str) {
|
|||||||
return (strncmp(p, str, slen) == 0);
|
return (strncmp(p, str, slen) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDManager::listSD(File &plSDfile, File &plSDindex, const char * dirname, uint8_t levels){
|
void SDManager::listSD(File &plSDfile, File &plSDindex, const char* dirname, uint8_t levels) {
|
||||||
File root = sdman.open(dirname);
|
File root = sdman.open(dirname);
|
||||||
if(!root){
|
if (!root) {
|
||||||
Serial.println("##[ERROR]#\tFailed to open directory");
|
Serial.println("##[ERROR]#\tFailed to open directory");
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
if(!root.isDirectory()){
|
|
||||||
Serial.println("##[ERROR]#\tNot a directory");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
File file = root.openNextFile();
|
|
||||||
uint32_t pos = 0;
|
|
||||||
while(file){
|
|
||||||
vTaskDelay(2);
|
|
||||||
bool fid = file.isDirectory();
|
|
||||||
const char * fp = file.path();
|
|
||||||
const char * fn = file.name();
|
|
||||||
if(fid){
|
|
||||||
if(levels && !_checkNoMedia(fp)){
|
|
||||||
listSD(plSDfile, plSDindex, fp, levels -1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(_endsWith(strlwr((char*)fn), ".mp3") || _endsWith(fn, ".m4a") || _endsWith(fn, ".aac") || _endsWith(fn, ".wav") || _endsWith(fn, ".flac")){
|
|
||||||
pos = plSDfile.position();
|
|
||||||
plSDfile.print(fn); plSDfile.print("\t"); plSDfile.print(fp); plSDfile.print("\t"); plSDfile.println(0);
|
|
||||||
plSDindex.write((uint8_t *) &pos, 4);
|
|
||||||
Serial.print(".");
|
|
||||||
if(display.mode()==SDCHANGE) display.putRequest(SDFILEINDEX, _sdFCount+1);
|
|
||||||
_sdFCount++;
|
|
||||||
if(_sdFCount%64==0) Serial.println();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(file) file.close(); file = root.openNextFile();
|
if (!root.isDirectory()) {
|
||||||
}
|
Serial.println("##[ERROR]#\tNot a directory");
|
||||||
if(root) root.close();
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t pos = 0;
|
||||||
|
char* filePath;
|
||||||
|
while (true) {
|
||||||
|
vTaskDelay(2);
|
||||||
|
bool isDir;
|
||||||
|
String fileName = root.getNextFileName(&isDir);
|
||||||
|
if (fileName.isEmpty()) break;
|
||||||
|
filePath = (char*)malloc(fileName.length() + 1);
|
||||||
|
if (filePath == NULL) {
|
||||||
|
Serial.println("Memory allocation failed");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
strcpy(filePath, fileName.c_str());
|
||||||
|
const char* fn = strrchr(filePath, '/') + 1;
|
||||||
|
if (isDir) {
|
||||||
|
if (levels && !_checkNoMedia(filePath)) {
|
||||||
|
listSD(plSDfile, plSDindex, filePath, levels - 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (_endsWith(strlwr((char*)fn), ".mp3") || _endsWith(fn, ".m4a") || _endsWith(fn, ".aac") ||
|
||||||
|
_endsWith(fn, ".wav") || _endsWith(fn, ".flac")) {
|
||||||
|
pos = plSDfile.position();
|
||||||
|
plSDfile.printf("%s\t%s\t0\n", fn, filePath);
|
||||||
|
plSDindex.write((uint8_t*)&pos, 4);
|
||||||
|
Serial.print(".");
|
||||||
|
if(display.mode()==SDCHANGE) display.putRequest(SDFILEINDEX, _sdFCount+1);
|
||||||
|
_sdFCount++;
|
||||||
|
if (_sdFCount % 64 == 0) Serial.println();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(filePath);
|
||||||
|
}
|
||||||
|
root.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDManager::indexSDPlaylist() {
|
void SDManager::indexSDPlaylist() {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ void DspCore::drawPlaylist(uint16_t currentItem) {
|
|||||||
clear();
|
clear();
|
||||||
config.fillPlMenu(currentItem - plCurrentPos, plTtemsCount);
|
config.fillPlMenu(currentItem - plCurrentPos, plTtemsCount);
|
||||||
setCursor(0,1);
|
setCursor(0,1);
|
||||||
write(byte(126));
|
write(uint8_t(126));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DspCore::clearDsp(bool black) {
|
void DspCore::clearDsp(bool black) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#define CHARHEIGHT 8
|
#define CHARHEIGHT 8
|
||||||
|
|
||||||
#define DSP_OLED
|
#define DSP_OLED
|
||||||
|
#define GXCLOCKFONT
|
||||||
|
|
||||||
typedef GFXcanvas1 Canvas;
|
typedef GFXcanvas1 Canvas;
|
||||||
#include "widgets/widgets.h"
|
#include "widgets/widgets.h"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#define CHARHEIGHT 8
|
#define CHARHEIGHT 8
|
||||||
|
|
||||||
#define DSP_OLED
|
#define DSP_OLED
|
||||||
|
#define GXCLOCKFONT
|
||||||
|
|
||||||
typedef GFXcanvas1 Canvas;
|
typedef GFXcanvas1 Canvas;
|
||||||
#include "widgets/widgets.h"
|
#include "widgets/widgets.h"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#define CHARHEIGHT 8
|
#define CHARHEIGHT 8
|
||||||
|
|
||||||
#define DSP_OLED
|
#define DSP_OLED
|
||||||
|
#define GXCLOCKFONT
|
||||||
|
|
||||||
typedef GFXcanvas1 Canvas;
|
typedef GFXcanvas1 Canvas;
|
||||||
#include "widgets/widgets.h"
|
#include "widgets/widgets.h"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#define CHARHEIGHT 8
|
#define CHARHEIGHT 8
|
||||||
|
|
||||||
#define DSP_OLED
|
#define DSP_OLED
|
||||||
|
#define GXCLOCKFONT
|
||||||
|
|
||||||
typedef GFXcanvas1 Canvas;
|
typedef GFXcanvas1 Canvas;
|
||||||
#include "widgets/widgets.h"
|
#include "widgets/widgets.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user