feat(vesc): extend motor diagnostics, configuration and transport recovery

Add firmware and extension catalogues, configuration transactions, sample review and QML diagnostics. Preserve explicit authority, bounded retries and stop recovery in motor transport.
This commit is contained in:
DCCONSTRUCTIONS
2026-10-29 09:09:59 +03:00
parent 115476d2e6
commit f32c7b400b
186 changed files with 21197 additions and 339 deletions
@@ -0,0 +1,18 @@
"""Bounded, read-only firmware diagnostics and exact-attachment USB descriptors."""
from pathlib import Path
from .serial import check_attachment
def read_diagnostics(device):
attachment = device.attachment
check_attachment(attachment)
path = Path('/sys/bus/usb/devices') / attachment.usb
usb = {"port": attachment.usb, "tty": attachment.tty, "speed": attachment.speed}
for field in ('idVendor', 'idProduct', 'bcdDevice', 'manufacturer', 'product', 'serial'):
try:
usb[field] = (path / field).read_text()[:256].strip()
except OSError:
usb[field] = None
reports = {name: device.link.diagnostic(name) for name in ('hw_status', 'faults')}
check_attachment(attachment)
return {"usb": usb, "reports": reports}