sunrise/set: return home if no location set
This commit is contained in:
parent
967da2465a
commit
41d9b00ba6
@ -381,8 +381,11 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EVENT_TIMEOUT:
|
case EVENT_TIMEOUT:
|
||||||
if (state->page || state->rise_index) {
|
if (watch_get_backup_data(1) == 0) {
|
||||||
// on timeout, exit settings mode and return to the next sunrise or sunset
|
// 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->page = 0;
|
||||||
state->rise_index = 0;
|
state->rise_index = 0;
|
||||||
movement_request_tick_frequency(1);
|
movement_request_tick_frequency(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user