|
|
|
@ -104,9 +104,6 @@ void button_handler(struct Button* handle)
|
|
|
|
handle->event = (uint8_t)PRESS_DOWN;
|
|
|
|
handle->event = (uint8_t)PRESS_DOWN;
|
|
|
|
EVENT_CB(PRESS_DOWN);
|
|
|
|
EVENT_CB(PRESS_DOWN);
|
|
|
|
handle->repeat++;
|
|
|
|
handle->repeat++;
|
|
|
|
if(handle->repeat == 2) {
|
|
|
|
|
|
|
|
EVENT_CB(DOUBLE_CLICK); // repeat hit
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
EVENT_CB(PRESS_REPEAT); // repeat hit
|
|
|
|
EVENT_CB(PRESS_REPEAT); // repeat hit
|
|
|
|
handle->ticks = 0;
|
|
|
|
handle->ticks = 0;
|
|
|
|
handle->state = 3;
|
|
|
|
handle->state = 3;
|
|
|
|
@ -116,6 +113,7 @@ void button_handler(struct Button* handle)
|
|
|
|
EVENT_CB(SINGLE_CLICK);
|
|
|
|
EVENT_CB(SINGLE_CLICK);
|
|
|
|
} else if(handle->repeat == 2) {
|
|
|
|
} else if(handle->repeat == 2) {
|
|
|
|
handle->event = (uint8_t)DOUBLE_CLICK;
|
|
|
|
handle->event = (uint8_t)DOUBLE_CLICK;
|
|
|
|
|
|
|
|
EVENT_CB(DOUBLE_CLICK); // repeat hit
|
|
|
|
}
|
|
|
|
}
|
|
|
|
handle->state = 0;
|
|
|
|
handle->state = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|