]> git.earman.xyz Git - sensor-watch.git/commitdiff
accelerometer: have been using a threshold of 8 for latest tests
authorJoey Castillo <joeycastillo@utexas.edu>
Mon, 16 Dec 2024 21:40:21 +0000 (16:40 -0500)
committerJoey Castillo <joeycastillo@utexas.edu>
Mon, 16 Dec 2024 21:41:26 +0000 (16:41 -0500)
movement.c
watch-faces/demo/accel_interrupt_count_face.c

index 8826ff01c7356883492f190404493e33b3d499e3..8fe408b37e54c1bfc3be30caa0c68947bc227b1e 100644 (file)
@@ -691,7 +691,7 @@ void app_setup(void) {
             lis2dw_enable_stationary_motion_detection();    // stationary/motion detection mode keeps the data rate at 1.6 Hz even in sleep
             lis2dw_set_range(LIS2DW_RANGE_2_G);             // Application note AN5038 recommends 2g range
             lis2dw_enable_sleep();                          // allow acceleromter to sleep and wake on activity
-            lis2dw_configure_wakeup_threshold(1);           // g threshold to wake up: (2 * FS / 64) where FS is "full scale" of ±2g.
+            lis2dw_configure_wakeup_threshold(8);           // g threshold to wake up: (2 * FS / 64) where FS is "full scale" of ±2g.
             lis2dw_configure_6d_threshold(3);               // 0-3 is 80, 70, 60, or 50 degrees. 50 is least precise, hopefully most sensitive?
 
             // set up interrupts:
index c82f67c73e04fb20ca26491068c357791443c200..53e1273c79ec51111b1f409322359557d317e143 100644 (file)
@@ -59,7 +59,7 @@ void accel_interrupt_count_face_setup(uint8_t watch_face_index, void ** context_
         memset(*context_ptr, 0, sizeof(accel_interrupt_count_state_t));
         accel_interrupt_count_state_t *state = (accel_interrupt_count_state_t *)*context_ptr;
         /// TODO: hook up to movement methods for tracking threshold
-        state->threshold = 1;
+        state->threshold = 8;
     }
 }