bdwidth_status: keep a bdwidth USB dropout from shutting down Klipper

bdwidth reads its CH340 from a reactor timer without error handling, so
"write failed: [Errno 5] Input/output error" shut down Klipper mid print.
bdwidth_status now wraps the sensor's Read_bdwidth (bdwidth.py itself
unchanged): on a USB error it closes the port, reports once and returns
False, so bdwidth retries every 10 s; the port is reopened when the
device is back. New status fields usb_ok and usb_errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-10-12 18:03:18 +02:00
1 parent eb7e0d4482
commit e4d2230a57
3 files changed
+57 -1

No files matched your search

Binary file not shown.