1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Fixed build when SONAR undefined

This commit is contained in:
Martin Budden 2016-11-23 15:04:19 +00:00
parent e9407f3065
commit 747649ce3a

View file

@ -417,12 +417,17 @@ void init(void)
} }
#endif #endif
#ifdef SONAR
const sonarConfig_t *sonarConfig = &masterConfig.sonarConfig;
#else
const void *sonarConfig = NULL;
#endif
if (!sensorsAutodetect(&masterConfig.sensorAlignmentConfig, if (!sensorsAutodetect(&masterConfig.sensorAlignmentConfig,
&masterConfig.sensorSelectionConfig, &masterConfig.sensorSelectionConfig,
masterConfig.compassConfig.mag_declination, masterConfig.compassConfig.mag_declination,
masterConfig.gyro_lpf, masterConfig.gyro_lpf,
masterConfig.gyro_sync_denom, masterConfig.gyro_sync_denom,
&masterConfig.sonarConfig)) { sonarConfig)) {
// if gyro was not detected due to whatever reason, we give up now. // if gyro was not detected due to whatever reason, we give up now.
failureMode(FAILURE_MISSING_ACC); failureMode(FAILURE_MISSING_ACC);
} }