Let the page buttons keep up with the finger: Next, Next, Next reaches page 4 (0.2.72)

The Previous and Next bars ran their tap through the tile guard, whose 600 ms
same-tile window (so one contact never fires a tile twice) dropped the second
and third tap of a quick Next, Next, Next. They now use accept_repeat, the
-/+ keys' rule since 0.2.25: every clean tap counts, only a contact within
150 ms of the last accepted tap on the same button is a bounce. The page fill
already dropped a fill under way when the next page was asked for. Firmware
0.2.61; test_cyd_ui.cpp covers the page buttons; host harness and check builds
in docs/TEST_RESULTS_0272.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-18 07:29:23 +02:00
parent 2cb347964d
commit 9f5694b9eb
11 changed files with 124 additions and 16 deletions
+8
View File
@@ -21,6 +21,14 @@ int main() {
r.begin(1300); assert(!r.accept_repeat(1340, 7)); // 80 ms after the last: bounce
r.begin(1300); r.update(40, 0); assert(!r.accept_repeat(1500, 7)); // a swipe is never a step
r.begin(1600); assert(r.accept_repeat(1660, 8)); // the other key right away
// Page buttons (0.2.72): Next, Next, Next at a finger's pace all count, so page 4 is three taps away
// while the pages are still drawing; accept() would have dropped the second and third (600 ms).
cyd::TouchGuard pager;
pager.begin(2000); assert(pager.accept_repeat(2080, 12));
pager.begin(2250); assert(pager.accept_repeat(2330, 12)); // 250 ms after the last
pager.begin(2500); assert(pager.accept_repeat(2580, 12)); // and again
pager.begin(2600); assert(!pager.accept(2680, 12)); // the old rule: bounce window
pager.begin(2700); assert(pager.accept_repeat(2780, 11)); // Previous right after Next
cyd::TouchGuard g;
g.begin(100);
assert(!g.accept(120, 1)); // resistive noise pulse