Skip to content

padd: drop in-flight button holds when the pad goes away - #273

Open
hadelan wants to merge 1 commit into
pollen-robotics:mainfrom
hadelan:padd-reset-holds-on-pad-loss
Open

hadelan wants to merge 1 commit into
pollen-robotics:mainfrom
hadelan:padd-reset-holds-on-pad-loss

Conversation

@hadelan

@hadelan hadelan commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Select held at the moment the pad dropped kept its held_since across the disconnect: the pad back three seconds later with Select still down, the first tick called it a two-second hold and shut the robot down. D-pad up had the same shape — a mode switch nobody asked for.

A hold was measured against the pad that left; the next pad's buttons start from nothing. The no-pad branch now resets the Select state machine and the D-pad-up hold alongside the IMU-head state it already reset.

Regression test pins both directions: a reset hold across a >2 s dropout is not a shutdown, and without the reset the same tick arithmetic is — which is why the reset exists. cargo test -p padd, clippy -D warnings, fmt --check all green.

Select held at the moment the pad dropped kept its held_since across the
disconnect: back three seconds later with Select still down, the first
tick called it a two-second hold and shut the robot down. D-pad up had
the same shape — a mode switch nobody asked for. A hold was measured
against the pad that left; the next pad's buttons start from nothing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant