buttons: Clear pressed/last_pressed state on new buttons_query command

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-10-01 12:40:28 -04:00
parent 820dd0b5e3
commit 357b2f477c
1 changed files with 1 additions and 0 deletions

View File

@ -101,6 +101,7 @@ command_buttons_query(uint32_t *args)
sched_del_timer(&b->time); sched_del_timer(&b->time);
b->time.waketime = args[1]; b->time.waketime = args[1];
b->rest_ticks = args[2]; b->rest_ticks = args[2];
b->pressed = b->last_pressed = 0;
b->ack_count = b->report_count = 0; b->ack_count = b->report_count = 0;
b->retransmit_state = BF_ACKED; b->retransmit_state = BF_ACKED;
b->retransmit_count = args[3]; b->retransmit_count = args[3];