]> git.earman.xyz Git - sensor-watch.git/commitdiff
oops. activity tracking: high means stationary, low means active
authorJoey Castillo <joeycastillo@utexas.edu>
Sat, 17 May 2025 18:32:01 +0000 (14:32 -0400)
committerJoey Castillo <joeycastillo@utexas.edu>
Sat, 17 May 2025 18:32:01 +0000 (14:32 -0400)
watch-faces/sensor/activity_logging_face.c

index 12d9a5ea7b3f8f449257cfabb0e7548f540bfa55..3e585d8313c0cc1d39d80e7df6a76f70ed6e5433 100644 (file)
@@ -114,7 +114,7 @@ movement_watch_face_advisory_t activity_logging_face_advise(void *context) {
     activity_logging_state_t *state = (activity_logging_state_t *)context;
     movement_watch_face_advisory_t retval = { 0 };
 
-    if (HAL_GPIO_A4_read()) state->active_minutes_today++;
+    if (!HAL_GPIO_A4_read()) state->active_minutes_today++;
 
     watch_date_time_t datetime = movement_get_local_date_time();
     // request a background task at midnight to shuffle the data into the log