Rapid -/+ taps and hold-to-repeat on the setpoint pill (0.2.25)
App 0.2.25 / firmware 0.2.21. The 600 ms touch-guard lockout dropped a second tap on the same -/+ key; stepper keys now use a 150 ms bounce guard, repeat while held (3 per second), and still send one call after 700 ms of rest. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,17 @@ class TouchGuard {
|
||||
bool accept(uint32_t now, int tile) {
|
||||
return !moved_ && accept_slider(now, tile);
|
||||
}
|
||||
// For -/+ keys: every clean tap counts, even the third within a second, so a
|
||||
// setpoint moves several steps in one go. Only bounce (same key within `gap`) is dropped.
|
||||
bool accept_repeat(uint32_t now, int tile, uint32_t gap = 150) {
|
||||
if (moved_ || accepted_ || now - started_ < 40) return false;
|
||||
if (has_previous_ && tile == previous_tile_ && now - previous_ < gap) return false;
|
||||
accepted_ = true;
|
||||
has_previous_ = true;
|
||||
previous_tile_ = tile;
|
||||
previous_ = now;
|
||||
return true;
|
||||
}
|
||||
// Only for a slider which captured this contact and did not lose the press.
|
||||
// Consume the gesture so its parent can never also turn it into a tile tap.
|
||||
bool accept_slider(uint32_t now, int tile) {
|
||||
|
||||
Reference in New Issue
Block a user