mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
WP altitude enforce hold fix
This commit is contained in:
parent
f88f6309b8
commit
2a62aff039
1 changed files with 5 additions and 4 deletions
|
@ -4081,10 +4081,11 @@ bool isLastMissionWaypoint(void)
|
||||||
/* Checks if Nav hold position is active */
|
/* Checks if Nav hold position is active */
|
||||||
bool isNavHoldPositionActive(void)
|
bool isNavHoldPositionActive(void)
|
||||||
{
|
{
|
||||||
// WP mode last WP hold and Timed hold positions
|
// WP mode last WP hold and Timed/Alt Enforce hold positions
|
||||||
if (FLIGHT_MODE(NAV_WP_MODE)) {
|
return isLastMissionWaypoint() ||
|
||||||
return isLastMissionWaypoint() || posControl.waypointList[posControl.activeWaypointIndex].action == NAV_WP_ACTION_HOLD_TIME;
|
NAV_Status.state == MW_NAV_STATE_HOLD_TIMED ||
|
||||||
}
|
posControl.waypointList[posControl.activeWaypointIndex].action == NAV_WP_ACTION_HOLD_TIME;
|
||||||
|
|
||||||
// RTH mode (spiral climb and Home positions but excluding RTH Trackback point positions) and POSHOLD mode
|
// RTH mode (spiral climb and Home positions but excluding RTH Trackback point positions) and POSHOLD mode
|
||||||
// Also hold position during emergency landing if position valid
|
// Also hold position during emergency landing if position valid
|
||||||
return (FLIGHT_MODE(NAV_RTH_MODE) && !posControl.flags.rthTrackbackActive) ||
|
return (FLIGHT_MODE(NAV_RTH_MODE) && !posControl.flags.rthTrackbackActive) ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue