Browse Source
The previous implementation already reported a key-press event after reading an ADC value close to the threshold for the first time. This may lead to false events if the ADC takes a reading just during the transition from one button state to another (especially if a somewhat large capacitor is used to avoid noise). A key-press state must be same for at least two samples in order to avoid such issues, which is what this commit implements. Signed-off-by: Martin Jäger <martin@libre.solar>pull/89657/head
1 changed files with 17 additions and 10 deletions
Loading…
Reference in new issue