mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
AP_InertialSensor: fixed accel cal simple to remove unused IMUs
when we change EAHRS_SENSORS to remove use of IMU from an external AHRS we need to be able to zero the accel and gyro offsets to get prearms to pass
This commit is contained in:
parent
23f2621685
commit
280bc3a285
@ -2532,7 +2532,7 @@ MAV_RESULT AP_InertialSensor::simple_accel_cal()
|
||||
}
|
||||
|
||||
// remove existing accel offsets and scaling
|
||||
for (uint8_t k=0; k<num_accels; k++) {
|
||||
for (uint8_t k=0; k<INS_MAX_INSTANCES; k++) {
|
||||
_accel_offset(k).set(Vector3f());
|
||||
_accel_scale(k).set(Vector3f(1,1,1));
|
||||
new_accel_offset[k].zero();
|
||||
@ -2620,6 +2620,12 @@ MAV_RESULT AP_InertialSensor::simple_accel_cal()
|
||||
caltemp_accel(k).set_and_save(get_temperature(k));
|
||||
#endif
|
||||
}
|
||||
for (uint8_t k=num_accels; k<INS_MAX_INSTANCES; k++) {
|
||||
_accel_offset(k).set_and_save(Vector3f());
|
||||
_accel_scale(k).set_and_save(Vector3f());
|
||||
_gyro_offset(k).set_and_save(Vector3f());
|
||||
_accel_id(k).set_and_save(0);
|
||||
}
|
||||
|
||||
#if AP_AHRS_ENABLED
|
||||
// force trim to zero
|
||||
|
Loading…
Reference in New Issue
Block a user