diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-10-19 15:37:08 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-10-19 15:37:08 -0400 |
commit | 148a47f76a457514c0571345d59c2179842cd30d (patch) | |
tree | 995519f0881e4e988970b056d02260b26d406b07 /movement/watch_faces/clock/simple_clock_face.c | |
parent | 75be6219142a7333fb62ac91fb6abaaf648077e4 (diff) | |
download | Sensor-Watch-148a47f76a457514c0571345d59c2179842cd30d.tar.gz Sensor-Watch-148a47f76a457514c0571345d59c2179842cd30d.tar.bz2 Sensor-Watch-148a47f76a457514c0571345d59c2179842cd30d.zip |
movement: add tick animation in sleep mode
Diffstat (limited to 'movement/watch_faces/clock/simple_clock_face.c')
-rw-r--r-- | movement/watch_faces/clock/simple_clock_face.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/movement/watch_faces/clock/simple_clock_face.c b/movement/watch_faces/clock/simple_clock_face.c index 70e35047..e1e82031 100644 --- a/movement/watch_faces/clock/simple_clock_face.c +++ b/movement/watch_faces/clock/simple_clock_face.c @@ -9,9 +9,10 @@ void simple_clock_face_setup(movement_settings_t *settings, void ** context_ptr) } void simple_clock_face_activate(movement_settings_t *settings, void *context) { - if (settings->bit.clock_mode_24h) { - watch_set_indicator(WATCH_INDICATOR_24H); - } + if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + + if (settings->bit.clock_mode_24h) watch_set_indicator(WATCH_INDICATOR_24H); + watch_set_colon(); // this ensures that none of the timestamp fields will match, so we can re-render them all. *((uint32_t *)context) = 0xFFFFFFFF; @@ -55,6 +56,7 @@ bool simple_clock_face_loop(movement_event_t event, movement_settings_t *setting } pos = 0; if (event.event_type == EVENT_LOW_ENERGY_UPDATE) { + if (!watch_tick_animation_is_running()) watch_start_tick_animation(500); sprintf(buf, "%s%2d%2d%02d ", weekdays[simple_clock_face_get_weekday(date_time.unit.year, date_time.unit.month, date_time.unit.day)], date_time.unit.day, date_time.unit.hour, date_time.unit.minute); } else { sprintf(buf, "%s%2d%2d%02d%02d", weekdays[simple_clock_face_get_weekday(date_time.unit.year, date_time.unit.month, date_time.unit.day)], date_time.unit.day, date_time.unit.hour, date_time.unit.minute, date_time.unit.second); |