From 18cb01b57fec02322952a13f472ed5171d01cd58 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 2 Jul 2019 22:46:24 +0200 Subject: [PATCH] renamed previousSMPublishCRC --- src/ems-esp.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index 664368f95..affad8330 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -177,7 +177,6 @@ char * _bool_to_char(char * s, uint8_t value) { // decimals: 0 = no division, 1=divide value by 10, 2=divide by 2, 10=divide value by 100 // negative values are assumed stored as 1-compliment (https://medium.com/@LeeJulija/how-integers-are-stored-in-memory-using-twos-complement-5ba04d61a56c) char * _short_to_char(char * s, int16_t value, uint8_t decimals = 1) { - // remove errors or invalid values if (value == EMS_VALUE_SHORT_NOTSET) { strlcpy(s, "?", 10); @@ -608,7 +607,7 @@ void publishValues(bool force) { static uint8_t last_boilerActive = 0xFF; // for remembering last setting of the tap water or heating on/off static uint32_t previousBoilerPublishCRC = 0; // CRC check for boiler values static uint32_t previousThermostatPublishCRC = 0; // CRC check for thermostat values - static uint32_t previousOtherPublishCRC = 0; // CRC check for other values (e.g. SM10) + static uint32_t previousSMPublishCRC = 0; // CRC check for Solar Module values (e.g. SM10) JsonObject rootBoiler = doc.to(); @@ -814,8 +813,8 @@ void publishValues(bool force) { crc.update(data[i]); } fchecksum = crc.finalize(); - if ((previousOtherPublishCRC != fchecksum) || force) { - previousOtherPublishCRC = fchecksum; + if ((previousSMPublishCRC != fchecksum) || force) { + previousSMPublishCRC = fchecksum; myDebugLog("Publishing SM data via MQTT"); // send values via MQTT