diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index 1a6780eccf..060db4f492 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -1032,8 +1032,8 @@ void AP_InertialSensor::update(void) if (!_hil_mode) { for (uint8_t i=0; iresume_timer_procs(); gyro *= _gyro_scale / num_samples; - _rotate_and_offset_gyro(_gyro_instance, gyro); + _publish_gyro(_gyro_instance, gyro); accel *= MPU6000_ACCEL_SCALE_1G / num_samples; - _rotate_and_offset_accel(_accel_instance, accel); + _publish_accel(_accel_instance, accel); if (_last_filter_hz != _imu.get_filter()) { if (_spi_sem->take(10)) { diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_MPU9150.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_MPU9150.cpp index d941deb105..32682039b6 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_MPU9150.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_MPU9150.cpp @@ -1101,10 +1101,10 @@ bool AP_InertialSensor_MPU9150::update(void) hal.scheduler->resume_timer_procs(); accel *= MPU9150_ACCEL_SCALE_2G; - _rotate_and_offset_accel(_accel_instance, accel); + _publish_accel(_accel_instance, accel); gyro *= MPU9150_GYRO_SCALE_2000; - _rotate_and_offset_gyro(_gyro_instance, gyro); + _publish_gyro(_gyro_instance, gyro); if (_last_filter_hz != _imu.get_filter()) { _set_filter_frequency(_imu.get_filter()); diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp index 421b0c27c0..4f22827cb3 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_MPU9250.cpp @@ -289,8 +289,8 @@ bool AP_InertialSensor_MPU9250::update( void ) gyro.rotate(ROTATION_ROLL_180); #endif - _rotate_and_offset_gyro(_gyro_instance, gyro); - _rotate_and_offset_accel(_accel_instance, accel); + _publish_gyro(_gyro_instance, gyro); + _publish_accel(_accel_instance, accel); if (_last_filter_hz != _imu.get_filter()) { _set_filter(_imu.get_filter()); diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp index df56b44746..2ef92e0eaf 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp @@ -104,14 +104,14 @@ bool AP_InertialSensor_Oilpan::update() v(_sensor_signs[0] * ( adc_values[0] - OILPAN_RAW_GYRO_OFFSET ) * _gyro_gain_x, _sensor_signs[1] * ( adc_values[1] - OILPAN_RAW_GYRO_OFFSET ) * _gyro_gain_y, _sensor_signs[2] * ( adc_values[2] - OILPAN_RAW_GYRO_OFFSET ) * _gyro_gain_z); - _rotate_and_offset_gyro(_gyro_instance, v); + _publish_gyro(_gyro_instance, v); // copy accels to frontend v(_sensor_signs[3] * (adc_values[3] - OILPAN_RAW_ACCEL_OFFSET), _sensor_signs[4] * (adc_values[4] - OILPAN_RAW_ACCEL_OFFSET), _sensor_signs[5] * (adc_values[5] - OILPAN_RAW_ACCEL_OFFSET)); v *= OILPAN_ACCEL_SCALE_1G; - _rotate_and_offset_accel(_accel_instance, v); + _publish_accel(_accel_instance, v); return true; } diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_PX4.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_PX4.cpp index c107c5f80a..42112f3a35 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_PX4.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_PX4.cpp @@ -107,20 +107,20 @@ bool AP_InertialSensor_PX4::update(void) for (uint8_t k=0; k<_num_accel_instances; k++) { Vector3f accel = _accel_in[k]; - // calling _rotate_and_offset_accel sets the sensor healthy, + // calling _publish_accel sets the sensor healthy, // so we only want to do this if we have new data from it if (_last_accel_timestamp[k] != _last_accel_update_timestamp[k]) { - _rotate_and_offset_accel(_accel_instance[k], accel); + _publish_accel(_accel_instance[k], accel); _last_accel_update_timestamp[k] = _last_accel_timestamp[k]; } } for (uint8_t k=0; k<_num_gyro_instances; k++) { Vector3f gyro = _gyro_in[k]; - // calling _rotate_and_offset_accel sets the sensor healthy, + // calling _publish_accel sets the sensor healthy, // so we only want to do this if we have new data from it if (_last_gyro_timestamp[k] != _last_gyro_update_timestamp[k]) { - _rotate_and_offset_gyro(_gyro_instance[k], gyro); + _publish_gyro(_gyro_instance[k], gyro); _last_gyro_update_timestamp[k] = _last_gyro_timestamp[k]; } }