Add tftDriver to statusupdate

This commit is contained in:
fvanroie 2020-03-30 16:19:16 +02:00
parent 6bdab1f911
commit c2655cc5e1

View File

@ -18,6 +18,7 @@
#endif #endif
#include "hasp_hal.h" #include "hasp_hal.h"
#include "hasp_tft.h"
#include "hasp_debug.h" #include "hasp_debug.h"
#include "hasp_config.h" #include "hasp_config.h"
#include "hasp_mqtt.h" #include "hasp_mqtt.h"
@ -207,6 +208,7 @@ void mqtt_send_statusupdate()
doc[F("heapFrag")] = halGetHeapFragmentation(); doc[F("heapFrag")] = halGetHeapFragmentation();
doc[F("espCanUpdate")] = false; doc[F("espCanUpdate")] = false;
doc[F("espCore")] = halGetCoreVersion().c_str(); doc[F("espCore")] = halGetCoreVersion().c_str();
doc[F("tftDriver")] = tftDriverName();
#if defined(ARDUINO_ARCH_ESP8266) #if defined(ARDUINO_ARCH_ESP8266)
doc[F("espVcc")] = (float)ESP.getVcc() / 1000; doc[F("espVcc")] = (float)ESP.getVcc() / 1000;
@ -216,7 +218,6 @@ void mqtt_send_statusupdate()
size_t n = serializeJson(doc, buffer, sizeof(buffer)); size_t n = serializeJson(doc, buffer, sizeof(buffer));
mqtt_send_state(F("statusupdate"), buffer); mqtt_send_state(F("statusupdate"), buffer);
/* if(updateEspAvailable) { /* if(updateEspAvailable) {
mqttStatusPayload += F("\"updateEspAvailable\":true,"); mqttStatusPayload += F("\"updateEspAvailable\":true,");
} else { } else {