More Diag-Infos Heap-memory
This commit is contained in:
+9
-3
@@ -266,8 +266,10 @@ bool setBambuSpool(String payload) {
|
||||
JsonDocument doc;
|
||||
DeserializationError error = deserializeJson(doc, payload);
|
||||
if (error) {
|
||||
Serial.print("Error parsing JSON: ");
|
||||
Serial.print("Error parsing setBambuSpool-JSON: ");
|
||||
Serial.println(error.c_str());
|
||||
Serial.print("Free Heap-Memory: ");
|
||||
Serial.println(ESP.getFreeHeap());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -475,7 +477,9 @@ void mqtt_callback(char* topic, byte* payload, unsigned int length) {
|
||||
message = "";
|
||||
if (error)
|
||||
{
|
||||
Serial.print("Fehler beim Parsen des JSON: ");
|
||||
Serial.print("Free Heap-Memory: ");
|
||||
Serial.println(ESP.getFreeHeap());
|
||||
Serial.print("Error parsing MQTT-JSON: ");
|
||||
Serial.println(error.c_str());
|
||||
return;
|
||||
}
|
||||
@@ -682,10 +686,12 @@ void mqtt_loop(void * parameter) {
|
||||
}
|
||||
|
||||
// Periodically check connection status
|
||||
if (now - lastCheck > 30000) { // Check every 30 seconds
|
||||
if (now - lastCheck > 60000) { // Check every 60 seconds
|
||||
Serial.print("MQTT Status Check - Connected: ");
|
||||
Serial.println(client.connected() ? "Yes" : "No");
|
||||
lastCheck = now;
|
||||
Serial.print("Free Heap-Memory: ");
|
||||
Serial.println(ESP.getFreeHeap());
|
||||
}
|
||||
|
||||
client.loop();
|
||||
|
||||
Reference in New Issue
Block a user