1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

Update config.c

This commit is contained in:
NywayZheng 2018-08-27 22:28:06 +08:00 committed by GitHub
parent 75ccb897f1
commit 459f91e7a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,14 +31,8 @@
void targetValidateConfiguration(void)
{
if(gyroConfigMutable()->gyro_to_use == GYRO_CONFIG_USE_GYRO_2) {
if((gyroConfigMutable()->gyroMovementCalibrationThreshold ==48) && (gyroConfigMutable()->gyroMovementCalibrationThreshold !=148)) {
gyroConfigMutable()->gyroMovementCalibrationThreshold = 148; //for cli set
}
} else {
if((gyroConfigMutable()->gyroMovementCalibrationThreshold ==148) && (gyroConfigMutable()->gyroMovementCalibrationThreshold !=48)) {
gyroConfigMutable()->gyroMovementCalibrationThreshold = 48; //for cli set
}
if (gyroConfig()->gyro_use_32khz && gyroConfig()->gyroMovementCalibrationThreshold < 148) {
gyroConfigMutable()->gyroMovementCalibrationThreshold = 148;
}
}