mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 16:55:29 +03:00
add USE_IMU_FAKE
This commit is contained in:
parent
19894a5a80
commit
b6483bb457
2 changed files with 8 additions and 4 deletions
|
@ -362,11 +362,11 @@ static void restartGravityCalibration(void)
|
|||
}
|
||||
|
||||
static bool gravityCalibrationComplete(void)
|
||||
{
|
||||
{
|
||||
if (!gyroConfig()->init_gyro_cal_enabled) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return zeroCalibrationIsCompleteS(&posEstimator.imu.gravityCalibration);
|
||||
}
|
||||
|
||||
|
|
|
@ -341,10 +341,12 @@ void gyroStartCalibration(void)
|
|||
if (!gyro.initialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#ifndef USE_IMU_FAKE // fixes Test Unit compilation error
|
||||
if (!gyroConfig()->init_gyro_cal_enabled) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
zeroCalibrationStartV(&gyroCalibration[0], CALIBRATING_GYRO_TIME_MS, gyroConfig()->gyroMovementCalibrationThreshold, false);
|
||||
}
|
||||
|
@ -355,9 +357,11 @@ bool gyroIsCalibrationComplete(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifndef USE_IMU_FAKE // fixes Test Unit compilation error
|
||||
if (!gyroConfig()->init_gyro_cal_enabled) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return zeroCalibrationIsCompleteV(&gyroCalibration[0]) && zeroCalibrationIsSuccessfulV(&gyroCalibration[0]);
|
||||
}
|
||||
|
@ -519,7 +523,7 @@ void FAST_CODE NOINLINE gyroUpdate()
|
|||
// At this point gyro.gyroADCf contains unfiltered gyro value [deg/s]
|
||||
float gyroADCf = gyro.gyroADCf[axis];
|
||||
|
||||
//DEBUG_SET(DEBUG_GYRO, axis, lrintf(gyroADCf));
|
||||
DEBUG_SET(DEBUG_GYRO, axis, lrintf(gyroADCf));
|
||||
|
||||
/*
|
||||
* First gyro LPF is the only filter applied with the full gyro sampling speed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue