1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +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
#ifdef SONAR
const sonarConfig_t *sonarConfig = &masterConfig.sonarConfig;
#else
const void *sonarConfig = NULL;
#endif
if (!sensorsAutodetect(&masterConfig.sensorAlignmentConfig,
&masterConfig.sensorSelectionConfig,
masterConfig.compassConfig.mag_declination,
masterConfig.gyro_lpf,
masterConfig.gyro_sync_denom,
&masterConfig.sonarConfig)) {
sonarConfig)) {
// if gyro was not detected due to whatever reason, we give up now.
failureMode(FAILURE_MISSING_ACC);
}