apirrone 552a44464c Start is a robot-side toggle: one press always acts, and acting means homing first
padd kept its own on/off belief and toggled it blindly. That belief
drifts from the robot's the moment anything else moves the state —
robot.relax, the shutdown sequence, either side restarting — and a
stale belief turns Start into a button that does nothing every other
press: on hardware, press (nothing, robot stays limp), press again
(now it ramps). The toggle now lives in robot.enable itself
(EnableParams::toggle): the robot flips its own state, so a press
always means 'the other one'.

Toggling on also queues the re-home before setting enabled — handled
earlier in the same tick, so the policy never sees the pose the last
stop froze — and the reply names the state the robot ended in, which
is what padd logs now that it has no belief of its own. Verified on
the fake bus: press/press/press after a relax is home-and-drive,
stop, home-and-drive — no dead presses.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 10:32:30 +02:00
..