diff --git a/README.md b/README.md index c830306..1c6c277 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,12 @@ Work is in progress... --- ## Version history +### 0.9.428 +- fixed freezing after SD scanning during playback +- AsyncWebSocket queue increased to 128 +- fixed VU meter overlapping the clock on displays +- fixed Guru Meditation error when loading in SD mode with SD card removed + ### 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) diff --git a/yoRadio/src/AsyncWebServer/AsyncEventSource.h b/yoRadio/src/AsyncWebServer/AsyncEventSource.h index 4f5139a..5572528 100644 --- a/yoRadio/src/AsyncWebServer/AsyncEventSource.h +++ b/yoRadio/src/AsyncWebServer/AsyncEventSource.h @@ -19,11 +19,13 @@ */ #ifndef ASYNCEVENTSOURCE_H_ #define ASYNCEVENTSOURCE_H_ - +#include "../core/options.h" #include #ifdef ESP32 #include "AsyncTCP.h" -#define SSE_MAX_QUEUED_MESSAGES 32 +#ifndef SSE_MAX_QUEUED_MESSAGES + #define SSE_MAX_QUEUED_MESSAGES 32 +#endif #else #include #define SSE_MAX_QUEUED_MESSAGES 8 diff --git a/yoRadio/src/AsyncWebServer/AsyncWebSocket.h b/yoRadio/src/AsyncWebServer/AsyncWebSocket.h index d40641a..05dc53f 100644 --- a/yoRadio/src/AsyncWebServer/AsyncWebSocket.h +++ b/yoRadio/src/AsyncWebServer/AsyncWebSocket.h @@ -20,11 +20,13 @@ */ #ifndef ASYNCWEBSOCKET_H_ #define ASYNCWEBSOCKET_H_ - +#include "../core/options.h" #include #ifdef ESP32 #include "AsyncTCP.h" -#define WS_MAX_QUEUED_MESSAGES 32 +#ifndef WS_MAX_QUEUED_MESSAGES + #define WS_MAX_QUEUED_MESSAGES 128 //32 +#endif #else #include #define WS_MAX_QUEUED_MESSAGES 8 diff --git a/yoRadio/src/core/config.cpp b/yoRadio/src/core/config.cpp index 1a5862e..e1b2033 100644 --- a/yoRadio/src/core/config.cpp +++ b/yoRadio/src/core/config.cpp @@ -114,6 +114,7 @@ void Config::_setupVersion(){ #ifdef USE_SD void Config::changeMode(int newmode){ + bool pir = player.isRunning(); if(SDC_CS==255) return; if(getMode()==PM_SDCARD) { sdResumePos = player.getFilePos(); @@ -140,6 +141,7 @@ void Config::changeMode(int newmode){ saveValue(&store.play_mode, store.play_mode, true, true); _SDplaylistFS = getMode()==PM_SDCARD?&sdman:(true?&SPIFFS:_SDplaylistFS); if(getMode()==PM_SDCARD){ + if(pir) player.sendCommand({PR_STOP, 0}); display.putRequest(NEWMODE, SDCHANGE); while(display.mode()!=SDCHANGE) delay(10); @@ -149,8 +151,9 @@ void Config::changeMode(int newmode){ if(network.status==SDREADY) ESP.restart(); sdman.stop(); } + if(!_bootDone) return; initPlaylistMode(); - if (store.smartstart == 1) player.sendCommand({PR_PLAY, getMode()==PM_WEB?store.lastStation:store.lastSdStation}); + if (pir) player.sendCommand({PR_PLAY, getMode()==PM_WEB?store.lastStation:store.lastSdStation}); netserver.resetQueue(); netserver.requestOnChange(GETPLAYERMODE, 0); netserver.requestOnChange(GETMODE, 0); diff --git a/yoRadio/src/core/display.cpp b/yoRadio/src/core/display.cpp index 0b87fed..b8d7d80 100644 --- a/yoRadio/src/core/display.cpp +++ b/yoRadio/src/core/display.cpp @@ -268,7 +268,10 @@ void Display::_swichMode(displayMode_e newmode) { _mode = newmode; dsp.setScrollId(NULL); if (newmode == PLAYER) { - _clock.moveBack(); + if(player.isRunning()) + _clock.moveTo(clockMove); + else + _clock.moveBack(); #ifdef DSP_LCD dsp.clearDsp(); #endif diff --git a/yoRadio/src/core/options.h b/yoRadio/src/core/options.h index 875bb39..bf2a78a 100644 --- a/yoRadio/src/core/options.h +++ b/yoRadio/src/core/options.h @@ -1,7 +1,7 @@ #ifndef options_h #define options_h -#define YOVERSION "0.9.420" +#define YOVERSION "0.9.428" /******************************************************* DO NOT EDIT THIS FILE. diff --git a/yoRadio/src/core/sdmanager.cpp b/yoRadio/src/core/sdmanager.cpp index 1b70abd..fd8cf1d 100644 --- a/yoRadio/src/core/sdmanager.cpp +++ b/yoRadio/src/core/sdmanager.cpp @@ -3,6 +3,7 @@ #define USE_SD #include "sdmanager.h" #include "display.h" +#include "player.h" #if defined(SD_SPIPINS) || SD_HSPI SPIClass SDSPI(HOOPSENb); @@ -12,7 +13,7 @@ SPIClass SDSPI(HOOPSENb); #endif #ifndef SDSPISPEED - #define SDSPISPEED 4000000 + #define SDSPISPEED 20000000 #endif SDManager sdman(FSImplPtr(new VFSImpl())); @@ -75,6 +76,7 @@ void SDManager::listSD(File &plSDfile, File &plSDindex, const char* dirname, uin char* filePath; while (true) { vTaskDelay(2); + player.loop(); bool isDir; String fileName = root.getNextFileName(&isDir); if (fileName.isEmpty()) break;