Skip to content

Commit

Permalink
Fix: Correct output of wifi disconnect reason code
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Oct 12, 2024
1 parent 36f0ed9 commit f8ad1ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NetworkSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void NetworkSettingsClass::NetworkEvent(const WiFiEvent_t event, WiFiEventInfo_t
break;
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
// Reason codes can be found here: https://github.com/espressif/esp-idf/blob/5454d37d496a8c58542eb450467471404c606501/components/esp_wifi/include/esp_wifi_types_generic.h#L79-L141
MessageOutput.printf("WiFi disconnected: %" PRId8 "\r\n", info.wifi_sta_disconnected.reason);
MessageOutput.printf("WiFi disconnected: %" PRIu8 "\r\n", info.wifi_sta_disconnected.reason);
if (_networkMode == network_mode::WiFi) {
MessageOutput.println("Try reconnecting");
WiFi.disconnect(true, false);
Expand Down

0 comments on commit f8ad1ac

Please sign in to comment.