stuff parameters into the bits we're not using
This commit is contained in:
parent
9f0f72eb20
commit
691c068e6e
@ -31,6 +31,7 @@ static const char activity_types[][3] = {
|
|||||||
"SL", // Sleeping
|
"SL", // Sleeping
|
||||||
"WH", // Washing Hands
|
"WH", // Washing Hands
|
||||||
"WA", // Walking
|
"WA", // Walking
|
||||||
|
"WB", // Walking with Beverage
|
||||||
"JO", // Jogging
|
"JO", // Jogging
|
||||||
"RU", // Running
|
"RU", // Running
|
||||||
"BI", // Biking
|
"BI", // Biking
|
||||||
|
@ -34,15 +34,28 @@
|
|||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
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 char1 : 8;
|
||||||
int8_t char2 : 8;
|
int8_t char2 : 8;
|
||||||
int32_t timestamp : 32;
|
int32_t timestamp : 32;
|
||||||
} header;
|
} header;
|
||||||
struct {
|
struct {
|
||||||
int16_t x_accel_and_type : 16; // high two bits are record type, val & 0x3FFF is x_accel
|
union {
|
||||||
int16_t y_accel : 16;
|
int16_t mode : 2;
|
||||||
int16_t z_accel : 16;
|
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;
|
int32_t counter : 16;
|
||||||
} data;
|
} data;
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user