Skip to content

Commit

Permalink
Keyboard/ergodox debounce (qmk#6994)
Browse files Browse the repository at this point in the history
* Set default debounce to 30

Lower debounce causes issues, and even 15 isn't lowe enough for the EZ

* Cleanup ergodox ez matrix
  • Loading branch information
drashna authored and zvecr committed Oct 9, 2019
1 parent 4e23c70 commit e583435
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions keyboards/ergodox_ez/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0

#define DEBOUNCE 30

#define TAPPING_TOGGLE 1

/* define if matrix has ghost */
Expand Down
10 changes: 6 additions & 4 deletions keyboards/ergodox_ez/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "matrix.h"
#include "debounce.h"
#include QMK_KEYBOARD_H

// Only enable this if console is enabled to print to
#if defined(DEBUG_MATRIX_SCAN_RATE) && !defined(CONSOLE_ENABLE)
# undef DEBUG_MATRIX_SCAN_RATE
#endif

#ifdef DEBUG_MATRIX_SCAN_RATE
# include "timer.h"
#endif
Expand All @@ -47,10 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* that comment was written.)
*/

#ifndef DEBOUNCE
# define DEBOUNCE 5
#endif

/* matrix state(1:on, 0:off) */
static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
static matrix_row_t matrix[MATRIX_ROWS]; // debounced values
Expand Down

0 comments on commit e583435

Please sign in to comment.