From d10f5667a92e19ef50b7887528ed11d18940fcdd Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 4 Apr 2026 19:01:38 -0400 Subject: [PATCH] Fix part swaps occuring multiple times if the face is exited and re-opened on a 30-minute interval --- src/c/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/c/main.c b/src/c/main.c index 72e91b9..b1a970c 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -69,7 +69,8 @@ static GRect s_date_grect_b; static GRect s_bt_grect_b; // declare animation templates -static uint8_t s_animation_duration = 255; +static const uint8_t s_animation_duration = 255; +static bool s_first_tick = true; static Animation *s_head_raise_template; static Animation *s_head_out_template; static Animation *s_head_in_template; @@ -253,6 +254,12 @@ static void update_minute_60() { } static void minute_handler(struct tm *tick_time, TimeUnits units_changed) { + update_minute_1(); + if (s_first_tick) { + s_first_tick = false; + return; // do not animate part swaps on first tick + } + if (tick_time->tm_min % 60 == 0) { update_minute_60(); } else if (tick_time->tm_min % 30 == 0) {