From 27f859b86fc0fc78485050e67279ba53a76f1e5d Mon Sep 17 00:00:00 2001 From: hans-jurgen Date: Mon, 22 May 2023 17:24:00 +0200 Subject: [PATCH] 2023-05-22 --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index be2188a..4c43c51 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -147,7 +147,7 @@ void loop() { sprintf(msg,"%ld", Feldstaerke); sprintf(topic, "%s%s%s", "hjk/devices/", hostname.c_str(), "/telemetry/RSSI" ); client.publish(topic, msg, true); - sprintf(msg,"0x%0x", SystemStatus); + sprintf(msg,"0x%02x", SystemStatus); sprintf(topic, "%s%s%s", "hjk/devices/", hostname.c_str(), "/telemetry/SystemStatus" ); client.publish(topic, msg, true); client.loop(); @@ -162,7 +162,7 @@ void loop() { Pause = intervalLowBatt -((endTime - startTime) * 1000); // Pause ca. 60 Minuten Serial.println("AKKU entladen!"); SystemStatus = (SystemStatus | AkkuLeer); - Serial.printf("Systemstatus : 0x%02x \n", SystemStatus); + Serial.printf("Systemstatus : 0x%04x \n", SystemStatus); writeSystemStatus(); } else{