move from CALIBRATING_GYRO_CYCLES to CALIBRATING_GYRO_TIME ... absolu… (#5320)
* move from CALIBRATING_GYRO_CYCLES to CALIBRATING_GYRO_TIME ... absolute calibration time * DieHertz requested changes * cleanup indentation
This commit is contained in:
parent
73eb5d396e
commit
3855d254b0
|
@ -746,7 +746,7 @@ static bool isOnFinalGyroCalibrationCycle(const gyroCalibration_t *gyroCalibrati
|
|||
|
||||
static uint16_t gyroCalculateCalibratingCycles(void)
|
||||
{
|
||||
return (CALIBRATING_GYRO_CYCLES / gyro.targetLooptime) * CALIBRATING_GYRO_CYCLES;
|
||||
return (CALIBRATING_GYRO_TIME_US / gyro.targetLooptime);
|
||||
}
|
||||
|
||||
static bool isOnFirstGyroCalibrationCycle(const gyroCalibration_t *gyroCalibration)
|
||||
|
@ -789,7 +789,7 @@ STATIC_UNIT_TESTED void performGyroCalibration(gyroSensor_t *gyroSensor, uint8_t
|
|||
gyroSensor->gyroDev.gyroZero[axis] = 0;
|
||||
}
|
||||
|
||||
// Sum up CALIBRATING_GYRO_CYCLES readings
|
||||
// Sum up CALIBRATING_GYRO_TIME_US readings
|
||||
gyroSensor->calibration.sum[axis] += gyroSensor->gyroDev.gyroADCRaw[axis];
|
||||
devPush(&gyroSensor->calibration.var[axis], gyroSensor->gyroDev.gyroADCRaw[axis]);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ typedef union flightDynamicsTrims_u {
|
|||
flightDynamicsTrims_def_t values;
|
||||
} flightDynamicsTrims_t;
|
||||
|
||||
#define CALIBRATING_GYRO_CYCLES 10000
|
||||
#define CALIBRATING_GYRO_TIME_US 3000000
|
||||
#define CALIBRATING_ACC_CYCLES 400
|
||||
#define CALIBRATING_BARO_CYCLES 200 // 10 seconds init_delay + 200 * 25 ms = 15 seconds before ground pressure settles
|
||||
|
||||
|
|
Loading…
Reference in New Issue