Merge pull request #7254 from TonyBlit/gps_crosstrack_checks
Sanity checks flyaway/stalled only done in crosstrack phase
This commit is contained in:
commit
27dda737ad
|
@ -353,6 +353,7 @@ static void performSanityChecks()
|
|||
|
||||
previousTimeUs = currentTimeUs;
|
||||
|
||||
if (rescueState.phase == RESCUE_CROSSTRACK) {
|
||||
secondsStalled = constrain(secondsStalled + ((rescueState.sensor.groundSpeed < 150) ? 1 : -1), 0, 20);
|
||||
|
||||
if (secondsStalled == 20) {
|
||||
|
@ -365,6 +366,7 @@ static void performSanityChecks()
|
|||
if (secondsFlyingAway == 10) {
|
||||
rescueState.failure = RESCUE_FLYAWAY;
|
||||
}
|
||||
}
|
||||
|
||||
secondsLowSats = constrain(secondsLowSats + ((rescueState.sensor.numSat < gpsRescueConfig()->minSats) ? 1 : -1), 0, 10);
|
||||
|
||||
|
|
Loading…
Reference in New Issue