REST handler sysinfo + MQTT topic: Free heap memory not reporting (#1815)

* REST handler sysinfo: Fix reporting of free memory

* MQTT topic freemem: Fix reporting of free memory
This commit is contained in:
Slider0007
2023-01-12 19:26:45 +01:00
committed by GitHub
parent e05ae5170d
commit 0ee3c0bb0a
2 changed files with 3 additions and 3 deletions

View File

@@ -185,7 +185,7 @@ void publishSystemData() {
sprintf(tmp_char, "%ld", (long)getUpTime());
MQTTPublish(maintopic + "/" + "uptime", std::string(tmp_char), retainFlag);
sprintf(tmp_char, "%zu", esp_get_free_heap_size());
sprintf(tmp_char, "%lu", (long) getESPHeapSize());
MQTTPublish(maintopic + "/" + "freeMem", std::string(tmp_char), retainFlag);
sprintf(tmp_char, "%d", get_WIFI_RSSI());
@@ -265,4 +265,4 @@ std::string mqttServer_getMainTopic() {
return maintopic;
}
#endif //ENABLE_MQTT
#endif //ENABLE_MQTT