summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2021-12-05 22:56:09 -0600
committerJoey Castillo <joeycastillo@utexas.edu>2021-12-05 22:56:09 -0600
commitc5400e437f919843e0235ed66f7840fd3ddf6ea0 (patch)
treec1fe345fd2b70b52873ba8ad22fd56699eab394d
parenteb66b67e8ea37f841105c31243c641a7382465d2 (diff)
downloadSensor-Watch-c5400e437f919843e0235ed66f7840fd3ddf6ea0.tar.gz
Sensor-Watch-c5400e437f919843e0235ed66f7840fd3ddf6ea0.tar.bz2
Sensor-Watch-c5400e437f919843e0235ed66f7840fd3ddf6ea0.zip
ensure accelerometer test face always stays active
-rw-r--r--movement/watch_faces/demos/lis2dh_logging_face.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/movement/watch_faces/demos/lis2dh_logging_face.c b/movement/watch_faces/demos/lis2dh_logging_face.c
index 12387a0b..af82a004 100644
--- a/movement/watch_faces/demos/lis2dh_logging_face.c
+++ b/movement/watch_faces/demos/lis2dh_logging_face.c
@@ -106,8 +106,12 @@ void lis2dh_logging_face_setup(movement_settings_t *settings, void ** context_pt
}
void lis2dh_logging_face_activate(movement_settings_t *settings, void *context) {
- (void) settings;
lis2dh_logger_state_t *logger_state = (lis2dh_logger_state_t *)context;
+ // force two settings: never enter low energy mode, and always snap back to screen 0.
+ // this assumes the accelerometer face is first in the watch_faces list.
+ settings->bit.le_interval = 0;
+ settings->bit.to_always = true;
+
logger_state->display_index = 0;
logger_state->log_ticks = 0;
watch_enable_digital_input(A1);