From: tmk Date: Fri, 23 Nov 2012 03:33:42 +0000 (+0900) Subject: Fixes from Tranquilite@GH. X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=6caefe9649d88673719e969502d220c5e9dcd124;p=max%2Ftmk_keyboard.git Fixes from Tranquilite@GH. - Fix keyboard_task() when matrix column size > 16 - Add clear_keyboard() in NKRO command to avoid stucking keys. - Fix function name in print.c. --- diff --git a/common/command.c b/common/command.c index a06e6a00..5cdd168d 100644 --- a/common/command.c +++ b/common/command.c @@ -234,6 +234,7 @@ static bool command_common(uint8_t code) break; #ifdef NKRO_ENABLE case KC_N: + clear_keyboard(); //Prevents stuck keys. keyboard_nkro = !keyboard_nkro; if (keyboard_nkro) print("NKRO: enabled\n"); diff --git a/common/keyboard.c b/common/keyboard.c index fa22116f..cd1ceb42 100644 --- a/common/keyboard.c +++ b/common/keyboard.c @@ -564,20 +564,20 @@ void keyboard_task(void) matrix_row_t matrix_change = 0; matrix_scan(); - for (int r = 0; r < MATRIX_ROWS; r++) { + for (uint8_t r = 0; r < MATRIX_ROWS; r++) { matrix_row = matrix_get_row(r); matrix_change = matrix_row ^ matrix_prev[r]; if (matrix_change) { if (debug_matrix) matrix_print(); - for (int c = 0; c < MATRIX_COLS; c++) { - if (matrix_change & (1<= 0; i--) { sendchar((data & (1<