mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
renamed previousSMPublishCRC
This commit is contained in:
@@ -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
|
// 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)
|
// 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) {
|
char * _short_to_char(char * s, int16_t value, uint8_t decimals = 1) {
|
||||||
|
|
||||||
// remove errors or invalid values
|
// remove errors or invalid values
|
||||||
if (value == EMS_VALUE_SHORT_NOTSET) {
|
if (value == EMS_VALUE_SHORT_NOTSET) {
|
||||||
strlcpy(s, "?", 10);
|
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 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 previousBoilerPublishCRC = 0; // CRC check for boiler values
|
||||||
static uint32_t previousThermostatPublishCRC = 0; // CRC check for thermostat 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<JsonObject>();
|
JsonObject rootBoiler = doc.to<JsonObject>();
|
||||||
|
|
||||||
@@ -814,8 +813,8 @@ void publishValues(bool force) {
|
|||||||
crc.update(data[i]);
|
crc.update(data[i]);
|
||||||
}
|
}
|
||||||
fchecksum = crc.finalize();
|
fchecksum = crc.finalize();
|
||||||
if ((previousOtherPublishCRC != fchecksum) || force) {
|
if ((previousSMPublishCRC != fchecksum) || force) {
|
||||||
previousOtherPublishCRC = fchecksum;
|
previousSMPublishCRC = fchecksum;
|
||||||
myDebugLog("Publishing SM data via MQTT");
|
myDebugLog("Publishing SM data via MQTT");
|
||||||
|
|
||||||
// send values via MQTT
|
// send values via MQTT
|
||||||
|
|||||||
Reference in New Issue
Block a user