diff options
Diffstat (limited to 'movement/watch_faces/sensor/accelerometer_data_acquisition_face.h')
-rw-r--r-- | movement/watch_faces/sensor/accelerometer_data_acquisition_face.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/movement/watch_faces/sensor/accelerometer_data_acquisition_face.h b/movement/watch_faces/sensor/accelerometer_data_acquisition_face.h index f6ca8c5b..6da79f8b 100644 --- a/movement/watch_faces/sensor/accelerometer_data_acquisition_face.h +++ b/movement/watch_faces/sensor/accelerometer_data_acquisition_face.h @@ -34,29 +34,29 @@ typedef union { struct { - union { - int16_t record_type : 2; // see above, helps us identify record types when reading back - int16_t range : 2; // accelerometer range (see lis2dw_range_t) - int16_t temperature : 12; // raw value from the temperature sensor + struct { + uint16_t record_type : 2; // see above, helps us identify record types when reading back + uint16_t range : 2; // accelerometer range (see lis2dw_range_t) + uint16_t temperature : 12; // raw value from the temperature sensor } info; - int8_t char1 : 8; // First character of the activity type - int8_t char2 : 8; // Second character of the activity type - int32_t timestamp : 32; // UNIX timestamp for the measurement + uint8_t char1 : 8; // First character of the activity type + uint8_t char2 : 8; // Second character of the activity type + uint32_t timestamp : 32; // UNIX timestamp for the measurement } header; struct { - union { - int16_t record_type : 2; // duplicate; this is the same field as info above - int16_t accel : 14; // X acceleration value, raw + struct { + uint16_t record_type : 2; // duplicate; this is the same field as info above + uint16_t accel : 14; // X acceleration value, raw, offset by 16384 } x; - union { - int16_t lpmode : 2; // low power mode (see lis2dw_low_power_mode_t) - int16_t accel : 14; // Y acceleration value, raw + struct { + uint16_t lpmode : 2; // low power mode (see lis2dw_low_power_mode_t) + uint16_t accel : 14; // Y acceleration value, raw, offset by 16384 } y; - union { - int16_t filter : 2; // bandwidth filtering selection (see lis2dw_bandwidth_filtering_mode_t) - int16_t accel : 14; // Z acceleration value, raw + struct { + uint16_t filter : 2; // bandwidth filtering selection (see lis2dw_bandwidth_filtering_mode_t) + uint16_t accel : 14; // Z acceleration value, raw, offset by 16384 } z; - int32_t counter : 16; // number of seconds since timestamp in header + uint32_t counter : 16; // number of seconds since timestamp in header } data; uint64_t value; } accelerometer_data_acquisition_record_t; |