You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: support firmware that terminates streaming events with bare CR
Newer DwarfG2 v2 firmware (1.99.5+) terminates +CINV continuous-inventory
events with a bare \r (no LF), while readuntil(b"\n") would block
indefinitely waiting for an LF that never arrives. The watchdog would
then trip after 5s and the reader would never produce inventory events
in practice.
Changes:
- SerialConnection._work: replace fixed \n delimiter with byte-by-byte
line splitter that accepts \r, \n, or \r\n.
- _send_command: accumulate response lines as a list (each line now
arrives as its own _recv call instead of one blob to split on \r).
- _send_command (echo path): when a failed command is not echoed,
drain the trailing ERROR terminator and surface the parsed +ERR:/+CMD:
error frame instead of leaking it into the next command's buffer.
- start_inventory: default timeout 4.0 -> 5.0.
- _check_connection: poll every 100ms while inventory is active so the
watchdog deadline is honoured precisely instead of padded by the
general 1s connection-check interval. Reword reset messages to
"continuous inventory timeout - self reset" / "connection test
failed - self reset" so they no longer suggest a hardware fault.
0 commit comments