diff --git a/README.md b/README.md index 1c6c277..7b67165 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,14 @@ Work is in progress... --- ## Version history +### 0.9.434 +- fixed the issue with exiting Screensaver Blank Screen mode via button presses and IR commands. +- reduced the minimum frequency for tone control on I2S modules to 80Hz. +- increased the display update task delay to 10 TICKS. + to revert to the previous setting, add `#define DSP_TASK_DELAY 2` to `myoptions.h`. +- when ENCODER2 is connected, the UP and DOWN buttons now work as PREV and NEXT (single click). +- implemented backlight off in Screensaver Blank Screen mode. + ### 0.9.428 - fixed freezing after SD scanning during playback - AsyncWebSocket queue increased to 128 diff --git a/yoRadio/src/audioI2S/Audio.cpp b/yoRadio/src/audioI2S/Audio.cpp index 42dbebd..8e82bfe 100644 --- a/yoRadio/src/audioI2S/Audio.cpp +++ b/yoRadio/src/audioI2S/Audio.cpp @@ -4733,7 +4733,7 @@ void Audio::IIR_calculateCoefficients(int8_t G0, int8_t G1, int8_t G2){ // Infi if(G2 < -40) G2 = -40; if(G2 > 6) G2 = 6; - const float FcLS = 500; // Frequency LowShelf[Hz] + const float FcLS = 80; // Frequency LowShelf[Hz] //500 const float FcPKEQ = 3000; // Frequency PeakEQ[Hz] const float FcHS = 6000; // Frequency HighShelf[Hz] diff --git a/yoRadio/src/core/config.cpp b/yoRadio/src/core/config.cpp index e1b2033..0f1cfdc 100644 --- a/yoRadio/src/core/config.cpp +++ b/yoRadio/src/core/config.cpp @@ -727,9 +727,11 @@ void Config::setBrightness(bool dosave){ #endif } -void Config::setDspOn(bool dspon){ - store.dspon = dspon; - saveValue(&store.dspon, store.dspon, true, true); +void Config::setDspOn(bool dspon, bool saveval){ + if(saveval){ + store.dspon = dspon; + saveValue(&store.dspon, store.dspon, true, true); + } #ifdef USE_NEXTION if(!dspon) nextion.sleep(); else nextion.wake(); diff --git a/yoRadio/src/core/config.h b/yoRadio/src/core/config.h index d9e1787..74bf37c 100644 --- a/yoRadio/src/core/config.h +++ b/yoRadio/src/core/config.h @@ -233,7 +233,7 @@ class Config { void setTimezoneOffset(uint16_t tzo); uint16_t getTimezoneOffset(); void setBrightness(bool dosave=false); - void setDspOn(bool dspon); + void setDspOn(bool dspon, bool saveval = true); void sleepForAfter(uint16_t sleepfor, uint16_t sleepafter=0); void bootInfo(); void doSleepW(); diff --git a/yoRadio/src/core/controls.cpp b/yoRadio/src/core/controls.cpp index 5c00c73..fb82302 100644 --- a/yoRadio/src/core/controls.cpp +++ b/yoRadio/src/core/controls.cpp @@ -256,7 +256,7 @@ void irLoop() { if(config.ircodes.irVals[target][j]==irResults.value){ if (network.status != CONNECTED && network.status!=SDREADY && target!=IR_AST) return; if(target!=IR_AST && display.mode()==LOST) return; - if (display.mode() == SCREENSAVER) { + if (display.mode() == SCREENSAVER || display.mode() == SCREENBLANK) { display.putRequest(NEWMODE, PLAYER); return; } @@ -491,7 +491,7 @@ void onBtnClick(int id) { if (display.mode() == PLAYER) { player.toggle(); } - if (display.mode() == SCREENSAVER) { + if (display.mode() == SCREENSAVER || display.mode() == SCREENBLANK) { display.putRequest(NEWMODE, PLAYER); #ifdef DSP_LCD delay(200); @@ -525,7 +525,7 @@ void onBtnClick(int id) { } } else { if (display.mode() == PLAYER) { - if(config.store.skipPlaylistUpDown){ + if(config.store.skipPlaylistUpDown || ENC2_BTNL!=255){ if (id == EVT_BTNUP) { player.prev(); } else { @@ -552,7 +552,7 @@ void onBtnClick(int id) { } void onBtnDoubleClick(int id) { - if (display.mode() == SCREENSAVER) { + if (display.mode() == SCREENSAVER || display.mode() == SCREENBLANK) { display.putRequest(NEWMODE, PLAYER); return; } diff --git a/yoRadio/src/core/display.cpp b/yoRadio/src/core/display.cpp index b8d7d80..bba7421 100644 --- a/yoRadio/src/core/display.cpp +++ b/yoRadio/src/core/display.cpp @@ -26,7 +26,7 @@ Page *pages[] = { new Page(), new Page(), new Page(), new Page() }; #define CORE_STACK_SIZE 1024*3 #endif #ifndef DSP_TASK_DELAY - #define DSP_TASK_DELAY 2 + #define DSP_TASK_DELAY pdMS_TO_TICKS(10) #endif #if !((DSP_MODEL==DSP_ST7735 && DTYPE==INITR_BLACKTAB) || DSP_MODEL==DSP_ST7789 || DSP_MODEL==DSP_ST7796 || DSP_MODEL==DSP_ILI9488 || DSP_MODEL==DSP_ILI9486 || DSP_MODEL==DSP_ILI9341 || DSP_MODEL==DSP_ILI9225) #undef BITRATE_FULL @@ -285,12 +285,16 @@ void Display::_swichMode(displayMode_e newmode) { _nums.setText(""); config.isScreensaver = false; _pager.setPage( pages[PG_PLAYER]); + config.setDspOn(config.store.dspon, false); pm.on_display_player(); } if (newmode == SCREENSAVER || newmode == SCREENBLANK) { config.isScreensaver = true; _pager.setPage( pages[PG_SCREENSAVER]); - if (newmode == SCREENBLANK) dsp.clearClock(); + if (newmode == SCREENBLANK) { + dsp.clearClock(); + config.setDspOn(false, false); + } }else{ config.screensaverTicks=SCREENSAVERSTARTUPDELAY; config.screensaverPlayingTicks=SCREENSAVERSTARTUPDELAY; diff --git a/yoRadio/src/core/options.h b/yoRadio/src/core/options.h index bf2a78a..4a909df 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.428" +#define YOVERSION "0.9.434" /******************************************************* DO NOT EDIT THIS FILE.