From 357b2f477c73037ea581a07b876a41c97c0e8670 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 1 Oct 2018 12:40:28 -0400 Subject: [PATCH] buttons: Clear pressed/last_pressed state on new buttons_query command Signed-off-by: Kevin O'Connor --- src/buttons.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/buttons.c b/src/buttons.c index 7f6e1ee7..d58f3683 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -101,6 +101,7 @@ command_buttons_query(uint32_t *args) sched_del_timer(&b->time); b->time.waketime = args[1]; b->rest_ticks = args[2]; + b->pressed = b->last_pressed = 0; b->ack_count = b->report_count = 0; b->retransmit_state = BF_ACKED; b->retransmit_count = args[3];