AP_InertialSensor: Fix orientation MPU6000 PXF
This commit is contained in:
parent
bd34ffa7db
commit
103bb2a08d
@ -296,10 +296,15 @@ bool AP_InertialSensor_MPU6000::update( void )
|
|||||||
hal.scheduler->resume_timer_procs();
|
hal.scheduler->resume_timer_procs();
|
||||||
|
|
||||||
gyro *= _gyro_scale / num_samples;
|
gyro *= _gyro_scale / num_samples;
|
||||||
_publish_gyro(_gyro_instance, gyro);
|
|
||||||
|
|
||||||
accel *= MPU6000_ACCEL_SCALE_1G / num_samples;
|
accel *= MPU6000_ACCEL_SCALE_1G / num_samples;
|
||||||
|
|
||||||
|
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXF
|
||||||
|
accel.rotate(ROTATION_PITCH_180_YAW_90);
|
||||||
|
gyro.rotate(ROTATION_PITCH_180_YAW_90);
|
||||||
|
#endif
|
||||||
|
|
||||||
_publish_accel(_accel_instance, accel);
|
_publish_accel(_accel_instance, accel);
|
||||||
|
_publish_gyro(_gyro_instance, gyro);
|
||||||
|
|
||||||
#if MPU6000_FAST_SAMPLING
|
#if MPU6000_FAST_SAMPLING
|
||||||
if (_last_accel_filter_hz != _accel_filter_cutoff()) {
|
if (_last_accel_filter_hz != _accel_filter_cutoff()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user