mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
FIX: Custom defaults - premature configuration (#12410)
This commit is contained in:
parent
60369bcf4f
commit
7c6bf79777
1 changed files with 4 additions and 1 deletions
|
@ -659,10 +659,13 @@ bool gyroInit(void)
|
|||
gyro.gyroSensor2.gyroDev.dev.rxBuf = &gyroBuf2[GYRO_BUF_SIZE / 2];
|
||||
|
||||
gyroInitSensor(&gyro.gyroSensor2, gyroDeviceConfig(1));
|
||||
gyro.gyroHasOverflowProtection = gyro.gyroHasOverflowProtection && gyro.gyroSensor2.gyroDev.gyroHasOverflowProtection;
|
||||
gyro.gyroHasOverflowProtection = gyro.gyroHasOverflowProtection && gyro.gyroSensor2.gyroDev.gyroHasOverflowProtection;
|
||||
detectedSensors[SENSOR_INDEX_GYRO] = gyro.gyroSensor2.gyroDev.gyroHardware;
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_CUSTOM_DEFAULTS
|
||||
eepromWriteRequired = eepromWriteRequired && systemConfig()->configurationState != CONFIGURATION_STATE_DEFAULTS_BARE;
|
||||
#endif
|
||||
|
||||
if (eepromWriteRequired) {
|
||||
writeEEPROM();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue