]> git.earman.xyz Git - sensor-watch.git/commitdiff
activity log: update today's count at top of minute
authorJoey Castillo <joeycastillo@utexas.edu>
Sun, 18 May 2025 16:06:39 +0000 (12:06 -0400)
committerJoey Castillo <joeycastillo@utexas.edu>
Sun, 18 May 2025 17:29:45 +0000 (13:29 -0400)
watch-faces/sensor/activity_logging_face.c

index dddbc5af0ee3daf20ca62e2f366f39bb06b37681..3de3b51276686b48214076d4674bb3a9630767ac 100644 (file)
@@ -93,6 +93,13 @@ bool activity_logging_face_loop(movement_event_t event, void *context) {
             }
             _activity_logging_face_update_display(state);
             break;
+        case EVENT_TICK:
+            {
+                if (movement_get_local_date_time().unit.second == 0 && state->display_index == 0) {
+                    _activity_logging_face_update_display(state);
+                }
+            }
+            break;
         case EVENT_BACKGROUND_TASK:
             {
                 size_t pos = state->data_points % ACTIVITY_LOGGING_NUM_DAYS;