Merge pull request #7244 from etracer65/gps_rescue_reset_max_alt

Reset GPS Rescue max altitude and distance on arming
This commit is contained in:
Michael Keller 2018-12-21 21:22:49 +13:00 committed by GitHub
commit e7d38eeacd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -177,6 +177,8 @@ static void idleTasks()
{
// Do not calculate any of the idle task values when we are not flying
if (!ARMING_FLAG(ARMED)) {
rescueState.sensor.maxAltitudeCm = 0;
rescueState.sensor.maxDistanceToHomeM = 0;
return;
}