From: Joey Castillo Date: Sat, 17 May 2025 18:32:01 +0000 (-0400) Subject: oops. activity tracking: high means stationary, low means active X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=a5131313b37c4cdcf9f6bf194952d9a977e464fe;p=sensor-watch.git oops. activity tracking: high means stationary, low means active --- diff --git a/watch-faces/sensor/activity_logging_face.c b/watch-faces/sensor/activity_logging_face.c index 12d9a5e..3e585d8 100644 --- a/watch-faces/sensor/activity_logging_face.c +++ b/watch-faces/sensor/activity_logging_face.c @@ -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