Skip to content

Commit

Permalink
fix a bug on LED state control (introduced in 4fb369f)
Browse files Browse the repository at this point in the history
  • Loading branch information
z4yx authored and z4yx committed Jul 6, 2024
1 parent 3284e52 commit 4733a7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static void toggle_led(void) {
void device_update_led(void) {
uint32_t now = device_get_tick();
if (now > blink_timeout) stop_blinking();
if (now >= last_blink && now - last_blink >= blink_interval) {
if (device_is_blinking() && now >= last_blink && now - last_blink >= blink_interval) {
last_blink = now;
toggle_led();
}
Expand Down

0 comments on commit 4733a7d

Please sign in to comment.