Browse Source

Print IDF-version at boot and via GUI

master
Torsten Stauder 4 years ago
parent
commit
d59a93e730
  1. 8
      src/Web.cpp
  2. 6
      src/main.cpp
  3. 2
      src/revision.h

8
src/Web.cpp

@ -162,6 +162,10 @@ void webserverStart(void) {
if (Wlan_IsConnected()) { if (Wlan_IsConnected()) {
info += "\nWLAN-Signalstaerke: " + String((int8_t)Wlan_GetRssi()) + " dBm"; info += "\nWLAN-Signalstaerke: " + String((int8_t)Wlan_GetRssi()) + " dBm";
} }
info += "\nESP-IDF-version (major): ";
info += ESP_IDF_VERSION_MAJOR;
info += "\nESP-IDF-version (minor): ";
info += ESP_IDF_VERSION_MINOR;
#else #else
String info = "Free heap: " + String(ESP.getFreeHeap()) + " bytes"; String info = "Free heap: " + String(ESP.getFreeHeap()) + " bytes";
info += "\nLargest free heap-block: " + String((uint32_t)heap_caps_get_largest_free_block(MALLOC_CAP_8BIT)) + " bytes"; info += "\nLargest free heap-block: " + String((uint32_t)heap_caps_get_largest_free_block(MALLOC_CAP_8BIT)) + " bytes";
@ -170,6 +174,10 @@ void webserverStart(void) {
if (Wlan_IsConnected()) { if (Wlan_IsConnected()) {
info += "\nWiFi signal-strength: " + String((int8_t)Wlan_GetRssi()) + " dBm"; info += "\nWiFi signal-strength: " + String((int8_t)Wlan_GetRssi()) + " dBm";
} }
info += "ESP-IDF major: ";
info += ESP_IDF_VERSION_MAJOR;
info += "\nESP-IDF minor: ";
info += ESP_IDF_VERSION_MINOR;
#endif #endif
#ifdef MEASURE_BATTERY_VOLTAGE #ifdef MEASURE_BATTERY_VOLTAGE
snprintf(Log_Buffer, Log_BufferLength, "\n%s: %.2f V", (char *) FPSTR(currentVoltageMsg), Battery_GetVoltage()); snprintf(Log_Buffer, Log_BufferLength, "\n%s: %.2f V", (char *) FPSTR(currentVoltageMsg), Battery_GetVoltage());

6
src/main.cpp

@ -187,8 +187,12 @@ void setup() {
Serial.println(F(" | _| \\__ \\ | |_) | | | | | | | | '_ \\ / _ \\")); Serial.println(F(" | _| \\__ \\ | |_) | | | | | | | | '_ \\ / _ \\"));
Serial.println(F(" | |___ ___) | | __/ | |_| | | | | | | | | (_) |")); Serial.println(F(" | |___ ___) | | __/ | |_| | | | | | | | | (_) |"));
Serial.println(F(" |_____| |____/ |_| \\__,_| |_| |_| |_| \\___/ ")); Serial.println(F(" |_____| |____/ |_| \\__,_| |_| |_| |_| \\___/ "));
Serial.print(F(" Rfid-controlled musicplayer\n "));
Serial.print(F(" Rfid-controlled musicplayer\n\n"));
Serial.printf("%s\n\n", softwareRevision); Serial.printf("%s\n\n", softwareRevision);
Serial.print(F("ESP-IDF-version (major): "));
Serial.println(ESP_IDF_VERSION_MAJOR);
Serial.print(F("ESP-IDF-version (minor): "));
Serial.println(ESP_IDF_VERSION_MINOR);
// print wake-up reason // print wake-up reason
printWakeUpReason(); printWakeUpReason();

2
src/revision.h

@ -1,4 +1,4 @@
#ifndef __REVISION_H__ #ifndef __REVISION_H__
#define __REVISION_H__ #define __REVISION_H__
constexpr const char softwareRevision[] PROGMEM = "Software-revision: 20211031-1";
constexpr const char softwareRevision[] PROGMEM = "Software-revision: 20211108-1";
#endif #endif
Loading…
Cancel
Save