1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Moved alignment from sensor into device

This commit is contained in:
Martin Budden 2016-12-04 21:48:29 +00:00
parent 86158a046d
commit 60e2227396
19 changed files with 82 additions and 104 deletions

View file

@ -422,10 +422,10 @@ void init(void)
#else
const void *sonarConfig = NULL;
#endif
if (!sensorsAutodetect(&masterConfig.sensorAlignmentConfig,
&masterConfig.sensorSelectionConfig,
compassConfig()->mag_declination,
&masterConfig.gyroConfig,
if (!sensorsAutodetect(sensorSelectionConfig(),
gyroConfig(),
accelerometerConfig(),
compassConfig(),
sonarConfig)) {
// if gyro was not detected due to whatever reason, we give up now.
failureMode(FAILURE_MISSING_ACC);