tick_animation is now sleep_animation (which just displays an indicator on new LCD)

This commit is contained in:
joeycastillo
2024-09-29 15:24:11 -04:00
parent 3795b8494a
commit 4b8b092594
36 changed files with 65 additions and 65 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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);

View File

@@ -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,

View File

@@ -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);

View File

@@ -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; });

View File

@@ -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);

View File

@@ -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:

View File

@@ -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

View File

@@ -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) {

View File

@@ -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

View File

@@ -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: