Skip to content

feat(v2): add TwoButtonsGestureDetector for L+R long-press#87

Merged
centydev merged 2 commits into
mainfrom
feat/v2-two-buttons-gesture
May 14, 2026
Merged

feat(v2): add TwoButtonsGestureDetector for L+R long-press#87
centydev merged 2 commits into
mainfrom
feat/v2-two-buttons-gesture

Conversation

@kawinie
Copy link
Copy Markdown
Collaborator

@kawinie kawinie commented May 13, 2026

Summary

Add TwoButtonsGestureDetector that fires on L+R simultaneous long-press and publishes ButtonEvent{ButtonId::L_R, Gesture::LONG} so callers can reuse the existing variant. tempo::TimeoutTimer gains set_ms() so detectors read the arming timestamp from the timer. Also renames POST_LONG to LATCHED for parity, updates state diagrams, and switches .clang-format AlignAfterOpenBracket to BlockIndent.

Linked issues

Hardware tested

  • None (no hardware change)

How tested: pio test -e native (115 cases pass). pio run -e HW1_3_V2 builds clean.

Breaking change / migration

  • Public lib API (lib/* headers)

Details: tempo::TimeoutTimer gains a set_ms() accessor. Additive, no existing callers affected.

Notes

@kawinie kawinie force-pushed the feat/v2-two-buttons-gesture branch 3 times, most recently from b26ebd7 to 3238a6e Compare May 13, 2026 09:18
@kawinie kawinie changed the title refactor(v2): two-button gesture detector + ButtonGestureDetector cleanup refactor(v2): two-button gesture detector + minor cleanup May 13, 2026
kawinie added 2 commits May 13, 2026 02:33
Returns the time passed to the last `set()`. Lets the owner read the
arming timestamp without tracking it separately.
ButtonGestureDetector owns the press lifecycle. New
TwoButtonsGestureDetector fires on L+R simultaneous long-press and
publishes it as ButtonEvent{ButtonId::L_R, Gesture::LONG}. Also renames
POST_LONG to LATCHED and tweaks clang-format.
@kawinie kawinie force-pushed the feat/v2-two-buttons-gesture branch from 3238a6e to 5c8226c Compare May 13, 2026 09:34
@kawinie kawinie changed the title refactor(v2): two-button gesture detector + minor cleanup feat(v2): add TwoButtonsGestureDetector for L+R long-press May 13, 2026
@kawinie kawinie requested a review from centydev May 13, 2026 09:37
@kawinie kawinie marked this pull request as ready for review May 13, 2026 09:48
@centydev centydev merged commit 9b1dfc2 into main May 14, 2026
1 check passed
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.

2 participants