Merge pull request #6063 from dbasch/alt-fix

[GPS Rescue] - Do not run idle tasks when disarmed
This commit is contained in:
Michael Keller 2018-06-08 20:50:33 +12:00 committed by GitHub
commit ef12eebe57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -293,6 +293,11 @@ void rescueStop()
// Things that need to run regardless of GPS rescue mode being enabled or not
void idleTasks()
{
// Do not calculate any of the idle task values when we are not flying
if (!ARMING_FLAG(ARMED)) {
return;
}
gpsRescueAngle[AI_PITCH] = 0;
gpsRescueAngle[AI_ROLL] = 0;