From ad3f1e56ed49f0030d58c9ffeb9a44faa8729f10 Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Wed, 28 May 2025 23:42:38 -0400 Subject: [PATCH] mars time: don't time out, enable low energy animation --- watch-faces/clock/mars_time_face.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/watch-faces/clock/mars_time_face.c b/watch-faces/clock/mars_time_face.c index 2d068263..8711e0a9 100644 --- a/watch-faces/clock/mars_time_face.c +++ b/watch-faces/clock/mars_time_face.c @@ -120,6 +120,11 @@ void mars_time_face_setup(uint8_t watch_face_index, void ** context_ptr) { void mars_time_face_activate(void *context) { mars_time_state_t *state = (mars_time_state_t *)context; (void) state; + + if (watch_sleep_animation_is_running()) { + watch_stop_sleep_animation(); + watch_stop_blink(); + } } bool mars_time_face_loop(movement_event_t event, void *context) { @@ -141,13 +146,12 @@ bool mars_time_face_loop(movement_event_t event, void *context) { state->current_site = (state->current_site + 1) % MARS_TIME_NUM_SITES; _update(state); break; - case EVENT_TIMEOUT: - // TODO: make this lower power so we can avoid timeout - movement_move_to_face(0); - break; case EVENT_LOW_ENERGY_UPDATE: - // TODO: low energy update - // watch_start_sleep_animation(500); + // a mars solar second is 1.0275 seconds, so the animation should tick at half of that. + if (!watch_sleep_animation_is_running()) { + watch_start_sleep_animation(514); + watch_start_indicator_blink_if_possible(WATCH_INDICATOR_COLON, 514); + } break; case EVENT_LIGHT_BUTTON_DOWN: // don't light up every time light is hit