From: Joey Castillo Date: Sat, 29 Mar 2025 14:36:05 +0000 (-0400) Subject: fix sticky sleep icon on custom LCD X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=6637f1780a52e5bc7c5867648883ef56c7cc5aff;p=sensor-watch.git fix sticky sleep icon on custom LCD --- diff --git a/watch-library/hardware/watch/watch_slcd.c b/watch-library/hardware/watch/watch_slcd.c index 9a089a7..3243830 100644 --- a/watch-library/hardware/watch/watch_slcd.c +++ b/watch-library/hardware/watch/watch_slcd.c @@ -308,7 +308,13 @@ void watch_start_sleep_animation(uint32_t duration) { bool watch_sleep_animation_is_running(void) { // TODO: wrap this in gossamer call - return SLCD->CTRLD.bit.CSREN; + if (_installed_display == WATCH_LCD_TYPE_CUSTOM) { + // COM3, SEG0 contains the half moon icon + return SLCD->SDATAL3.bit.SDATA & 1; + } else { + // CSREN indicates that the tick/tick animation is running + return SLCD->CTRLD.bit.CSREN; + } } void watch_stop_sleep_animation(void) {