]> git.earman.xyz Git - sensor-watch.git/commitdiff
beat time: add low energy tick animation
authorJoey Castillo <jose.castillo@gmail.com>
Sun, 7 Nov 2021 04:30:25 +0000 (00:30 -0400)
committerJoey Castillo <jose.castillo@gmail.com>
Sun, 7 Nov 2021 04:30:25 +0000 (00:30 -0400)
movement/watch_faces/complications/beats_face.c

index 73a82719a40c685a7eac3668cdc8f40a2f0e7734..95a9aaefa81f5777be59bb713e366a31d879978d 100644 (file)
@@ -26,6 +26,7 @@ bool beats_face_loop(movement_event_t event, movement_settings_t *settings, void
 
     watch_date_time date_time;
     switch (event.event_type) {
+        case EVENT_ACTIVATE:
         case EVENT_TICK:
             date_time = watch_rtc_get_date_time();
             beats = clock2beats(date_time.unit.hour, date_time.unit.minute, date_time.unit.second, event.subsecond, UTC_OFFSET);
@@ -34,6 +35,7 @@ bool beats_face_loop(movement_event_t event, movement_settings_t *settings, void
             watch_display_string(buf, 0);
             break;
         case EVENT_LOW_ENERGY_UPDATE:
+            if (!watch_tick_animation_is_running()) watch_start_tick_animation(432);
             date_time = watch_rtc_get_date_time();
             beats = clock2beats(date_time.unit.hour, date_time.unit.minute, date_time.unit.second, event.subsecond, UTC_OFFSET);
             sprintf(buf, "bt  %4d  ", (int)beats);