]> git.earman.xyz Git - sensor-watch.git/commitdiff
accelerometer: disable wake on motion, has awkward user experience
authorJoey Castillo <joeycastillo@utexas.edu>
Mon, 28 Apr 2025 22:24:14 +0000 (18:24 -0400)
committerJoey Castillo <joeycastillo@utexas.edu>
Mon, 28 Apr 2025 22:29:57 +0000 (18:29 -0400)
movement.c

index 160b8ba7a2741d0f9e36ae2af58796a92f084f5f..6f366b906fb0fa5a06e459a700e1ccf6ff7917a1 100644 (file)
@@ -746,7 +746,10 @@ void app_setup(void) {
             // a falling edge on INT2 indicates the accelerometer has woken up.
             lis2dw_configure_int2(LIS2DW_CTRL5_INT2_SLEEP_STATE | LIS2DW_CTRL5_INT2_SLEEP_CHG);
             HAL_GPIO_A4_in();
-            watch_register_extwake_callback(HAL_GPIO_A4_pin(), cb_accelerometer_wake, false);
+
+            // Wake on motion seemed like a good idea when the threshold was lower, but the UX makes less sense now.
+            // Still if you want to wake on motion, you can do it by uncommenting this line:
+            // watch_register_extwake_callback(HAL_GPIO_A4_pin(), cb_accelerometer_wake, false);
 
             lis2dw_enable_interrupts();
         }