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:
parent
e9407f3065
commit
747649ce3a
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue