Parent
#475
What to build
Refactor vescape-app/vescape-accessories into shared firmware libraries and explicitly selected device profiles. Preserve working ground-clearance behavior and protocol v1. This work prepares the firmware structure used by #480 and #481.
Separate BLE transport, protocol/session/lease runtime, ground-clearance capability behavior, and VL53L0X hardware I/O. Keep runtime state owned by one loop/task, with bounded queued BLE events and serialized outgoing messages. Use small concrete interfaces and explicit capability composition; no dynamic plugin system or hypothetical joystick implementation.
Provide separately buildable clearance and explicitly development-only fake rear-light profiles for XIAO ESP32-S3. Isolate sensor dependencies from the light build. Preserve existing supported board configurations where practical. The clearance profile must not advertise the spike's dummy brake light. Keep accessory identity and clearance capability IDs stable across ordinary updates.
Likely files
All paths below are in vescape-app/vescape-accessories.
src/main.cpp — current mixed entrypoint to reduce to composition/startup.
lib/accessory/ — existing Arduino-free protocol library and extension starting point.
platformio.ini — device profiles and scoped dependencies.
test/ — protocol fixtures and new meaningful runtime regression tests.
docs/accessories.md — architecture, profiles, capability declarations and extension instructions.
docs/flashing.md — exact build/upload commands and existing XIAO automatic reset settings.
Acceptance criteria
Related
Parent
#475
What to build
Refactor
vescape-app/vescape-accessoriesinto shared firmware libraries and explicitly selected device profiles. Preserve working ground-clearance behavior and protocol v1. This work prepares the firmware structure used by #480 and #481.Separate BLE transport, protocol/session/lease runtime, ground-clearance capability behavior, and VL53L0X hardware I/O. Keep runtime state owned by one loop/task, with bounded queued BLE events and serialized outgoing messages. Use small concrete interfaces and explicit capability composition; no dynamic plugin system or hypothetical joystick implementation.
Provide separately buildable clearance and explicitly development-only fake rear-light profiles for XIAO ESP32-S3. Isolate sensor dependencies from the light build. Preserve existing supported board configurations where practical. The clearance profile must not advertise the spike's dummy brake light. Keep accessory identity and clearance capability IDs stable across ordinary updates.
Likely files
All paths below are in
vescape-app/vescape-accessories.src/main.cpp— current mixed entrypoint to reduce to composition/startup.lib/accessory/— existing Arduino-free protocol library and extension starting point.platformio.ini— device profiles and scoped dependencies.test/— protocol fixtures and new meaningful runtime regression tests.docs/accessories.md— architecture, profiles, capability declarations and extension instructions.docs/flashing.md— exact build/upload commands and existing XIAO automatic reset settings.Acceptance criteria
Related