mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-22 19:20:30 +08:00
Made it so the code works with a completely empty preset list
This commit is contained in:
parent
84f0db0654
commit
51176344dc
|
@ -359,7 +359,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
|
||||||
_sunrise_sunset_face_update_location_register(state);
|
_sunrise_sunset_face_update_location_register(state);
|
||||||
}
|
}
|
||||||
_sunrise_sunset_face_update_settings_display(event, context);
|
_sunrise_sunset_face_update_settings_display(event, context);
|
||||||
} else if (_location_count == 1) {
|
} else if (_location_count <= 1) {
|
||||||
movement_illuminate_led();
|
movement_illuminate_led();
|
||||||
}
|
}
|
||||||
if (state->page == 0) {
|
if (state->page == 0) {
|
||||||
|
@ -368,7 +368,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, movement_settings_t *setti
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EVENT_LIGHT_LONG_PRESS:
|
case EVENT_LIGHT_LONG_PRESS:
|
||||||
if (_location_count == 1) break;
|
if (_location_count <= 1) break;
|
||||||
else if (!state->page) movement_illuminate_led();
|
else if (!state->page) movement_illuminate_led();
|
||||||
break;
|
break;
|
||||||
case EVENT_LIGHT_BUTTON_UP:
|
case EVENT_LIGHT_BUTTON_UP:
|
||||||
|
|
Loading…
Reference in a new issue