1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 01:35:35 +03:00

Fixed no-mag detection

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2016-07-14 21:49:34 +10:00
parent 49bfcd7bb8
commit 8aa69a7daf

View file

@ -662,8 +662,6 @@ static void detectMag(magSensor_e magHardwareToUse)
#endif
retry:
magAlign = ALIGN_DEFAULT;
switch(magHardwareToUse) {
@ -732,12 +730,7 @@ retry:
break;
}
if (magHardware == MAG_NONE && magHardwareToUse != MAG_DEFAULT && magHardwareToUse != MAG_NONE) {
// Nothing was found and we have a forced sensor that isn't present.
magHardwareToUse = MAG_NONE;
return;
}
// Nothing was found - disregard the compass
if (magHardware == MAG_NONE) {
return;
}