diff --git a/multi_button.c b/multi_button.c index 3a96fa7..762c797 100644 --- a/multi_button.c +++ b/multi_button.c @@ -129,6 +129,8 @@ void button_handler(struct Button* handle) } else { handle->state = 0; } + }else if(handle->ticks > SHORT_TICKS){ // long press up + handle->state = 0; } break; @@ -177,6 +179,7 @@ void button_stop(struct Button* handle) if (entry == handle) { *curr = entry->next; // free(entry); + return;//glacier add 2021-8-18 } else curr = &entry->next; }