Commit Graph
4 Commits
Author SHA1 Message Date
jessikitty 1ca4bda441 Fix build: hoist all type declarations above the first function
The Arduino IDE injects generated prototypes immediately before the first
function definition in the sketch. clearDesired() sat above struct Hub and
struct PortThrottle, so prototypes referencing those types were emitted
before the types existed. Moved all structs and enums into one block at the
top, and documented the constraint in the header so it does not recur.
2026-09-01 23:29:24 +10:00
jessikitty 3e553332eb Add port auto-detect via notifications, and the Johnny 5 control mapping
- Subscribe to the LWP3 characteristic and decode Hub Attached I/O (0x04)
  so the hub reports its own port inventory at connect, plus Generic Error
  (0x05) so rejected commands stop vanishing silently.
- Map all 7 motors: arcade drive, head tilt/turn, body lift on the analog
  triggers, arms on d-pad and face buttons.
- Add a per-hub rate limit. Four motors on hub 1 exceeded what the per-port
  throttle alone would hold back.
- Fix track sides: port A is right, port B is left.
2026-09-01 23:22:48 +10:00
jessikitty 84020281ee Include btstack.h instead of uni.h; note the include-path prerequisite
Nothing in the sketch calls a uni_ function - bd_addr_t, sscanf_bd_addr,
gap_connect and the gatt_client calls are all BTstack.
2026-09-01 22:42:49 +10:00
jessikitty 3729ded5a0 Add single-board sketch: Bluepad32 gamepad + LWP3 GATT client on BTstack 2026-08-28 10:10:58 +10:00