mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 09:08:30 -04:00
AP_InertialSensor: fixed primary accel/gyro in replay
This commit is contained in:
parent
64a55c908f
commit
8bf2baef70
@ -1237,6 +1237,9 @@ void AP_InertialSensor::set_accel(uint8_t instance, const Vector3f &accel)
|
||||
if (_accel_count <= instance) {
|
||||
_accel_count = instance+1;
|
||||
}
|
||||
if (!_accel_healthy[_primary_accel]) {
|
||||
_primary_accel = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1253,6 +1256,9 @@ void AP_InertialSensor::set_gyro(uint8_t instance, const Vector3f &gyro)
|
||||
_gyro_count = instance+1;
|
||||
_gyro_cal_ok[instance] = true;
|
||||
}
|
||||
if (!_accel_healthy[_primary_accel]) {
|
||||
_primary_accel = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user