Skip to content

Commit 8ad1e5d

Browse files
committed
simplify hold state logic
1 parent 83de3f9 commit 8ad1e5d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/navigation/navigation.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4092,10 +4092,7 @@ bool isNavHoldPositionActive(void)
40924092
return posControl.waypointList[posControl.activeWaypointIndex].action != NAV_WP_ACTION_WAYPOINT || isLastMissionWaypoint();
40934093
}
40944094

4095-
return posControl.navState != NAV_STATE_FW_LANDING_APPROACH &&
4096-
posControl.navState != NAV_STATE_FW_LANDING_GLIDE &&
4097-
posControl.navState != NAV_STATE_FW_LANDING_FLARE &&
4098-
!posControl.flags.rthTrackbackActive;
4095+
return !FLIGHT_MODE(NAV_FW_AUTOLAND) && !posControl.flags.rthTrackbackActive;
40994096
}
41004097

41014098
float getActiveSpeed(void)

0 commit comments

Comments
 (0)