Skip to content

Commit

Permalink
chore: Update CO2_Gadget.ino with improved startup logging
Browse files Browse the repository at this point in the history
  • Loading branch information
melkati committed May 10, 2024
1 parent f6304b0 commit b9bf33b
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions CO2_Gadget.ino
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Functions and enum definitions
void reverseButtons(bool reversed); // Defined in CO2_Gadget_Buttons.h
void outputsLoop(); // Defined in CO2_Gadget_Main.h
void publishMQTTLogData(String logData); // Defined in CO2_Gadget_MQTT.h
void putPreferences(); // Defined in CO2_Gadget_Preferences.h
void menuLoop(); // Defined in CO2_Gadget_Menu.h
void reverseButtons(bool reversed); // Defined in CO2_Gadget_Buttons.h
void outputsLoop(); // Defined in CO2_Gadget_Main.h
void publishMQTTLogData(String logData); // Defined in CO2_Gadget_MQTT.h
void putPreferences(); // Defined in CO2_Gadget_Preferences.h
void menuLoop(); // Defined in CO2_Gadget_Menu.h
// void setBLEHistoryInterval(uint64_t interval); // Defined in CO2_Gadget_BLE.h

// Define enum for toneBuzzerBeep
Expand Down Expand Up @@ -542,12 +542,17 @@ void setup() {
#else
Serial.printf("\n-->[STUP] CO2 Gadget Version: %s%s Flavour: %s\n", CO2_GADGET_VERSION, CO2_GADGET_REV, FLAVOUR);
#endif
Serial.printf("-->[STUP] Version compiled: %s at %s\n", __DATE__, __TIME__);
Serial.printf("-->[STUP] Total heap: %d\n", ESP.getHeapSize());
Serial.printf("-->[STUP] Free heap: %d\n", ESP.getFreeHeap());
Serial.printf("-->[STUP] Min Free heap: %d\n", ESP.getMinFreeHeap());
Serial.printf("-->[STUP] Total PSRAM: %d\n", ESP.getPsramSize());
Serial.printf("-->[STUP] Free PSRAM: %d\n", ESP.getFreePsram());

Serial.println("-->[STUP] Version compiled: " __DATE__ " at " __TIME__);
Serial.println("-->[STUP] Total heap: " + String(ESP.getHeapSize()));
Serial.println("-->[STUP] Free heap: " + String(ESP.getFreeHeap()));
Serial.println("-->[STUP] Min Free heap: " + String(ESP.getMinFreeHeap()));
if (ESP.getPsramSize() > 0) {
Serial.println("-->[STUP] Total PSRAM: " + String(ESP.getPsramSize()));
Serial.println("-->[STUP] Free PSRAM: " + String(ESP.getFreePsram()));
} else {
Serial.println("-->[STUP] No PSRAM available");
}

// Get the size of the flash memory
// Serial.printf("-->[STUP] Flash size: %d\n", ESP.getFlashChipSize());
Expand Down

0 comments on commit b9bf33b

Please sign in to comment.