From 6fe1b236a4854c0062930f52e27433e4242e9db4 Mon Sep 17 00:00:00 2001 From: Alessandro Genova Date: Fri, 15 Aug 2025 22:50:10 -0400 Subject: [PATCH] Minor improvement to movement_force_led_on logic --- movement.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/movement.c b/movement.c index aa90f034..f52050e0 100644 --- a/movement.c +++ b/movement.c @@ -400,8 +400,8 @@ void movement_force_led_on(uint8_t red, uint8_t green, uint8_t blue) { // this is hacky, we need a way for watch faces to set an arbitrary color and prevent Movement from turning it right back off. movement_state.light_on = true; watch_set_led_color_rgb(red, green, blue); - rtc_counter_t counter = watch_rtc_get_counter(); - watch_rtc_register_comp_callback_no_schedule(cb_led_timeout_interrupt, counter + 32767, LED_TIMEOUT); + // The led will stay on until movement_force_led_off is called, so disable the led timeout in case we were in the middle of it. + watch_rtc_disable_comp_callback_no_schedule(LED_TIMEOUT); movement_volatile_state.schedule_next_comp = true; }