From 0e2f1c366f0827edf7fe85ac5311d4a37e3dfd4e Mon Sep 17 00:00:00 2001 From: Glacierty Date: Sat, 14 Aug 2021 17:05:40 +0800 Subject: [PATCH] Update multi_button.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在issue中看到网友反馈的bug(连击接着长按不会触发长按事件),但是没人提交这段代码,那我就代劳咯,哈哈哈 --- multi_button.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multi_button.c b/multi_button.c index 3a96fa7..1b24854 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;