Driver debugging (scaling, ranges, endianess) MPU-6000 needs more love

This commit is contained in:
Lorenz Meier
2012-08-26 23:48:16 +02:00
parent 56e66a80cd
commit 2963dc679a
5 changed files with 129 additions and 60 deletions
+2 -2
View File
@@ -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;