MindPX: Remove hardcode for sensors rotation.

This commit is contained in:
Henry Zhang
2016-10-29 10:56:32 +02:00
committed by Lorenz Meier
parent f17dc2f2a6
commit b280e28623
4 changed files with 16 additions and 75 deletions
-22
View File
@@ -1569,18 +1569,8 @@ LSM303D::measure()
* 74 from all measurements centers them around zero.
*/
accel_report.timestamp = hrt_absolute_time();
#if defined(CONFIG_ARCH_BOARD_MINDPX_V2)
int16_t tx = raw_accel_report.y;
int16_t ty = raw_accel_report.x;
int16_t tz = -raw_accel_report.z;
raw_accel_report.x = tx;
raw_accel_report.y = ty;
raw_accel_report.z = tz;
#endif
// use the temperature from the last mag reading
accel_report.temperature = _last_temperature;
@@ -1711,20 +1701,8 @@ LSM303D::mag_measure()
* 74 from all measurements centers them around zero.
*/
mag_report.timestamp = hrt_absolute_time();
#if defined(CONFIG_ARCH_BOARD_MINDPX_V2)
int16_t tx = raw_mag_report.y;
int16_t ty = raw_mag_report.x;
int16_t tz = -raw_mag_report.z;
raw_mag_report.x = tx;
raw_mag_report.y = ty;
raw_mag_report.z = tz;
#endif
mag_report.x_raw = raw_mag_report.x;
mag_report.y_raw = raw_mag_report.y;
mag_report.z_raw = raw_mag_report.z;