1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

Fixed external barometer & magnetometer detection

This commit is contained in:
Konstantin Sharlaimov 2015-02-19 15:25:32 +10:00 committed by Dominic Clifton
parent e554f73f5c
commit 77e5be5002

View file

@ -381,12 +381,14 @@ static void detectBaro()
#ifdef USE_BARO_MS5611
if (ms5611Detect(&baro)) {
sensorsSet(SENSOR_BARO);
return;
}
#endif
#ifdef USE_BARO_BMP085
if (bmp085Detect(bmp085Config, &baro)) {
sensorsSet(SENSOR_BARO);
return;
}
#endif
@ -440,6 +442,7 @@ retry:
#ifdef USE_MAG_HMC5883
case MAG_HMC5883:
if (hmc5883lDetect(&mag, hmc5883Config)) {
sensorsSet(SENSOR_MAG);
#ifdef MAG_HMC5883_ALIGN
magAlign = MAG_HMC5883_ALIGN;
#endif
@ -455,6 +458,7 @@ retry:
case MAG_AK8975:
if (ak8975detect(&mag)) {
sensorsSet(SENSOR_MAG);
#ifdef MAG_AK8975_ALIGN
magAlign = MAG_AK8975_ALIGN;
#endif