]> git.earman.xyz Git - sensor-watch.git/commitdiff
movement: fix yesterday's bug that was keeping us awake
authorJoey Castillo <joeycastillo@utexas.edu>
Tue, 30 Nov 2021 15:23:20 +0000 (10:23 -0500)
committerJoey Castillo <joeycastillo@utexas.edu>
Tue, 30 Nov 2021 15:23:20 +0000 (10:23 -0500)
movement/movement.c

index 71707bfa166c707211dc01237e5826d24000ba48..2ac31a966c5c3bd2a73b64e2d05e81a3e341ee20 100644 (file)
@@ -290,7 +290,7 @@ bool app_loop() {
 
     event.subsecond = 0;
 
-    return can_sleep && (movement_state.light_ticks == 0) && !movement_state.is_buzzing;
+    return can_sleep && (movement_state.light_ticks == -1) && !movement_state.is_buzzing;
 }
 
 movement_event_type_t _figure_out_button_event(bool pin_level, movement_event_type_t button_down_event_type, uint8_t *down_timestamp) {