feat: add --debug tracing to hendi_ctrl_app.py, document v1.16 fix
HendiCtrl.cmd() previously raised a bare "Communication error" for any non-OK response, discarding the firmware's actual reply. It now includes the raw echo/answer bytes, and --debug prints every request/response. Using this, the rejected R1 during lockout turned out to be an explicit "ERR:Invalid state" reply, not a timeout. Also flashed and retested v1.16: plain reconnect (no --reset) now recovers from the lockout reliably (4/4 trials), fixing the intermittent behavior seen on v1.15. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GpePKZiEZWbGo9HrfuML6U
This commit is contained in:
@@ -67,6 +67,7 @@ def main():
|
||||
parser = ap.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--serial-port", default=DEFAULT_PORT)
|
||||
parser.add_argument("--baudrate", type=int, default=DEFAULT_BAUDRATE)
|
||||
parser.add_argument("--debug", action="store_true", help="print raw request/response bytes for every command")
|
||||
parser.add_argument("--reset", action="store_true", help="toggle the reset line (does not clear the ungraceful-disconnect lockout - use the device's knob for that)")
|
||||
parser.add_argument("--version", action="store_true", help="print software identifier/version")
|
||||
parser.add_argument("--capabilities", action="store_true", help="print power/digit capability info")
|
||||
@@ -77,7 +78,7 @@ def main():
|
||||
parser.add_argument("--update-firmware", metavar="FILE", help="flash the given firmware file")
|
||||
args = parser.parse_args()
|
||||
|
||||
hendi = HendiCtrl(args.serial_port, args.baudrate)
|
||||
hendi = HendiCtrl(args.serial_port, args.baudrate, debug=args.debug)
|
||||
|
||||
if args.reset:
|
||||
reset(hendi)
|
||||
|
||||
Reference in New Issue
Block a user