diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-26 23:48:16 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-26 23:48:16 +0200 |
commit | 2963dc679a63309a7b26da1677208fbdb4aec146 (patch) | |
tree | 2cdf3f4968e98f7474bf4e10c3986893ed7dad6d /apps/sensors/sensors.cpp | |
parent | 56e66a80cdd5f0f09716ee503cdc2810e3e74a69 (diff) | |
download | px4-firmware-2963dc679a63309a7b26da1677208fbdb4aec146.tar.gz px4-firmware-2963dc679a63309a7b26da1677208fbdb4aec146.tar.bz2 px4-firmware-2963dc679a63309a7b26da1677208fbdb4aec146.zip |
Driver debugging (scaling, ranges, endianess) MPU-6000 needs more love
Diffstat (limited to 'apps/sensors/sensors.cpp')
-rw-r--r-- | apps/sensors/sensors.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/sensors/sensors.cpp b/apps/sensors/sensors.cpp index f75834ddf..f8baa285b 100644 --- a/apps/sensors/sensors.cpp +++ b/apps/sensors/sensors.cpp @@ -641,9 +641,9 @@ Sensors::gyro_poll(struct sensor_combined_s &raw) gyro_report.timestamp = hrt_absolute_time(); - gyro_report.x_raw = ((buf[1] == -32768) ? -32768 : buf[1]); + gyro_report.x_raw = buf[1]; gyro_report.y_raw = ((buf[0] == -32768) ? 32767 : -buf[0]); - gyro_report.z_raw = ((buf[2] == -32768) ? -32768 : buf[2]); + gyro_report.z_raw = buf[2]; /* scaling calculated as: raw * (1/(32768*(500/180*PI))) */ gyro_report.x = (gyro_report.x_raw - _parameters.gyro_offset[0]) * 0.000266316109f; |