Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec committed Nov 21, 2024
1 parent 063c91a commit 37b4113
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/zigbee_router/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,10 @@ void sl_button_on_change(const sl_button_t *handle)
sl_button_state_t button_state = sl_button_get_state(handle);

if (button_state == SL_SIMPLE_BUTTON_PRESSED) {
button_long_press = false;
button_press_time = halCommonGetInt16uMillisecondTick();
} else if (button_state == SL_SIMPLE_BUTTON_RELEASED) {
current_time = halCommonGetInt16uMillisecondTick();

if ((current_time - button_press_time) > BUTTON_LONG_PRESS_TIME_MS) {
button_long_press = true;
}
button_long_press = (current_time - button_press_time) > BUTTON_LONG_PRESS_TIME_MS;

sl_zigbee_af_event_set_active(&button_event);
}
Expand Down

0 comments on commit 37b4113

Please sign in to comment.