summaryrefslogtreecommitdiffstats
path: root/movement
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2022-02-05 14:05:33 -0500
committerJoey Castillo <joeycastillo@utexas.edu>2022-02-05 14:05:33 -0500
commit70964357388096ab64c07c5d6f6944fc34c70059 (patch)
tree5766b1209ea7ea12f0f196848b62b6f90acbc7f9 /movement
parentf4bfe45b7c33ff1c286f7d2d80203ea332caa118 (diff)
downloadSensor-Watch-70964357388096ab64c07c5d6f6944fc34c70059.tar.gz
Sensor-Watch-70964357388096ab64c07c5d6f6944fc34c70059.tar.bz2
Sensor-Watch-70964357388096ab64c07c5d6f6944fc34c70059.zip
sunrise/sunset: improve timeout behavior
Diffstat (limited to 'movement')
-rw-r--r--movement/watch_faces/complication/sunrise_sunset_face.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/movement/watch_faces/complication/sunrise_sunset_face.c b/movement/watch_faces/complication/sunrise_sunset_face.c
index f3489ba4..56565cda 100644
--- a/movement/watch_faces/complication/sunrise_sunset_face.c
+++ b/movement/watch_faces/complication/sunrise_sunset_face.c
@@ -321,15 +321,21 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
case EVENT_ALARM_LONG_PRESS:
if (state->page == 0) {
state->page++;
+ state->active_digit = 0;
watch_clear_display();
movement_request_tick_frequency(4);
_sunrise_sunset_face_update_settings_display(event, context);
}
break;
case EVENT_TIMEOUT:
- if (state->page != 0) {
- movement_move_to_face(0);
+ if (state->page || state->rise_index) {
+ // on timeout, exit settings mode and return to the next sunrise or sunset
+ state->page = 0;
+ state->rise_index = 0;
+ movement_request_tick_frequency(1);
+ _sunrise_sunset_face_update(settings, state);
}
+ break;
default:
break;
}