Merge pull request #8 from sj13757790563/develop

修复功能
pull/10/head
Bin 6 years ago committed by GitHub
commit 807a6cb20a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -103,10 +103,7 @@ void button_handler(struct Button* handle)
if(handle->button_level == handle->active_level) { //press down again
handle->event = (uint8_t)PRESS_DOWN;
EVENT_CB(PRESS_DOWN);
handle->repeat++;
if(handle->repeat == 2) {
EVENT_CB(DOUBLE_CLICK); // repeat hit
}
handle->repeat++;
EVENT_CB(PRESS_REPEAT); // repeat hit
handle->ticks = 0;
handle->state = 3;
@ -116,6 +113,7 @@ void button_handler(struct Button* handle)
EVENT_CB(SINGLE_CLICK);
} else if(handle->repeat == 2) {
handle->event = (uint8_t)DOUBLE_CLICK;
EVENT_CB(DOUBLE_CLICK); // repeat hit
}
handle->state = 0;
}

Loading…
Cancel
Save