Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Mar 11, 2024
1 parent f34878a commit bc5ddf1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions BSB_LAN/BSB_LAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7740,7 +7740,7 @@ void printWifiStatus()
}
}

void networkEvent(WiFiEvent_t event) {
void netEvent(WiFiEvent_t event) {
switch (event) {
case ARDUINO_EVENT_WIFI_READY:
case ARDUINO_EVENT_WIFI_AP_START:
Expand Down Expand Up @@ -7857,7 +7857,7 @@ void startLoggingDevice() {
}

void createTemporaryAP () {
#if defined ESP32
#if defined (ESP32)
esp_wifi_disconnect(); // W.Bra. 04.03.23 mandatory because of interrupts of AP; replaces WiFi.disconnect(x, y) - no arguments necessary
printlnToDebug(PSTR(" Setting up AP 'BSB-LAN'"));
WiFi.softAP("BSB-LAN", "BSB-LPB-PPS-LAN");
Expand All @@ -7871,11 +7871,13 @@ void createTemporaryAP () {
}

void removeTemporaryAP() {
#if defined (ESP32)
// esp_wifi_disconnect(); // W.Bra. 04.03.23 mandatory because of interrupts of AP; replaces WiFi.disconnect(x, y) - no arguments necessary
WiFi.softAPdisconnect(false);
localAP = false;
// WiFi.enableAP(false);
printlnToDebug(PSTR("Temporary AP 'BSB-LAN' deactivated."));
#endif
}

/** *****************************************************************
Expand Down Expand Up @@ -8261,7 +8263,7 @@ void setup() {
}
printToDebug(PSTR("...\r\n"));
#if defined(ESP32)
WiFi.onEvent(networkEvent);
WiFi.onEvent(netEvent);
#endif

#ifdef WIFISPI
Expand Down

0 comments on commit bc5ddf1

Please sign in to comment.