Skip to content

Commit

Permalink
add verbose log to indicate, that the restart is on purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
thebino committed Dec 10, 2024
1 parent 1c06ef6 commit 4ecf328
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/LogMessages_DE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,5 @@ const char cantConnectToWifi[] = "WLAN-Verbindung fehlgeschlagen.";
const char wifiSetLastSSID[] = "Schreibe letzte erfolgreiche SSID in NVS für WLAN Schnellstart: %s";
const char mDNSStarted[] = "mDNS gestartet: http://%s.local";
const char mDNSFailed[] = "mDNS Start fehlgeschlagen, Hostname: %s";
const char restartAfterOperationModeChange[] = "Operation Mode geändert. ESPuino wird neu gestartet...";
#endif
1 change: 1 addition & 0 deletions src/LogMessages_EN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,5 @@ const char cantConnectToWifi[] = "Failed to connect to WiFi.";
const char wifiSetLastSSID[] = "Write last successful SSID to NVS for WiFi fast-path: %s";
const char mDNSStarted[] = "mDNS started: http://%s.local";
const char mDNSFailed[] = "mDNS failure, hostname: %s";
const char restartAfterOperationModeChange[] = "Operation Mode changed. Restart ESPuino now...";
#endif
1 change: 1 addition & 0 deletions src/LogMessages_FR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,5 @@ const char cantConnectToWifi[] = "Impossible de se connecter au WiFi.";
const char wifiSetLastSSID[] = "Écrire le dernier SSID réussi dans le NVS pour le chemin rapide WiFi : %s";
const char mDNSStarted[] = "mDNS démarré : http://%s.local";
const char mDNSFailed[] = "Échec de mDNS, nom d'hôte : %s";
const char restartAfterOperationModeChange[] = "Le mode de fonctionnement a changé. Redémarrez ESPuino maintenant...";
#endif
1 change: 1 addition & 0 deletions src/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ void System_SetOperationMode(uint8_t opMode) {
uint8_t currentOperationMode = gPrefsSettings.getUChar("operationMode", OPMODE_NORMAL);
if (currentOperationMode != opMode) {
if (gPrefsSettings.putUChar("operationMode", opMode)) {
Log_Println(restartAfterOperationModeChange, LOGLEVEL_INFO);
ESP.restart();
}
}
Expand Down
1 change: 1 addition & 0 deletions src/logmessages.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,4 @@ extern const char cantConnectToWifi[];
extern const char wifiSetLastSSID[];
extern const char mDNSStarted[];
extern const char mDNSFailed[];
extern const char restartAfterOperationModeChange[];

0 comments on commit 4ecf328

Please sign in to comment.