feat: add detailed logging for event counting process in MiniMateClient
This commit is contained in:
@@ -192,6 +192,11 @@ class MiniMateClient:
|
||||
log.warning("count_events: 1E failed: %s — returning 0", exc)
|
||||
return 0
|
||||
|
||||
log.warning(
|
||||
"count_events: 1E → key=%s data8=%s trailing=%s",
|
||||
key4.hex(), data8.hex(), data8[4:8].hex(),
|
||||
)
|
||||
|
||||
if data8[4:8] == b"\x00\x00\x00\x00":
|
||||
log.info("count_events: 1E returned null sentinel — device is empty")
|
||||
return 0
|
||||
@@ -201,6 +206,10 @@ class MiniMateClient:
|
||||
count += 1
|
||||
try:
|
||||
key4, data8 = proto.advance_event()
|
||||
log.warning(
|
||||
"count_events: 1F [iter %d] → key=%s data8=%s trailing=%s",
|
||||
count, key4.hex(), data8.hex(), data8[4:8].hex(),
|
||||
)
|
||||
except ProtocolError as exc:
|
||||
log.warning("count_events: 1F failed after %d events: %s", count, exc)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user