Merge branch 'main' into refactor-Infos-class

This commit is contained in:
Stefan Allius
2024-03-31 01:05:54 +01:00
committed by GitHub

View File

@@ -166,6 +166,7 @@ class SolarmanV5(Message):
return False return False
check = sum(buf[1:buf_len-2]) & 0xff check = sum(buf[1:buf_len-2]) & 0xff
if check != crc: if check != crc:
self.inc_counter('Invalid_Msg_Format')
logger.debug(f'CRC {int(crc):#02x} {int(check):#08x}' logger.debug(f'CRC {int(crc):#02x} {int(check):#08x}'
f' Stop:{int(stop):#02x}') f' Stop:{int(stop):#02x}')
self.inc_counter('Invalid_Msg_Format') self.inc_counter('Invalid_Msg_Format')