-
Notifications
You must be signed in to change notification settings - Fork 703
Open
Description
case 2:
if (handle->button_level == handle->active_level) {
handle->event = (uint8_t)PRESS_DOWN;
EVENT_CB(PRESS_DOWN);
handle->repeat++;
handle->event = (uint8_t)PRESS_REPEAT;//为什么不加这句,不加回调出去不就错了事件类型。
EVENT_CB(PRESS_REPEAT);
handle->ticks = 0;
handle->state = 3;
} else if (handle->ticks > SHORT_TICKS) {
if (handle->repeat == 1) {
handle->event = (uint8_t)SINGLE_CLICK;
EVENT_CB(SINGLE_CLICK);
} else if (handle->repeat == 2) {
handle->event = (uint8_t)DOUBLE_CLICK;
EVENT_CB(DOUBLE_CLICK);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels