Browse Source

WiFi: allow button action to also disable softAP (#1942)

master
Max Prokhorov 5 years ago
committed by GitHub
parent
commit
8dda0072f2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions
  1. +5
    -1
      code/espurna/button.ino
  2. +1
    -0
      code/espurna/wifi.ino

+ 5
- 1
code/espurna/button.ino View File

@ -136,7 +136,11 @@ void buttonEvent(unsigned int id, unsigned char event) {
}
if (BUTTON_MODE_AP == action) {
wifiStartAP();
if (wifiState() & WIFI_STATE_AP) {
wifiStartSTA();
} else {
wifiStartAP();
}
}
if (BUTTON_MODE_RESET == action) {


+ 1
- 0
code/espurna/wifi.ino View File

@ -700,6 +700,7 @@ void wifiReconnectCheck() {
#if TELNET_SUPPORT
if (telnetConnected()) connected = true;
#endif
jw.enableSTA(true);
jw.setReconnectTimeout(connected ? 0 : WIFI_RECONNECT_INTERVAL);
}


Loading…
Cancel
Save