Arcade drive mixed forward and turn onto the left stick, so one stick
commanded both track motors. Replaced with tank drive and moved the head
off the right stick onto the d-pad, so every control now maps to exactly
one motor.
- left stick Y -> left track (was: mixed into both)
- right stick Y -> right track (was: head tilt)
- d-pad U/D -> head tilt (was: right stick Y)
- d-pad L/R -> head turn (was: right stick X)
- Square/Circle -> left arm (was: d-pad U/D)
- Triangle/Cross-> right arm (unchanged)
- L2/R2 -> body lift (unchanged)
- L1+R1 together-> all stop (was: Circle)
Head is digital now rather than proportional, so HEAD_MAX drops to 45.
Stick X axes are unused. Also added a commented-out forgetBluetoothKeys()
call for clearing stale NVS pairings.
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.
- 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.