From 1bfa110e73fa7268573ce183d8fb27a8ea04d8f8 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 26 Feb 2023 20:52:49 +0100 Subject: [PATCH] fix compilation error with TELEINFO enabled (#18058) --- tasmota/tasmota_xnrg_energy/xnrg_15_teleinfo.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tasmota/tasmota_xnrg_energy/xnrg_15_teleinfo.ino b/tasmota/tasmota_xnrg_energy/xnrg_15_teleinfo.ino index fb2502ebc..4ac031c59 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_15_teleinfo.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_15_teleinfo.ino @@ -530,7 +530,7 @@ bool ResponseAppendTInfo(char sep, bool all) if (me->name && me->value && *me->name && *me->value) { // Check back checksum in case of any memory corruption - if (me->checksum==tinfo.calcChecksum(me->name, me->value))) { + if (me->checksum==tinfo.calcChecksum(me->name, me->value)) { // Does this label blacklisted ? if (!isBlacklistedLabel(me->name)) { @@ -582,7 +582,7 @@ bool ResponseAppendTInfo(char sep, bool all) } } else { - AddLog(LOG_LEVEL_WARNING, PSTR("TIC: bad checksum for %s"), me->name); + AddLog(LOG_LEVEL_INFO, PSTR("TIC: bad checksum for %s"), me->name); } } } @@ -909,8 +909,8 @@ bool TInfoCmd(void) { case CMND_TELEINFO_STATS: { char stats_name[MAX_TINFO_COMMAND_NAME]; // Get the raw name - GetTextIndexed(statsname, MAX_TINFO_COMMAND_NAME, command_code, kTInfo_Commands); - int l = strlen(stats_name); + GetTextIndexed(stats_name, MAX_TINFO_COMMAND_NAME, command_code, kTInfo_Commands); + int l = strlen(stats_name); // At least "EnergyConfig Stats" plus one space and one (or more) digit // so "EnergyConfig Stats" or "EnergyConfig Stats 0" if ( pValue ) { @@ -919,7 +919,7 @@ bool TInfoCmd(void) { Settings->teleinfo.show_stats = value ; AddLog(LOG_LEVEL_INFO, PSTR("TIC: Show stats=%d"), value); } else if (value == 2) { - tinfo.clearstats(); + tinfo.clearStats(); AddLog(LOG_LEVEL_INFO, PSTR("TIC: Stats cleared")); } else { AddLog(LOG_LEVEL_INFO, PSTR("TIC: bad Stats param '%d'"), value);