diff --git a/README.md b/README.md index b03c765..21df003 100644 --- a/README.md +++ b/README.md @@ -226,6 +226,9 @@ Work is in progress... --- ## Version history +#### v0.9.142 +- fixed a bug with smartstart playback when the power is turned off + #### v0.9.141 - fixed error reconnecting to WiFi when connection is lost - ADDED a compilation error when choosing a board other than "ESP32 Dev Module" or "ESP32 Wrover Module" diff --git a/yoRadio/src/core/network.cpp b/yoRadio/src/core/network.cpp index ff43f6f..61abdc7 100644 --- a/yoRadio/src/core/network.cpp +++ b/yoRadio/src/core/network.cpp @@ -52,6 +52,7 @@ void ticks() { void Network::WiFiReconnected(WiFiEvent_t event, WiFiEventInfo_t info){ network.beginReconnect = false; + player.lockOutput = false; delay(100); display.putRequest(NEWMODE, PLAYER); if (network.lostPlaying) player.sendCommand({PR_PLAY, config.store.lastStation}); @@ -64,7 +65,7 @@ void Network::WiFiLostConnection(WiFiEvent_t event, WiFiEventInfo_t info){ if(!network.beginReconnect){ Serial.println("Lost connection, reconnecting..."); network.lostPlaying = player.isRunning(); - if (network.lostPlaying) { player.sendCommand({PR_STOP, 0}); } + if (network.lostPlaying) { player.lockOutput = true; player.sendCommand({PR_STOP, 0}); } display.putRequest(NEWMODE, LOST); } network.beginReconnect = true; diff --git a/yoRadio/src/core/options.h b/yoRadio/src/core/options.h index 2484ec4..1a2da0b 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.141" +#define YOVERSION "0.9.142" /******************************************************* DO NOT EDIT THIS FILE. diff --git a/yoRadio/src/core/player.cpp b/yoRadio/src/core/player.cpp index f774139..94d14b1 100644 --- a/yoRadio/src/core/player.cpp +++ b/yoRadio/src/core/player.cpp @@ -102,7 +102,7 @@ void Player::_stop(bool alreadyStopped){ display.putRequest(PSTOP); setDefaults(); if(!alreadyStopped) stopSong(); - stopInfo(); + if(!lockOutput) stopInfo(); if (player_on_stop_play) player_on_stop_play(); }