KBD: Add missing keyboard state save

This commit is contained in:
Federico Amedeo Izzo 2020-12-14 16:12:09 +01:00 committed by Federico Amedeo Izzo
parent b7d3e0b91d
commit ee6f87c735
1 changed files with 2 additions and 0 deletions

View File

@ -176,6 +176,8 @@ static void kbd_task(void *arg)
OSQPost(&ui_queue, (void *)event.value, sizeof(event_t),
OS_OPT_POST_FIFO + OS_OPT_POST_NO_SCHED, &os_err);
}
// Save current keyboard state as previous
prev_keys = keys;
}
// Read keyboard state at 5Hz
OSTimeDlyHMSM(0u, 0u, 0u, 200u, OS_OPT_TIME_HMSM_STRICT, &os_err);