summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoeycastillo <joeycastillo@utexas.edu>2022-11-29 13:39:14 -0600
committerjoeycastillo <joeycastillo@utexas.edu>2022-11-29 13:39:14 -0600
commit41d9b00ba64fffd7c5506f093579025fc99a5253 (patch)
tree830664d4905112ea59d5cecbc5d31e68f1a6a509
parent967da2465a5d2c90f2cfc82c20a5b420b795d65c (diff)
downloadSensor-Watch-41d9b00ba64fffd7c5506f093579025fc99a5253.tar.gz
Sensor-Watch-41d9b00ba64fffd7c5506f093579025fc99a5253.tar.bz2
Sensor-Watch-41d9b00ba64fffd7c5506f093579025fc99a5253.zip
sunrise/set: return home if no location set
-rw-r--r--movement/watch_faces/complication/sunrise_sunset_face.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/movement/watch_faces/complication/sunrise_sunset_face.c b/movement/watch_faces/complication/sunrise_sunset_face.c
index 8bc18ddd..7807de83 100644
--- a/movement/watch_faces/complication/sunrise_sunset_face.c
+++ b/movement/watch_faces/complication/sunrise_sunset_face.c
@@ -381,8 +381,11 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
}
break;
case EVENT_TIMEOUT:
- if (state->page || state->rise_index) {
- // on timeout, exit settings mode and return to the next sunrise or sunset
+ if (watch_get_backup_data(1) == 0) {
+ // if no location set, return home
+ movement_move_to_face(0);
+ } else if (state->page || state->rise_index) {
+ // otherwise 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);