1. When more than 1 button registered.For example 5 buttons.The lastest button will received 1 click event when I click the first button.

[update]
1.

Signed-off-by: wzd5230 <772461552@qq.com>
This commit is contained in:
wangzhengdong 2020-03-30 13:36:51 +08:00
parent ec7828412d
commit fb0558be7a

View File

@ -167,7 +167,7 @@ static uint8_t flex_button_process(void)
uint8_t active_btn_cnt = 0;
flex_button_t* target;
for (target = btn_head, i = 0; target != NULL; target = target->next, i ++)
for (target = btn_head, i = button_cnt - 1; target != NULL; target = target->next, i--)
{
if (target->status > FLEX_BTN_STAGE_DEFAULT)
{