Restore the logic of the key debouncer. Make it only debounce keypresses and set its timeout to 100ms.
This commit is contained in:
Submodule lib/agent updated: 81a83994ab...32d9635b34
@@ -9,7 +9,7 @@
|
|||||||
// Macros:
|
// Macros:
|
||||||
|
|
||||||
#define KEY_DEBOUNCER_INTERVAL_MSEC 1
|
#define KEY_DEBOUNCER_INTERVAL_MSEC 1
|
||||||
#define KEY_DEBOUNCER_TIMEOUT_MSEC 5
|
#define KEY_DEBOUNCER_TIMEOUT_MSEC 100
|
||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ static void updateActiveUsbReports(void)
|
|||||||
|
|
||||||
if (keyState->debounceCounter) {
|
if (keyState->debounceCounter) {
|
||||||
keyState->current = keyState->previous;
|
keyState->current = keyState->previous;
|
||||||
} else if (keyState->previous != keyState->current) {
|
} else if (!keyState->previous && keyState->current) {
|
||||||
keyState->debounceCounter = KEY_DEBOUNCER_TIMEOUT_MSEC + 1;
|
keyState->debounceCounter = KEY_DEBOUNCER_TIMEOUT_MSEC + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user