diff --git a/docs/Settings.md b/docs/Settings.md index b638da9f1eb..afdbba27ed9 100644 --- a/docs/Settings.md +++ b/docs/Settings.md @@ -3652,9 +3652,9 @@ Maximum D-term attenution percentage for horizontal velocity PID controller (Mul --- -### nav_mc_vel_xy_dterm_attenuation_end +### nav_mc_vel_xy_dterm_attenuation_end_speed -Horizontal velocity where nav_mc_vel_xy_dterm_attenuation reaches maximum [m/s] +Horizontal speed at which nav_mc_vel_xy_dterm_attenuation reaches maximum [m/s] | Default | Min | Max | | --- | --- | --- | @@ -3662,9 +3662,9 @@ Horizontal velocity where nav_mc_vel_xy_dterm_attenuation reaches maximum [m/s] --- -### nav_mc_vel_xy_dterm_attenuation_start +### nav_mc_vel_xy_dterm_attenuation_start_speed -Horizontal velocity where nav_mc_vel_xy_dterm_attenuation begins [m/s] +Horizontal speed at which nav_mc_vel_xy_dterm_attenuation begins [m/s] | Default | Min | Max | | --- | --- | --- | diff --git a/src/main/navigation/navigation.c b/src/main/navigation/navigation.c index c57af490f54..a8798c9981e 100644 --- a/src/main/navigation/navigation.c +++ b/src/main/navigation/navigation.c @@ -4024,16 +4024,15 @@ bool isLastMissionWaypoint(void) // CR122 bool isNavHoldPositionActive(void) { + if (navGetCurrentStateFlags() & NAV_CTL_HOLD) { + return true; + } + if (FLIGHT_MODE(NAV_WP_MODE)) { - return posControl.waypointList[posControl.activeWaypointIndex].action != NAV_WP_ACTION_WAYPOINT || - (navGetCurrentStateFlags() & NAV_CTL_HOLD) || - isLastMissionWaypoint(); + return posControl.waypointList[posControl.activeWaypointIndex].action != NAV_WP_ACTION_WAYPOINT || isLastMissionWaypoint(); } - return posControl.navState != NAV_STATE_FW_LANDING_APPROACH && - posControl.navState != NAV_STATE_FW_LANDING_GLIDE && - posControl.navState != NAV_STATE_FW_LANDING_FLARE && - !posControl.flags.rthTrackbackActive; + return !FLIGHT_MODE(NAV_FW_AUTOLAND) && !posControl.flags.rthTrackbackActive; } // CR122 float getActiveSpeed(void)