diff --git a/src/dev/esp8266/esp8266.cpp b/src/dev/esp8266/esp8266.cpp index 7435133e..9b8c5ec3 100644 --- a/src/dev/esp8266/esp8266.cpp +++ b/src/dev/esp8266/esp8266.cpp @@ -39,7 +39,7 @@ void Esp8266Device::set_hostname(const char* hostname) const char* Esp8266Device::get_core_version() { - return ESP.getCoreVersion().c_str(); + return _core_version.c_str(); } const char* Esp8266Device::get_chip_model() diff --git a/src/dev/esp8266/esp8266.h b/src/dev/esp8266/esp8266.h index 460cb264..4c48d1ae 100644 --- a/src/dev/esp8266/esp8266.h +++ b/src/dev/esp8266/esp8266.h @@ -19,6 +19,7 @@ class Esp8266Device : public BaseDevice { _hostname = "plate"; _backlight_power = 1; _backlight_level = 100; + _core_version = ESP.getCoreVersion().c_str(); #ifdef TFT_BCKL _backlight_pin = TFT_BCKL; #else @@ -49,6 +50,7 @@ class Esp8266Device : public BaseDevice { private: std::string _hostname; + std::string _core_version; uint8_t _backlight_pin; uint8_t _backlight_level; diff --git a/src/hasp/hasp_dispatch.cpp b/src/hasp/hasp_dispatch.cpp index ba16c45b..d177edd3 100644 --- a/src/hasp/hasp_dispatch.cpp +++ b/src/hasp/hasp_dispatch.cpp @@ -1050,10 +1050,10 @@ void dispatch_output_statusupdate(const char*, const char*) (HASP_NUM_PAGES)); strcat(data, buffer); -#if defined(ARDUINO_ARCH_ESP8266) - snprintf_P(buffer, sizeof(buffer), PSTR("\"espVcc\":%.2f,"), (float)ESP.getVcc() / 1000); - strcat(data, buffer); -#endif +// #if defined(ARDUINO_ARCH_ESP8266) +// snprintf_P(buffer, sizeof(buffer), PSTR("\"espVcc\":%.2f,"), (float)ESP.getVcc() / 1000); +// strcat(data, buffer); +// #endif snprintf_P(buffer, sizeof(buffer), PSTR("\"tftDriver\":\"%s\",\"tftWidth\":%u,\"tftHeight\":%u}"), haspTft.get_tft_model(), (TFT_WIDTH), (TFT_HEIGHT));