AP_InertialSensor: fixed primary accel/gyro in replay

This commit is contained in:
Andrew Tridgell 2015-05-11 11:16:57 +10:00
parent 64a55c908f
commit 8bf2baef70

View File

@ -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;
}
}
}