summaryrefslogtreecommitdiffstats
path: root/movement/movement.c
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2021-12-02 15:10:49 -0500
committerJoey Castillo <joeycastillo@utexas.edu>2021-12-02 15:10:49 -0500
commit77d3e5640fec1e4b4e6b2c82179f465b0d1e9f63 (patch)
tree60647ae0a4034a04db2be0c3e3d24dde5bd6c327 /movement/movement.c
parent8723c70033b8b62151a7fd25a7671ff2359b9d88 (diff)
downloadSensor-Watch-77d3e5640fec1e4b4e6b2c82179f465b0d1e9f63.tar.gz
Sensor-Watch-77d3e5640fec1e4b4e6b2c82179f465b0d1e9f63.tar.bz2
Sensor-Watch-77d3e5640fec1e4b4e6b2c82179f465b0d1e9f63.zip
movement: add option to always snap back to first watch face
Diffstat (limited to 'movement/movement.c')
-rw-r--r--movement/movement.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/movement/movement.c b/movement/movement.c
index 2ac31a96..b41700b0 100644
--- a/movement/movement.c
+++ b/movement/movement.c
@@ -265,10 +265,17 @@ bool app_loop() {
// if we have timed out of our timeout countdown, give the app a hint that they can resign.
if (movement_state.timeout_ticks == 0) {
movement_state.timeout_ticks = -1;
- event.event_type = EVENT_TIMEOUT;
+ if (movement_state.settings.bit.to_always == false) {
+ // if "timeout always" is false, give the current watch face a chance to exit gracefully...
+ event.event_type = EVENT_TIMEOUT;
+ }
event.subsecond = movement_state.subsecond;
watch_faces[movement_state.current_watch_face].loop(event, &movement_state.settings, watch_face_contexts[movement_state.current_watch_face]);
event.event_type = EVENT_NONE;
+ if (movement_state.settings.bit.to_always && movement_state.current_watch_face != 0) {
+ // ...but if the user has "timeout always" set, give it the boot.
+ movement_move_to_face(0);
+ }
}
// Now that we've handled all display update tasks, handle the alarm.