Skip to content

Commit e823f97

Browse files
committed
v0.9.280
1 parent 3662c2d commit e823f97

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,11 @@ Work is in progress...
229229

230230
---
231231
## Version history
232+
#### v0.9.280
233+
- fixed an issue where it was impossible to reconnect when the WiFi connection was lost
234+
232235
#### v0.9.273
233-
- fixed an "Guru Meditation Error" when playing streams with installed the ESP32 v2.0.10 and higher core installed
236+
- fixed an "Guru Meditation Error" when playing streams with the ESP32 v2.0.10 and higher core installed
234237

235238
#### v0.9.260
236239
- fixed date display bug for ILI9488/ILI9486 displays

yoRadio/src/core/network.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,24 @@ void Network::WiFiReconnected(WiFiEvent_t event, WiFiEventInfo_t info){
6868
player.lockOutput = false;
6969
delay(100);
7070
display.putRequest(NEWMODE, PLAYER);
71-
if (network.lostPlaying) player.sendCommand({PR_PLAY, config.store.lastStation});
71+
if (network.lostPlaying) {
72+
config.setTitle(const_PlConnect);
73+
player.sendCommand({PR_PLAY, config.store.lastStation});
74+
}
7275
#ifdef MQTT_ROOT_TOPIC
7376
connectToMqtt();
7477
#endif
7578
}
7679

7780
void Network::WiFiLostConnection(WiFiEvent_t event, WiFiEventInfo_t info){
7881
if(!network.beginReconnect){
79-
Serial.println("Lost connection, reconnecting...");
82+
Serial.printf("Lost connection, reconnecting to %s...\n", config.ssids[config.store.lastSSID-1].ssid);
8083
network.lostPlaying = player.isRunning();
8184
if (network.lostPlaying) { player.lockOutput = true; player.sendCommand({PR_STOP, 0}); }
8285
display.putRequest(NEWMODE, LOST);
8386
}
8487
network.beginReconnect = true;
85-
WiFi.begin(config.ssids[config.store.lastSSID].ssid, config.ssids[config.store.lastSSID].password);
88+
WiFi.begin(config.ssids[config.store.lastSSID-1].ssid, config.ssids[config.store.lastSSID-1].password);
8689
}
8790

8891
#define DBGAP false
@@ -133,7 +136,7 @@ void Network::begin() {
133136
if(LED_BUILTIN!=255) digitalWrite(LED_BUILTIN, LOW);
134137
status = CONNECTED;
135138
WiFi.setSleep(false);
136-
WiFi.onEvent(WiFiReconnected, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_CONNECTED);
139+
WiFi.onEvent(WiFiReconnected, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_GOT_IP);
137140
WiFi.onEvent(WiFiLostConnection, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_DISCONNECTED);
138141
weatherBuf=NULL;
139142
trueWeather = false;

yoRadio/src/core/options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef options_h
22
#define options_h
33

4-
#define YOVERSION "0.9.273"
4+
#define YOVERSION "0.9.280"
55

66
/*******************************************************
77
DO NOT EDIT THIS FILE.

0 commit comments

Comments
 (0)