aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-10-09 15:23:57 -0700
committerJoel Challis <git@zvecr.com>2019-10-09 23:23:57 +0100
commite58343596af5f749c5bc07aab3a897c6b6b5ac99 (patch)
tree2ff77436267f97a9c09f9999f597dca480daea2a
parent4e23c700f19c8bf0da1fe810721fb02731591f49 (diff)
downloadqmk_firmware-e58343596af5f749c5bc07aab3a897c6b6b5ac99.tar.gz
qmk_firmware-e58343596af5f749c5bc07aab3a897c6b6b5ac99.zip
Keyboard/ergodox debounce (#6994)
* Set default debounce to 30 Lower debounce causes issues, and even 15 isn't lowe enough for the EZ * Cleanup ergodox ez matrix
-rw-r--r--keyboards/ergodox_ez/config.h2
-rw-r--r--keyboards/ergodox_ez/matrix.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h
index c35fe7394..bb51ec321 100644
--- a/keyboards/ergodox_ez/config.h
+++ b/keyboards/ergodox_ez/config.h
@@ -40,6 +40,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
40#define MOUSEKEY_MAX_SPEED 7 40#define MOUSEKEY_MAX_SPEED 7
41#define MOUSEKEY_WHEEL_DELAY 0 41#define MOUSEKEY_WHEEL_DELAY 0
42 42
43#define DEBOUNCE 30
44
43#define TAPPING_TOGGLE 1 45#define TAPPING_TOGGLE 1
44 46
45/* define if matrix has ghost */ 47/* define if matrix has ghost */
diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c
index 2bfe27b9a..3c9a2f43a 100644
--- a/keyboards/ergodox_ez/matrix.c
+++ b/keyboards/ergodox_ez/matrix.c
@@ -31,6 +31,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
31#include "matrix.h" 31#include "matrix.h"
32#include "debounce.h" 32#include "debounce.h"
33#include QMK_KEYBOARD_H 33#include QMK_KEYBOARD_H
34
35// Only enable this if console is enabled to print to
36#if defined(DEBUG_MATRIX_SCAN_RATE) && !defined(CONSOLE_ENABLE)
37# undef DEBUG_MATRIX_SCAN_RATE
38#endif
39
34#ifdef DEBUG_MATRIX_SCAN_RATE 40#ifdef DEBUG_MATRIX_SCAN_RATE
35# include "timer.h" 41# include "timer.h"
36#endif 42#endif
@@ -47,10 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
47 * that comment was written.) 53 * that comment was written.)
48 */ 54 */
49 55
50#ifndef DEBOUNCE
51# define DEBOUNCE 5
52#endif
53
54/* matrix state(1:on, 0:off) */ 56/* matrix state(1:on, 0:off) */
55static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values 57static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
56static matrix_row_t matrix[MATRIX_ROWS]; // debounced values 58static matrix_row_t matrix[MATRIX_ROWS]; // debounced values