mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
fix esp8266 core status message
This commit is contained in:
parent
7e588181b8
commit
68406b2a9b
@ -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()
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user