mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Bypass calibration for GYRO_FAKE
This commit is contained in:
parent
a78238e0f2
commit
b90ed88f2e
1 changed files with 8 additions and 0 deletions
|
@ -422,6 +422,8 @@ static bool gyroDetectSensor(gyroSensor_t *gyroSensor, const gyroDeviceConfig_t
|
|||
if (!gyroFound) {
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
UNUSED(gyroFound);
|
||||
#endif
|
||||
#else
|
||||
UNUSED(config);
|
||||
|
@ -832,6 +834,12 @@ static bool isOnFirstGyroCalibrationCycle(const gyroCalibration_t *gyroCalibrati
|
|||
|
||||
static void gyroSetCalibrationCycles(gyroSensor_t *gyroSensor)
|
||||
{
|
||||
#if defined(USE_FAKE_GYRO) && !defined(UNIT_TEST)
|
||||
if (gyroSensor->gyroDev.gyroHardware == GYRO_FAKE) {
|
||||
gyroSensor->calibration.cyclesRemaining = 0;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
gyroSensor->calibration.cyclesRemaining = gyroCalculateCalibratingCycles();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue