]> git.earman.xyz Git - sensor-watch.git/commitdiff
clock face: move state typedef to header for consistency
authorJoey Castillo <joeycastillo@utexas.edu>
Wed, 21 May 2025 02:35:16 +0000 (22:35 -0400)
committerJoey Castillo <joeycastillo@utexas.edu>
Wed, 21 May 2025 02:35:16 +0000 (22:35 -0400)
watch-faces/clock/clock_face.c
watch-faces/clock/clock_face.h

index 53aad95f2d04b79032fa20625332a4ba54974101..78d9d7008d9b1e8ba60c0aef1756c515fe2e454e 100644 (file)
 #define CLOCK_FACE_LOW_BATTERY_VOLTAGE_THRESHOLD 2400
 #endif
 
-typedef struct {
-    struct {
-        watch_date_time_t previous;
-    } date_time;
-    uint8_t last_battery_check;
-    uint8_t watch_face_index;
-    bool time_signal_enabled;
-    bool battery_low;
-} clock_state_t;
-
 static void clock_indicate(watch_indicator_t indicator, bool on) {
     if (on) {
         watch_set_indicator(indicator);
index 4ad33e157d90064f3b19d08f950913e1f8df99d4..bd0c384fcae4921d6ba36f365011cfac2999cca9 100644 (file)
 
 #include "movement.h"
 
+typedef struct {
+    struct {
+        watch_date_time_t previous;
+    } date_time;
+    uint8_t last_battery_check;
+    uint8_t watch_face_index;
+    bool time_signal_enabled;
+    bool battery_low;
+} clock_state_t;
+
 void clock_face_setup(uint8_t watch_face_index, void ** context_ptr);
 void clock_face_activate(void *context);
 bool clock_face_loop(movement_event_t event, void *context);