Skip to content

Commit

Permalink
Enable debug mode in CO2_Gadget_Preferences.h
Browse files Browse the repository at this point in the history
  • Loading branch information
melkati committed Feb 18, 2024
1 parent 6ee6af5 commit 6bbdc3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CO2_Gadget_Preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void initPreferences() {
wifiPass.trim();
hostName.trim();
preferences.end();
// #define DEBUG_PREFERENCES
#define DEBUG_PREFERENCES
#ifdef DEBUG_PREFERENCES
printPreferences();
#endif
Expand Down Expand Up @@ -237,6 +237,10 @@ void putPreferences() {
preferences.putUInt("timeBtwnBzr", timeBetweenBuzzerBeeps); // Time between beeps

preferences.end();

#ifdef DEBUG_PREFERENCES
printPreferences();
#endif
}

String getPreferencesAsJson() {
Expand Down
2 changes: 2 additions & 0 deletions CO2_Gadget_WIFI.h
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,8 @@ void wifiClientLoop() {
// Only checks for SSID changed (not password)
if ((WiFi.SSID() != wifiSSID) && (!inMenu)) {
Serial.println("-->[WiFi] Wi-Fi SSID changed. Old SSID: " + wifiSSID + ", new SSID: " + WiFi.SSID());
Serial.println("-->[WiFi] IP address: " + WiFi.localIP().toString());
Serial.println("-->[WiFi] RSSI: " + String(WiFi.RSSI()) + " dBm");
wifiSSID = WiFi.SSID();
activeWIFI = true;
putPreferences();
Expand Down

0 comments on commit 6bbdc3b

Please sign in to comment.