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

Cleanup sensor detection. Less code required and a similar pattern is used for each type of sensor.

This commit is contained in:
Dominic Clifton 2015-02-19 16:15:14 +00:00
parent 77e5be5002
commit c45efac812
20 changed files with 70 additions and 78 deletions

View file

@ -294,9 +294,6 @@ void init(void)
}
#endif
// We have these sensors; SENSORS_SET defined in board.h depending on hardware platform
sensorsSet(SENSORS_SET);
// drop out any sensors that don't seem to work, init all the others. halt if gyro is dead.
sensorsOK = sensorsAutodetect(&masterConfig.sensorAlignmentConfig, masterConfig.gyro_lpf, masterConfig.acc_hardware, masterConfig.mag_hardware, currentProfile->mag_declination);
// if gyro was not detected due to whatever reason, we give up now.