diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2016-02-28 23:58:47 +0200 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2016-02-28 23:58:47 +0200 |
commit | 168c5b679f23c25263623f0f8f2b340543cf2140 (patch) | |
tree | 7f2220660880fba2f786826823212c9756ced015 /serial_link/system/system.c | |
parent | 6fe6d111bf563962e0d3cc2e4812b6d7959836a3 (diff) |
Call remote matrix update, when the matrix changes
Diffstat (limited to 'serial_link/system/system.c')
-rw-r--r-- | serial_link/system/system.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/serial_link/system/system.c b/serial_link/system/system.c index 68ccbdb45e..9cf695a308 100644 --- a/serial_link/system/system.c +++ b/serial_link/system/system.c @@ -137,6 +137,8 @@ void init_serial_link(void) { LOWPRIO, serialThread, NULL); } +void matrix_set_remote(matrix_row_t* rows, uint8_t index); + void serial_link_update(void) { systime_t current_time = chVTGetSystemTimeX(); if (current_time - last_update > 1000) { @@ -166,17 +168,7 @@ void serial_link_update(void) { matrix_object_t* m = read_keyboard_matrix(0); if (m) { - xprintf("\nr/c 01234567\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - xprintf("%X0: ", row); - for (int col = 0; col < MATRIX_COLS; col++) { - if (m->rows[row] & (1<<col)) - xprintf("1"); - else - xprintf("0"); - } - xprintf("\n"); - } + matrix_set_remote(m->rows, 0); } } |