]> git.earman.xyz Git - sensor-watch.git/commitdiff
stuff parameters into the bits we're not using
authorJoey Castillo <joeycastillo@utexas.edu>
Sat, 19 Feb 2022 18:28:09 +0000 (13:28 -0500)
committerJoey Castillo <joeycastillo@utexas.edu>
Sat, 19 Feb 2022 18:28:09 +0000 (13:28 -0500)
movement/watch_faces/sensor/accelerometer_data_acquisition_face.c
movement/watch_faces/sensor/accelerometer_data_acquisition_face.h

index d16ea0d3cdf28cd06096be6f77a6360eba6a9993..d965ec2e5c0fecf348f1785d7e713a7d402b45b5 100644 (file)
@@ -31,6 +31,7 @@ static const char activity_types[][3] = {
     "SL",   // Sleeping
     "WH",   // Washing Hands
     "WA",   // Walking
+    "WB",   // Walking with Beverage
     "JO",   // Jogging
     "RU",   // Running
     "BI",   // Biking
index a8c74cccb790bc637418dcbc6ed4cf45e7e0edbc..b3fdbbd7bb185d90a5ebf020d4b602a1726f9864 100644 (file)
 
 typedef union {
     struct {
-        int16_t temperature_and_type : 16; // high two bits are record type, val & 0xFFF is temperature
+        union {
+            int16_t record_type : 2;
+            int16_t range : 2;
+            int16_t temperature : 12;
+        } info;
         int8_t char1 : 8;
         int8_t char2 : 8;
         int32_t timestamp : 32;
     } header;
     struct {
-        int16_t x_accel_and_type : 16;   // high two bits are record type, val & 0x3FFF is x_accel
-        int16_t y_accel : 16;
-        int16_t z_accel : 16;
+        union {
+            int16_t mode : 2;
+            int16_t accel : 14;
+        } x;
+        union {
+            int16_t lpmode : 2;
+            int16_t accel : 14;
+        } y;
+        union {
+            int16_t filter : 2;
+            int16_t accel : 14;
+        } z;
         int32_t counter : 16;
     } data;
     uint64_t value;