KBD: Fix double events generated from long + short press.

The problem was caused by kbd_task() sending an old copy
of the keyboard map.
This was necessary when the events were triggered on key lift
but since now events are sent on key press, this is no more necessary.
replace/67c131aa30c5fed8c10de61634b120dff7f6fcb8
Federico Amedeo Izzo 2020-12-24 17:29:24 +01:00
rodzic aeea305228
commit aca804c738
1 zmienionych plików z 1 dodań i 4 usunięć

Wyświetl plik

@ -207,10 +207,7 @@ static void kbd_task(void *arg)
{
kbd_msg_t msg;
msg.long_press = long_press;
// OR the saved key status with the current key status
// Do this because the new key status is got when the
// key is lifted, and does not contain the pressed key anymore
msg.keys = keys | prev_keys;
msg.keys = keys;
// Send event_t as void * message to use with OSQPost
event_t event;
event.type = EVENT_KBD;