diff --git a/movement/template/template.c b/movement/template/template.c index 68405ec0..4f2e7e1b 100644 --- a/movement/template/template.c +++ b/movement/template/template.c @@ -69,7 +69,7 @@ bool <#watch_face_name#>_face_loop(movement_event_t event, void *context) { // If you did not resign in EVENT_TIMEOUT, you can use this event to update the display once a minute. // Avoid displaying fast-updating values like seconds, since the display won't update again for 60 seconds. // You should also consider starting the tick animation, to show the wearer that this is sleep mode: - // watch_start_tick_animation(500); + // watch_start_sleep_animation(500); break; default: // Movement's default loop handler will step in for any cases you don't handle above: diff --git a/movement/watch_faces/clock/close_enough_clock_face.c b/movement/watch_faces/clock/close_enough_clock_face.c index 91499af3..2f34c293 100644 --- a/movement/watch_faces/clock/close_enough_clock_face.c +++ b/movement/watch_faces/clock/close_enough_clock_face.c @@ -72,8 +72,8 @@ void close_enough_clock_face_setup(uint8_t watch_face_index, void ** context_ptr void close_enough_clock_face_activate(void *context) { close_enough_clock_state_t *state = (close_enough_clock_state_t *)context; - if (watch_tick_animation_is_running()) { - watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) { + watch_stop_sleep_animation(); } if (movement_clock_mode_24h()) { diff --git a/movement/watch_faces/clock/day_night_percentage_face.c b/movement/watch_faces/clock/day_night_percentage_face.c index 4dc7fc47..dfac555a 100644 --- a/movement/watch_faces/clock/day_night_percentage_face.c +++ b/movement/watch_faces/clock/day_night_percentage_face.c @@ -114,7 +114,7 @@ bool day_night_percentage_face_loop(movement_event_t event, void *context) { watch_set_indicator(WATCH_INDICATOR_PM); } if (event.event_type == EVENT_LOW_ENERGY_UPDATE) { - if (!watch_tick_animation_is_running()) watch_start_tick_animation(500); + if (!watch_sleep_animation_is_running()) watch_start_sleep_animation(500); sprintf(buf, "%s%2d %02d ", weekday, date_time.unit.day, percentage / 100); } else { sprintf(buf, "%s%2d %04d", weekday, date_time.unit.day, percentage); diff --git a/movement/watch_faces/clock/french_revolutionary_face.c b/movement/watch_faces/clock/french_revolutionary_face.c index 96f83f44..3b2e9c39 100644 --- a/movement/watch_faces/clock/french_revolutionary_face.c +++ b/movement/watch_faces/clock/french_revolutionary_face.c @@ -74,7 +74,7 @@ bool french_revolutionary_face_loop(movement_event_t event, void *context) { if (event.event_type == EVENT_LOW_ENERGY_UPDATE) { buf[8] = ' '; buf[9] = ' '; - if (!watch_tick_animation_is_running()) { watch_start_tick_animation(500); } + if (!watch_sleep_animation_is_running()) { watch_start_sleep_animation(500); } } // Update the display with our decimal time diff --git a/movement/watch_faces/clock/mars_time_face.c b/movement/watch_faces/clock/mars_time_face.c index f16e71f4..cb49ac96 100644 --- a/movement/watch_faces/clock/mars_time_face.c +++ b/movement/watch_faces/clock/mars_time_face.c @@ -144,7 +144,7 @@ bool mars_time_face_loop(movement_event_t event, void *context) { break; case EVENT_LOW_ENERGY_UPDATE: // TODO: low energy update - // watch_start_tick_animation(500); + // watch_start_sleep_animation(500); break; case EVENT_LIGHT_BUTTON_DOWN: // don't light up every time light is hit diff --git a/movement/watch_faces/clock/minimal_clock_face.c b/movement/watch_faces/clock/minimal_clock_face.c index 2cb2bb0a..bccd1153 100644 --- a/movement/watch_faces/clock/minimal_clock_face.c +++ b/movement/watch_faces/clock/minimal_clock_face.c @@ -85,7 +85,7 @@ bool minimal_clock_face_loop(movement_event_t event, void *context) { // If you did not resign in EVENT_TIMEOUT, you can use this event to update the display once a minute. // Avoid displaying fast-updating values like seconds, since the display won't update again for 60 seconds. // You should also consider starting the tick animation, to show the wearer that this is sleep mode: - // watch_start_tick_animation(500); + // watch_start_sleep_animation(500); _minimal_clock_face_update_display(); break; default: diff --git a/movement/watch_faces/clock/minute_repeater_decimal_face.c b/movement/watch_faces/clock/minute_repeater_decimal_face.c index 79ba6175..1ce02def 100644 --- a/movement/watch_faces/clock/minute_repeater_decimal_face.c +++ b/movement/watch_faces/clock/minute_repeater_decimal_face.c @@ -80,7 +80,7 @@ void minute_repeater_decimal_face_setup(uint8_t watch_face_index, void ** contex void minute_repeater_decimal_face_activate(void *context) { minute_repeater_decimal_state_t *state = (minute_repeater_decimal_state_t *)context; - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); if (movement_clock_mode_24h()) watch_set_indicator(WATCH_INDICATOR_24H); @@ -149,7 +149,7 @@ bool minute_repeater_decimal_face_loop(movement_event_t event, void *context) { } pos = 0; if (event.event_type == EVENT_LOW_ENERGY_UPDATE) { - if (!watch_tick_animation_is_running()) watch_start_tick_animation(500); + if (!watch_sleep_animation_is_running()) watch_start_sleep_animation(500); sprintf(buf, "%s%2d%2d%02d ", watch_utility_get_weekday(date_time), date_time.unit.day, date_time.unit.hour, date_time.unit.minute); } else { sprintf(buf, "%s%2d%2d%02d%02d", watch_utility_get_weekday(date_time), date_time.unit.day, date_time.unit.hour, date_time.unit.minute, date_time.unit.second); diff --git a/movement/watch_faces/clock/repetition_minute_face.c b/movement/watch_faces/clock/repetition_minute_face.c index 48bfcdbf..04fa8594 100644 --- a/movement/watch_faces/clock/repetition_minute_face.c +++ b/movement/watch_faces/clock/repetition_minute_face.c @@ -65,7 +65,7 @@ void repetition_minute_face_setup(uint8_t watch_face_index, void ** context_ptr) void repetition_minute_face_activate(void *context) { repetition_minute_state_t *state = (repetition_minute_state_t *)context; - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); if (movement_clock_mode_24h()) watch_set_indicator(WATCH_INDICATOR_24H); @@ -134,7 +134,7 @@ bool repetition_minute_face_loop(movement_event_t event, void *context) { } pos = 0; if (event.event_type == EVENT_LOW_ENERGY_UPDATE) { - if (!watch_tick_animation_is_running()) watch_start_tick_animation(500); + if (!watch_sleep_animation_is_running()) watch_start_sleep_animation(500); sprintf(buf, "%s%2d%2d%02d ", watch_utility_get_weekday(date_time), date_time.unit.day, date_time.unit.hour, date_time.unit.minute); } else { sprintf(buf, "%s%2d%2d%02d%02d", watch_utility_get_weekday(date_time), date_time.unit.day, date_time.unit.hour, date_time.unit.minute, date_time.unit.second); diff --git a/movement/watch_faces/clock/simple_clock_bin_led_face.c b/movement/watch_faces/clock/simple_clock_bin_led_face.c index 3729a50c..5ac93dd7 100644 --- a/movement/watch_faces/clock/simple_clock_bin_led_face.c +++ b/movement/watch_faces/clock/simple_clock_bin_led_face.c @@ -57,7 +57,7 @@ void simple_clock_bin_led_face_setup(uint8_t watch_face_index, void ** context_p void simple_clock_bin_led_face_activate(void *context) { simple_clock_bin_led_state_t *state = (simple_clock_bin_led_state_t *)context; - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); if (movement_clock_mode_24h()) watch_set_indicator(WATCH_INDICATOR_24H); @@ -160,7 +160,7 @@ bool simple_clock_bin_led_face_loop(movement_event_t event, void *context) { } pos = 0; if (event.event_type == EVENT_LOW_ENERGY_UPDATE) { - if (!watch_tick_animation_is_running()) watch_start_tick_animation(500); + if (!watch_sleep_animation_is_running()) watch_start_sleep_animation(500); sprintf(buf, "%s%2d%2d%02d ", watch_utility_get_weekday(date_time), date_time.unit.day, date_time.unit.hour, date_time.unit.minute); } else { sprintf(buf, "%s%2d%2d%02d%02d", watch_utility_get_weekday(date_time), date_time.unit.day, date_time.unit.hour, date_time.unit.minute, date_time.unit.second); diff --git a/movement/watch_faces/clock/weeknumber_clock_face.c b/movement/watch_faces/clock/weeknumber_clock_face.c index 90c909a9..060191dd 100644 --- a/movement/watch_faces/clock/weeknumber_clock_face.c +++ b/movement/watch_faces/clock/weeknumber_clock_face.c @@ -47,7 +47,7 @@ void weeknumber_clock_face_setup(uint8_t watch_face_index, void ** context_ptr) void weeknumber_clock_face_activate(void *context) { weeknumber_clock_state_t *state = (weeknumber_clock_state_t *)context; - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); if (movement_clock_mode_24h()) watch_set_indicator(WATCH_INDICATOR_24H); @@ -111,7 +111,7 @@ bool weeknumber_clock_face_loop(movement_event_t event, void *context) { } pos = 0; if (event.event_type == EVENT_LOW_ENERGY_UPDATE) { - if (!watch_tick_animation_is_running()) watch_start_tick_animation(500); + if (!watch_sleep_animation_is_running()) watch_start_sleep_animation(500); sprintf(buf, "%s%2d%2d%02d ", watch_utility_get_weekday(date_time), date_time.unit.day, date_time.unit.hour, date_time.unit.minute); } else { sprintf(buf, "%s%2d%2d%02d%02d", watch_utility_get_weekday(date_time), date_time.unit.day, date_time.unit.hour, date_time.unit.minute, watch_utility_get_weeknumber(date_time.unit.year, date_time.unit.month, date_time.unit.day)); diff --git a/movement/watch_faces/clock/world_clock2_face.c b/movement/watch_faces/clock/world_clock2_face.c index 22ae2024..5dca9267 100644 --- a/movement/watch_faces/clock/world_clock2_face.c +++ b/movement/watch_faces/clock/world_clock2_face.c @@ -139,8 +139,8 @@ void world_clock2_face_activate(void *context) { world_clock2_state_t *state = (world_clock2_state_t *) context; - if (watch_tick_animation_is_running()) - watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) + watch_stop_sleep_animation(); switch (state->current_mode) { case WORLD_CLOCK2_MODE_DISPLAY: @@ -210,8 +210,8 @@ static bool mode_display(movement_event_t event, world_clock2_state_t *state) pos = 0; if (event.event_type == EVENT_LOW_ENERGY_UPDATE) { - if (!watch_tick_animation_is_running()) - watch_start_tick_animation(500); + if (!watch_sleep_animation_is_running()) + watch_start_sleep_animation(500); sprintf(buf, "%.2s%2d%2d%02d ", zone_names[state->current_zone], diff --git a/movement/watch_faces/complication/activity_face.c b/movement/watch_faces/complication/activity_face.c index 59699c85..063f03b5 100644 --- a/movement/watch_faces/complication/activity_face.c +++ b/movement/watch_faces/complication/activity_face.c @@ -697,7 +697,7 @@ bool activity_face_loop(movement_event_t event, void *context) { } else { _activity_update_logging_screen(state); - watch_start_tick_animation(500); + watch_start_sleep_animation(500); } break; default: diff --git a/movement/watch_faces/complication/couch_to_5k_face.c b/movement/watch_faces/complication/couch_to_5k_face.c index 10103a76..37efa80f 100644 --- a/movement/watch_faces/complication/couch_to_5k_face.c +++ b/movement/watch_faces/complication/couch_to_5k_face.c @@ -228,7 +228,7 @@ bool couch_to_5k_face_loop(movement_event_t event, // fast-updating values like seconds, since the display won't // update again for 60 seconds. You should also consider starting // the tick animation, to show the wearer that this is sleep mode: - // watch_start_tick_animation(500); + // watch_start_sleep_animation(500); break; default: // Movement's default loop handler will step in for any cases you diff --git a/movement/watch_faces/complication/menstrual_cycle_face.c b/movement/watch_faces/complication/menstrual_cycle_face.c index 42334050..2ef2a89b 100644 --- a/movement/watch_faces/complication/menstrual_cycle_face.c +++ b/movement/watch_faces/complication/menstrual_cycle_face.c @@ -324,8 +324,8 @@ bool menstrual_cycle_face_loop(movement_event_t event, void *context) { state->current_page = current_page; state->days_prev_period = 0; watch_clear_indicator(WATCH_INDICATOR_BELL); - if (watch_tick_animation_is_running()) - watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) + watch_stop_sleep_animation(); break; case EVENT_ALARM_LONG_PRESS: switch (current_page) { @@ -445,8 +445,8 @@ bool menstrual_cycle_face_loop(movement_event_t event, void *context) { break; case first_period: if (state->dates.reg) { - if (!watch_tick_animation_is_running()) - watch_start_tick_animation(500); // Tracking activated + if (!watch_sleep_animation_is_running()) + watch_start_sleep_animation(500); // Tracking activated } else if (event.subsecond % 5) { // blink active for 3 quarter-seconds sprintf(buf, "%2d", state->days_prev_period); diff --git a/movement/watch_faces/complication/moon_phase_face.c b/movement/watch_faces/complication/moon_phase_face.c index 5f99a30c..7729fed7 100644 --- a/movement/watch_faces/complication/moon_phase_face.c +++ b/movement/watch_faces/complication/moon_phase_face.c @@ -151,7 +151,7 @@ bool moon_phase_face_loop(movement_event_t event, void *context) { state->offset = 0; // finally: clear out the last two digits and replace them with the sleep mode indicator watch_display_string(" ", 8); - if (!watch_tick_animation_is_running()) watch_start_tick_animation(1000); + if (!watch_sleep_animation_is_running()) watch_start_sleep_animation(1000); break; case EVENT_ALARM_BUTTON_UP: // Pressing the alarm adds an offset of one day to the displayed value, diff --git a/movement/watch_faces/complication/periodic_face.c b/movement/watch_faces/complication/periodic_face.c index b6a10c2c..82a34428 100644 --- a/movement/watch_faces/complication/periodic_face.c +++ b/movement/watch_faces/complication/periodic_face.c @@ -483,7 +483,7 @@ bool periodic_face_loop(movement_event_t event, void *context) case EVENT_LOW_ENERGY_UPDATE: // Display static title and tick animation during LE watch_display_string("Pd Table", 0); - watch_start_tick_animation(500); + watch_start_sleep_animation(500); break; default: return movement_default_loop_handler(event); diff --git a/movement/watch_faces/complication/planetary_hours_face.c b/movement/watch_faces/complication/planetary_hours_face.c index 6d5d9987..73cf747d 100644 --- a/movement/watch_faces/complication/planetary_hours_face.c +++ b/movement/watch_faces/complication/planetary_hours_face.c @@ -343,7 +343,7 @@ void planetary_hours_face_setup(uint8_t watch_face_index, void ** context_ptr) { } void planetary_hours_face_activate(void *context) { - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); #if __EMSCRIPTEN__ int16_t browser_lat = EM_ASM_INT({ return lat; }); diff --git a/movement/watch_faces/complication/planetary_time_face.c b/movement/watch_faces/complication/planetary_time_face.c index d7b2d611..d0ed3df4 100644 --- a/movement/watch_faces/complication/planetary_time_face.c +++ b/movement/watch_faces/complication/planetary_time_face.c @@ -279,7 +279,7 @@ void planetary_time_face_setup(uint8_t watch_face_index, void ** context_ptr) { } void planetary_time_face_activate(void *context) { - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); #if __EMSCRIPTEN__ int16_t browser_lat = EM_ASM_INT({ return lat; }); @@ -319,7 +319,7 @@ bool planetary_time_face_loop(movement_event_t event, void *context) { state->day_ruler = !state->day_ruler; break; case EVENT_LOW_ENERGY_UPDATE: - watch_start_tick_animation(500); + watch_start_sleep_animation(500); break; default: return movement_default_loop_handler(event); diff --git a/movement/watch_faces/complication/randonaut_face.c b/movement/watch_faces/complication/randonaut_face.c index d070555a..fd9ca5d3 100644 --- a/movement/watch_faces/complication/randonaut_face.c +++ b/movement/watch_faces/complication/randonaut_face.c @@ -168,7 +168,7 @@ bool randonaut_face_loop(movement_event_t event, void *context) { // If you did not resign in EVENT_TIMEOUT, you can use this event to update the display once a minute. // Avoid displaying fast-updating values like seconds, since the display won't update again for 60 seconds. // You should also consider starting the tick animation, to show the wearer that this is sleep mode: - // watch_start_tick_animation(500); + // watch_start_sleep_animation(500); break; default: // Movement's default loop handler will step in for any cases you don't handle above: diff --git a/movement/watch_faces/complication/stopwatch_face.c b/movement/watch_faces/complication/stopwatch_face.c index fc9550fa..ecaba019 100644 --- a/movement/watch_faces/complication/stopwatch_face.c +++ b/movement/watch_faces/complication/stopwatch_face.c @@ -77,7 +77,7 @@ static void _stopwatch_face_update_display(stopwatch_state_t *stopwatch_state, b } void stopwatch_face_activate(void *context) { - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); stopwatch_state_t *stopwatch_state = (stopwatch_state_t *)context; if (stopwatch_state->running) { @@ -143,7 +143,7 @@ bool stopwatch_face_loop(movement_event_t event, void *context) { // explicitly ignore the timeout event so we stay on screen break; case EVENT_LOW_ENERGY_UPDATE: - if (!watch_tick_animation_is_running()) watch_start_tick_animation(1000); + if (!watch_sleep_animation_is_running()) watch_start_sleep_animation(1000); if (!stopwatch_state->running) { // since the tick animation is running, displaying the stopped time could be misleading, // as it could imply that the stopwatch is running. instead, show a blank display to diff --git a/movement/watch_faces/complication/sunrise_sunset_face.c b/movement/watch_faces/complication/sunrise_sunset_face.c index fa300cf9..87d82267 100644 --- a/movement/watch_faces/complication/sunrise_sunset_face.c +++ b/movement/watch_faces/complication/sunrise_sunset_face.c @@ -300,7 +300,7 @@ void sunrise_sunset_face_setup(uint8_t watch_face_index, void ** context_ptr) { } void sunrise_sunset_face_activate(void *context) { - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); #if __EMSCRIPTEN__ int16_t browser_lat = EM_ASM_INT({ @@ -335,7 +335,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, void *context) { case EVENT_TICK: if (state->page == 0) { // if entering low energy mode, start tick animation - if (event.event_type == EVENT_LOW_ENERGY_UPDATE && !watch_tick_animation_is_running()) watch_start_tick_animation(1000); + if (event.event_type == EVENT_LOW_ENERGY_UPDATE && !watch_sleep_animation_is_running()) watch_start_sleep_animation(1000); // check if we need to update the display watch_date_time date_time = watch_rtc_get_date_time(); if (date_time.reg >= state->rise_set_expires.reg) { diff --git a/movement/watch_faces/complication/tachymeter_face.c b/movement/watch_faces/complication/tachymeter_face.c index 84748b89..8ed9b6e6 100644 --- a/movement/watch_faces/complication/tachymeter_face.c +++ b/movement/watch_faces/complication/tachymeter_face.c @@ -245,7 +245,7 @@ bool tachymeter_face_loop(movement_event_t event, void *context) { // If you did not resign in EVENT_TIMEOUT, you can use this event to update the display once a minute. // Avoid displaying fast-updating values like seconds, since the display won't update again for 60 seconds. // You should also consider starting the tick animation, to show the wearer that this is sleep mode: - // watch_start_tick_animation(500); + // watch_start_sleep_animation(500); break; case EVENT_LIGHT_BUTTON_DOWN: // don't light up every time light is hit diff --git a/movement/watch_faces/complication/wareki_face.c b/movement/watch_faces/complication/wareki_face.c index ce9777b2..79d8f637 100644 --- a/movement/watch_faces/complication/wareki_face.c +++ b/movement/watch_faces/complication/wareki_face.c @@ -58,7 +58,7 @@ void wareki_activate(void *context) { wareki_state_t *state = (wareki_state_t *)context; - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); state->active = false; @@ -198,7 +198,7 @@ bool wareki_loop(movement_event_t event, void *context) { // If you did not resign in EVENT_TIMEOUT, you can use this event to update the display once a minute. // Avoid displaying fast-updating values like seconds, since the display won't update again for 60 seconds. // You should also consider starting the tick animation, to show the wearer that this is sleep mode: - // watch_start_tick_animation(500); + // watch_start_sleep_animation(500); //break; default: // Movement's default loop handler will step in for any cases you don't handle above: diff --git a/movement/watch_faces/demo/frequency_correction_face.c b/movement/watch_faces/demo/frequency_correction_face.c index 916f1353..badd327e 100644 --- a/movement/watch_faces/demo/frequency_correction_face.c +++ b/movement/watch_faces/demo/frequency_correction_face.c @@ -117,7 +117,7 @@ bool frequency_correction_face_loop(movement_event_t event, void *context) { case EVENT_TIMEOUT: break; case EVENT_LOW_ENERGY_UPDATE: - watch_start_tick_animation(500); + watch_start_sleep_animation(500); break; default: movement_default_loop_handler(event); diff --git a/movement/watch_faces/demo/voltage_face.c b/movement/watch_faces/demo/voltage_face.c index 75f4adb0..2d209d2d 100644 --- a/movement/watch_faces/demo/voltage_face.c +++ b/movement/watch_faces/demo/voltage_face.c @@ -66,9 +66,9 @@ bool voltage_face_loop(movement_event_t event, void *context) { break; case EVENT_LOW_ENERGY_UPDATE: // clear seconds area and start tick animation if necessary - if (!watch_tick_animation_is_running()) { + if (!watch_sleep_animation_is_running()) { watch_display_string(" ", 8); - watch_start_tick_animation(1000); + watch_start_sleep_animation(1000); } // update once an hour if (date_time.unit.minute == 0) { diff --git a/movement/watch_faces/sensor/alarm_thermometer_face.c b/movement/watch_faces/sensor/alarm_thermometer_face.c index 63e6a8a4..62b0c884 100644 --- a/movement/watch_faces/sensor/alarm_thermometer_face.c +++ b/movement/watch_faces/sensor/alarm_thermometer_face.c @@ -128,11 +128,11 @@ bool alarm_thermometer_face_loop(movement_event_t event, void *context) { } break; case EVENT_LOW_ENERGY_UPDATE: - if (!watch_tick_animation_is_running()) { + if (!watch_sleep_animation_is_running()) { state->mode = MODE_NORMAL; watch_clear_indicator(WATCH_INDICATOR_BELL); watch_clear_indicator(WATCH_INDICATOR_SIGNAL); - watch_start_tick_animation(1000); + watch_start_sleep_animation(1000); } if (watch_rtc_get_date_time().unit.minute % 5 == 0) { _alarm_thermometer_face_update(movement_use_imperial_units()); diff --git a/movement/watch_faces/sensor/thermistor_readout_face.c b/movement/watch_faces/sensor/thermistor_readout_face.c index 32df0d13..bbd120f3 100644 --- a/movement/watch_faces/sensor/thermistor_readout_face.c +++ b/movement/watch_faces/sensor/thermistor_readout_face.c @@ -76,9 +76,9 @@ bool thermistor_readout_face_loop(movement_event_t event, void *context) { break; case EVENT_LOW_ENERGY_UPDATE: // clear seconds area and start tick animation if necessary - if (!watch_tick_animation_is_running()) { + if (!watch_sleep_animation_is_running()) { watch_display_string(" ", 8); - watch_start_tick_animation(1000); + watch_start_sleep_animation(1000); } // update every 5 minutes if (date_time.unit.minute % 5 == 0) { diff --git a/movement/watch_faces/settings/finetune_face.c b/movement/watch_faces/settings/finetune_face.c index 0d225ca2..da26c2f6 100644 --- a/movement/watch_faces/settings/finetune_face.c +++ b/movement/watch_faces/settings/finetune_face.c @@ -217,7 +217,7 @@ bool finetune_face_loop(movement_event_t event, void *context) { // If you did not resign in EVENT_TIMEOUT, you can use this event to update the display once a minute. // Avoid displaying fast-updating values like seconds, since the display won't update again for 60 seconds. // You should also consider starting the tick animation, to show the wearer that this is sleep mode: - // watch_start_tick_animation(500); + // watch_start_sleep_animation(500); break; case EVENT_LIGHT_BUTTON_DOWN: diff --git a/movement/watch_faces/settings/nanosec_face.c b/movement/watch_faces/settings/nanosec_face.c index 965fdc6b..23ff1040 100644 --- a/movement/watch_faces/settings/nanosec_face.c +++ b/movement/watch_faces/settings/nanosec_face.c @@ -318,7 +318,7 @@ bool nanosec_face_loop(movement_event_t event, void *context) { // If you did not resign in EVENT_TIMEOUT, you can use this event to update the display once a minute. // Avoid displaying fast-updating values like seconds, since the display won't update again for 60 seconds. // You should also consider starting the tick animation, to show the wearer that this is sleep mode: - // watch_start_tick_animation(500); + // watch_start_sleep_animation(500); break; case EVENT_BACKGROUND_TASK: // Here we measure temperature and do main frequency correction diff --git a/watch-faces/clock/beats_face.c b/watch-faces/clock/beats_face.c index e6c68610..f0e34a98 100644 --- a/watch-faces/clock/beats_face.c +++ b/watch-faces/clock/beats_face.c @@ -72,7 +72,7 @@ bool beats_face_loop(movement_event_t event, void *context) { watch_display_text(WATCH_POSITION_BOTTOM, buf); break; case EVENT_LOW_ENERGY_UPDATE: - if (!watch_tick_animation_is_running()) watch_start_tick_animation(432); + if (!watch_sleep_animation_is_running()) watch_start_sleep_animation(432); date_time = watch_rtc_get_date_time(); centibeats = clock2beats(date_time.unit.hour, date_time.unit.minute, date_time.unit.second, event.subsecond, movement_get_current_timezone_offset()); sprintf(buf, "%4lu ", centibeats / 100); diff --git a/watch-faces/clock/clock_face.c b/watch-faces/clock/clock_face.c index 4a5b78e6..f71a13be 100644 --- a/watch-faces/clock/clock_face.c +++ b/watch-faces/clock/clock_face.c @@ -199,14 +199,14 @@ static void clock_display_low_energy(watch_date_time date_time) { } static void clock_start_tick_tock_animation(void) { - if (!watch_tick_animation_is_running()) { - watch_start_tick_animation(500); + if (!watch_sleep_animation_is_running()) { + watch_start_sleep_animation(500); } } static void clock_stop_tick_tock_animation(void) { - if (watch_tick_animation_is_running()) { - watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) { + watch_stop_sleep_animation(); } } diff --git a/watch-faces/clock/simple_clock_face.c b/watch-faces/clock/simple_clock_face.c index c616c64f..e919f52b 100644 --- a/watch-faces/clock/simple_clock_face.c +++ b/watch-faces/clock/simple_clock_face.c @@ -48,7 +48,7 @@ void simple_clock_face_setup(uint8_t watch_face_index, void ** context_ptr) { void simple_clock_face_activate(void *context) { simple_clock_state_t *state = (simple_clock_state_t *)context; - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); if (movement_clock_mode_24h()) watch_set_indicator(WATCH_INDICATOR_24H); @@ -122,7 +122,7 @@ bool simple_clock_face_loop(movement_event_t event, void *context) { watch_display_text(WATCH_POSITION_MINUTES, buf + 4); if (event.event_type == EVENT_LOW_ENERGY_UPDATE) { watch_display_character(' ', 9); - if (!watch_tick_animation_is_running()) watch_start_tick_animation(500); + if (!watch_sleep_animation_is_running()) watch_start_sleep_animation(500); } else { watch_display_text(WATCH_POSITION_SECONDS, buf + 6); } diff --git a/watch-faces/clock/world_clock_face.c b/watch-faces/clock/world_clock_face.c index 28adb4d5..5e34fd48 100644 --- a/watch-faces/clock/world_clock_face.c +++ b/watch-faces/clock/world_clock_face.c @@ -56,7 +56,7 @@ void world_clock_face_activate(void *context) { state->current_screen = 0; _update_timezone_offset(state); - if (watch_tick_animation_is_running()) watch_stop_tick_animation(); + if (watch_sleep_animation_is_running()) watch_stop_sleep_animation(); } static bool world_clock_face_do_display_mode(movement_event_t event, world_clock_state_t *state) { @@ -108,7 +108,7 @@ static bool world_clock_face_do_display_mode(movement_event_t event, world_clock watch_display_text(WATCH_POSITION_HOURS, buf + 2); watch_display_text(WATCH_POSITION_MINUTES, buf + 4); if (event.event_type == EVENT_LOW_ENERGY_UPDATE) { - if (!watch_tick_animation_is_running()) watch_start_tick_animation(500); + if (!watch_sleep_animation_is_running()) watch_start_sleep_animation(500); } else { watch_display_text(WATCH_POSITION_SECONDS, buf + 6); } diff --git a/watch-library/hardware/watch/watch_slcd.c b/watch-library/hardware/watch/watch_slcd.c index f51d37f3..ad47b3a4 100644 --- a/watch-library/hardware/watch/watch_slcd.c +++ b/watch-library/hardware/watch/watch_slcd.c @@ -116,7 +116,7 @@ void watch_stop_blink(void) { slcd_set_blink_enabled(false); } -void watch_start_tick_animation(uint32_t duration) { +void watch_start_sleep_animation(uint32_t duration) { #ifdef USE_CUSTOM_LCD (void) duration; watch_set_indicator(WATCH_INDICATOR_SLEEP); @@ -140,12 +140,12 @@ void watch_start_tick_animation(uint32_t duration) { #endif } -bool watch_tick_animation_is_running(void) { +bool watch_sleep_animation_is_running(void) { // TODO: wrap this in gossamer call return SLCD->CTRLD.bit.CSREN; } -void watch_stop_tick_animation(void) { +void watch_stop_sleep_animation(void) { #ifdef USE_CUSTOM_LCD watch_clear_indicator(WATCH_INDICATOR_SLEEP); #else diff --git a/watch-library/shared/watch/watch_slcd.h b/watch-library/shared/watch/watch_slcd.h index 7c736526..d004e06a 100644 --- a/watch-library/shared/watch/watch_slcd.h +++ b/watch-library/shared/watch/watch_slcd.h @@ -219,15 +219,15 @@ void watch_stop_blink(void); * Sleep mode, since that mode turns off the LCD). * @param duration The duration of each frame in ms. 500 milliseconds produces a classic tick/tock. */ -void watch_start_tick_animation(uint32_t duration); +void watch_start_sleep_animation(uint32_t duration); /** @brief Checks if the tick animation is currently running. * @return true if the animation is running; false otherwise. */ -bool watch_tick_animation_is_running(void); +bool watch_sleep_animation_is_running(void); /** @brief Stops the tick/tock animation and clears all animating segments. * @details This will stop the animation and clear all segments in position 8. */ -void watch_stop_tick_animation(void); +void watch_stop_sleep_animation(void); /// @} diff --git a/watch-library/simulator/watch/watch_slcd.c b/watch-library/simulator/watch/watch_slcd.c index 5c5a936f..f8a72fda 100644 --- a/watch-library/simulator/watch/watch_slcd.c +++ b/watch-library/simulator/watch/watch_slcd.c @@ -96,7 +96,7 @@ static void watch_invoke_tick_callback(void *userData) { } } -void watch_start_tick_animation(uint32_t duration) { +void watch_start_sleep_animation(uint32_t duration) { if (tick_interval_id != -1) return; watch_display_character(' ', 8); @@ -104,11 +104,11 @@ void watch_start_tick_animation(uint32_t duration) { tick_interval_id = emscripten_set_interval(watch_invoke_tick_callback, (double)duration, NULL); } -bool watch_tick_animation_is_running(void) { +bool watch_sleep_animation_is_running(void) { return tick_interval_id != -1; } -void watch_stop_tick_animation(void) { +void watch_stop_sleep_animation(void) { emscripten_clear_timeout(tick_interval_id); tick_interval_id = -1; tick_state = false;