]> git.earman.xyz Git - sensor-watch.git/commitdiff
fix sticky sleep icon on custom LCD
authorJoey Castillo <joeycastillo@utexas.edu>
Sat, 29 Mar 2025 14:36:05 +0000 (10:36 -0400)
committerJoey Castillo <joeycastillo@utexas.edu>
Sat, 29 Mar 2025 14:36:05 +0000 (10:36 -0400)
watch-library/hardware/watch/watch_slcd.c

index 9a089a7c45022ffb913e6a00a4f01239ba41a499..3243830e3493b5a5435e710dc07fca6862d0462b 100644 (file)
@@ -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) {