1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 09:45:33 +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 #endif
retry:
magAlign = ALIGN_DEFAULT; magAlign = ALIGN_DEFAULT;
switch(magHardwareToUse) { switch(magHardwareToUse) {
@ -732,12 +730,7 @@ retry:
break; break;
} }
if (magHardware == MAG_NONE && magHardwareToUse != MAG_DEFAULT && magHardwareToUse != MAG_NONE) { // Nothing was found - disregard the compass
// Nothing was found and we have a forced sensor that isn't present.
magHardwareToUse = MAG_NONE;
return;
}
if (magHardware == MAG_NONE) { if (magHardware == MAG_NONE) {
return; return;
} }