Files
NODEDC_MISSION_CORE/docs/node/28_VESC_PACKAGES.md
DCCONSTRUCTIONS f32c7b400b 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.
2026-10-29 09:09:59 +03:00

4.4 KiB

VESC extensions

The shared Core/Node VESC settings window owns an Extensions section built from Design Guideline FeatureSettingsWindow, SettingsCard, ResourceList/ResourceRow, Description, Select, TextField, TextAreaField, Checker and Button. This is domain content inside the existing modal, not a new workspace or navigation root. The operator selects a package, reads its author documentation and compatibility, then previews a complete Lisp/QML replacement before confirming the write. Libraries remain separate from installable applications. Search/filter, empty, loading, unavailable, unsupported, rejected and uncertain-write states are explicit.

The installer carries a hash-pinned RCC catalogue with 41 packages. Reproduce it with packaging/fetch_package_catalog.py: changed upstream bytes fail verification. The immutable qualified Node release also retains the exact catalogue. Runtime refresh is explicit, targets the same fixed public URL as upstream VESC Tool and changes only the catalogue. The publisher serves it over HTTP; the UI states this. There are no payment, account or purchase flows. The Node host downloads a bounded 8 MiB response without redirects, cookies, credentials or proxy-environment use. The USB service retains PrivateNetwork and receives bounded checked chunks. Failed download, invalid archive or interrupted import preserves the previous catalogue. Imported catalogues use one atomic replacement; individual imports are limited to 16 packages / 8 MiB. Publication preserves at least 8 MiB of the service JSON budget for journals and recovery. Catalogue import does not run application QML or Lisp. Compatibility uses the isolated predicate described below. Explicit QML preview uses the separate disconnected renderer described in document 29; Lisp is never run by preview.

Qt RCC v3 and VESC Packet containers are bounded before decoding. The original pinned Tool CodeLoader unpacks packages and compresses QML. Lisp payload bytes, embedded native libraries and alignment are retained. The descriptor compatibility function runs in a bare QJSEngine with a 250 ms interrupt deadline and plain identity data only; no Qt/QObject/USB/network/filesystem/application bridge is exposed. The QML component itself and Component.onCompleted are never instantiated. False compatibility rejects installation. Unknown compatibility requires an explicit documentation-based confirmation; it never silently becomes true. Existing firmware profile and flash bounds are additional independent checks.

Lisp editor pkg@ and pkg:: resource imports resolve only against the stored catalogue. Original CodeLoader extracts the source or named attachment; the editor packs a self-contained project with flat attachments. Host paths and network URL fallback remain forbidden. Readback normalizes original package import paths into attached files so an installed package remains editable without host-path access.

Install, update and removal replace both Lisp and application QML, including an empty component. Before any write, a durable exact-byte recovery snapshot is saved for the controller identity. Confirmation binds UUID, firmware, USB session, current code hashes/flags and a five-minute lifetime. Both components are read back before success. Lisp is stopped with acknowledgement but never started by installation. Firmware boot behavior is separate and disclosed; no promise of disabled autostart after power cycling is made. Original upstream installVescPackage is deliberately not called because it starts Lisp immediately.

A timeout or lost ACK preserves a durable interlock and never retries the write. Reconcile compares both components. Partial content stays blocked; recovery writes the exact original snapshot after a new preview. A failed recovery never replaces the original backup with partial contents. Installed package names are shown only after identity and both code hashes match, not merely from a historical receipt.

Current physical rover controllers remain firmware 5.02. Catalogue browsing, import, refresh, compatibility inspection and package download work on this profile. Code writes require the explicit VESC 6.00 profile and remain physically unqualified. The original extension increment did not include QML rendering. Document 29 adds a native Qt Quick snapshot preview, not interactive QML/device execution or full VESC Tool parity. Motor/configuration/BMS/firmware writes and code execution are excluded from acceptance. No new Ubuntu installation test is claimed.