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.
This commit is contained in:
Federico Amedeo Izzo 2020-12-24 17:29:24 +01:00
parent aeea305228
commit aca804c738
1 changed files with 1 additions and 4 deletions

View File

@ -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;