]> git.earman.xyz Git - sensor-watch.git/commitdiff
ensure accelerometer test face always stays active
authorJoey Castillo <joeycastillo@utexas.edu>
Mon, 6 Dec 2021 04:56:09 +0000 (22:56 -0600)
committerJoey Castillo <joeycastillo@utexas.edu>
Mon, 6 Dec 2021 04:56:09 +0000 (22:56 -0600)
movement/watch_faces/demos/lis2dh_logging_face.c

index 12387a0b1dcf681910ddd7f0a893bff01c01e466..af82a0042a9f05c7945ec919bbc13281bcbe6e36 100644 (file)
@@ -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);