diff options
author | Mathias Agopian <mathias@google.com> | 2013-07-08 22:33:54 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-08 22:33:54 +0000 |
commit | ea83a4b7afa1e78ebcd4bf418967888260f5461a (patch) | |
tree | 0cc8454584b5123983fd8d7512d6d2f33dd0cb76 | |
parent | 2b286dab84b2a0524c1deed67fea92200e598c6e (diff) | |
parent | 27e16688ec7496e72304d093a24d9c1d4fd37be5 (diff) | |
download | hardware_libhardware-ea83a4b7afa1e78ebcd4bf418967888260f5461a.zip hardware_libhardware-ea83a4b7afa1e78ebcd4bf418967888260f5461a.tar.gz hardware_libhardware-ea83a4b7afa1e78ebcd4bf418967888260f5461a.tar.bz2 |
Merge "be more explicit about 64 bits values in sensor events"
-rw-r--r-- | include/hardware/sensors.h | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h index 7778e8f..f938d1b 100644 --- a/include/hardware/sensors.h +++ b/include/hardware/sensors.h @@ -761,45 +761,51 @@ typedef struct sensors_event_t { int64_t timestamp; union { - float data[16]; + union { + float data[16]; - /* acceleration values are in meter per second per second (m/s^2) */ - sensors_vec_t acceleration; + /* acceleration values are in meter per second per second (m/s^2) */ + sensors_vec_t acceleration; - /* magnetic vector values are in micro-Tesla (uT) */ - sensors_vec_t magnetic; + /* magnetic vector values are in micro-Tesla (uT) */ + sensors_vec_t magnetic; - /* orientation values are in degrees */ - sensors_vec_t orientation; + /* orientation values are in degrees */ + sensors_vec_t orientation; - /* gyroscope values are in rad/s */ - sensors_vec_t gyro; + /* gyroscope values are in rad/s */ + sensors_vec_t gyro; - /* temperature is in degrees centigrade (Celsius) */ - float temperature; + /* temperature is in degrees centigrade (Celsius) */ + float temperature; - /* distance in centimeters */ - float distance; + /* distance in centimeters */ + float distance; - /* light in SI lux units */ - float light; + /* light in SI lux units */ + float light; - /* pressure in hectopascal (hPa) */ - float pressure; + /* pressure in hectopascal (hPa) */ + float pressure; - /* relative humidity in percent */ - float relative_humidity; + /* relative humidity in percent */ + float relative_humidity; - /* step-counter */ - uint64_t step_counter; + /* uncalibrated gyroscope values are in rad/s */ + uncalibrated_event_t uncalibrated_gyro; - /* uncalibrated gyroscope values are in rad/s */ - uncalibrated_event_t uncalibrated_gyro; + /* uncalibrated magnetometer values are in micro-Teslas */ + uncalibrated_event_t uncalibrated_magnetic; + }; + + union { + uint64_t data[8]; - /* uncalibrated magnetometer values are in micro-Teslas */ - uncalibrated_event_t uncalibrated_magnetic; + /* step-counter */ + uint64_t step_counter; + } u64; }; - uint32_t reserved1[4]; + uint32_t reserved1[4]; } sensors_event_t; |