MPU6000: Flip Y and Z axes for SMACCM_HAL.

- The accelerometer is upside-down on the PX4FMU vs the APM2.
This commit is contained in:
James Bielman 2013-01-07 09:29:29 -08:00 committed by Pat Hickey
parent 1309b7332a
commit 8e38ef6567

View File

@ -171,12 +171,19 @@ const float AP_InertialSensor_MPU6000::_gyro_scale = (0.0174532 / 16.4);
/* pch: I believe the accel and gyro indicies are correct
* but somone else should please confirm.
*
* jamesjb: Y and Z axes are flipped on the PX4FMU
*/
const uint8_t AP_InertialSensor_MPU6000::_gyro_data_index[3] = { 5, 4, 6 };
const int8_t AP_InertialSensor_MPU6000::_gyro_data_sign[3] = { 1, 1, -1 };
const uint8_t AP_InertialSensor_MPU6000::_accel_data_index[3] = { 1, 0, 2 };
#if CONFIG_HAL_BOARD == HAL_BOARD_SMACCM
const int8_t AP_InertialSensor_MPU6000::_gyro_data_sign[3] = { 1, -1, 1 };
const int8_t AP_InertialSensor_MPU6000::_accel_data_sign[3] = { 1, -1, 1 };
#else
const int8_t AP_InertialSensor_MPU6000::_gyro_data_sign[3] = { 1, 1, -1 };
const int8_t AP_InertialSensor_MPU6000::_accel_data_sign[3] = { 1, 1, -1 };
#endif
const uint8_t AP_InertialSensor_MPU6000::_temp_data_index = 3;