improve parse()

This commit is contained in:
Stefan Allius
2024-04-14 14:24:32 +02:00
parent f6af744864
commit 0e63c45302

View File

@@ -96,7 +96,8 @@ class InfosG3P(Infos):
mtype = (idx >> 24) & 0xff mtype = (idx >> 24) & 0xff
if ftype != rcv_ftype or mtype != msg_type: if ftype != rcv_ftype or mtype != msg_type:
continue continue
if isinstance(row, dict): if not isinstance(row, dict):
continue
info_id = row['reg'] info_id = row['reg']
fmt = row['fmt'] fmt = row['fmt']
res = struct.unpack_from(fmt, buf, addr) res = struct.unpack_from(fmt, buf, addr)