A single button press could surface as two CLICKs on the e-ink build, most
visibly as start+stop on the stopwatch. Two contact-bounce paths fed the
IRQ edge-capture machinery a phantom press/release pair:
- a bounce edge accepted just after a clean release was replayed as a real
press — ISR_DEBOUNCE_MS (5 ms) was too short for the joystick switch; raised
to 25 ms so the settling burst is swallowed.
- the live-pin self-heal reconciled prev against a single raw digitalRead,
which can sample a bouncing contact mid-flap and synthesise a transition.
It now acts only once the divergence has been stable for ISR_DEBOUNCE_MS, so
a momentary read can't inject a click; a genuinely lost edge still heals
(~25 ms later) so the button can't stick.
Both thresholds stay far below any human tap cadence (>100 ms), so rapid
multi-tap navigation still registers every tap.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>