Commit Graph

15 Commits (acd3e97b83aac14961d1892b0b8333963f499505)

Author SHA1 Message Date
Andrew Pritchard cd30a60d0e Change to per-key eager debouncing for ErgoDox EZ.
Empirically, waiting for N consecutive identical scans as a debouncing
strategy doesn't work very well for the ErgoDox EZ where scans are very
slow compared to most keyboards.  Instead, debounce the signals by
eagerly reporting a change as soon as one scan observes it, but then
ignoring further changes from that key for the next N scans.

This is implemented by keeping an extra matrix of uint8 countdowns, such
that only keys whose countdown is currently zero are eligible to change.
When we do observe a change, we bump that key's countdown to DEBOUNCE.
During each scan, every nonzero countdown is decremented.

With this approach to debouncing, much higher debounce constants are
tolerable, because latency does not increase with the constant, and
debounce countdowns on one key do not interfere with events on other
keys.  The only negative effect of increasing the constant is that the
minimum duration of a keypress increases.  Perhaps I'm just extremely
unlucky w.r.t. key switch quality, but I saw occasional bounces even
with DEBOUNCE=10; with 15, I've seen none so far.  That's around 47ms,
which seems like an absolutely insane amount of time for a key to be
bouncy, but at least it works.
8 years ago
Erez Zukerman 13c882a1fb disables space cadet rollover 8 years ago
Jack Humbert 841d7e6a1d turn off rgb_midi in ez 8 years ago
Jack Humbert ffc1d97672 Update config.h 8 years ago
Jack Humbert 101416eb82 Merge branch 'master' of github.com:jackhumbert/qmk_firmware 8 years ago
Jack Humbert 06c64bbff3 rgb clean-up, api clean-up 8 years ago
Kyle Smith 83e613ad23 Allow power consumption to be set per-keyboard. 8 years ago
Jack Humbert f946d830f9 guess i didnt pull 8 years ago
Jack Humbert efbc205efd Merge branch 'wu5y7' of github.com:jackhumbert/qmk_firmware into wu5y7 8 years ago
Jack Humbert d0cefef946 enable rgblight by default for ez 8 years ago
Erez Zukerman 2d0ada0190 Pulls LED config into common config for EZ 8 years ago
Jack Humbert 06a2677b7e fix infinity 8 years ago
Fred Sundvik 426e9ecc6f Fix config.h include guards 8 years ago
Fred Sundvik e7670f6d19 Move some of the Ergodox config settings to shared 8 years ago
Fred Sundvik 9af995c59b Initial structure for Ergodox as subprojects
Only the EZ default keymaps compiles at the moment though.
8 years ago