Skip to content

Commit

Permalink
CR122
Browse files Browse the repository at this point in the history
  • Loading branch information
breadoven committed May 4, 2024
1 parent 25e4a62 commit bd36eed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -3652,19 +3652,19 @@ 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 |
| --- | --- | --- |
| 10 | 0 | 100 |

---

### 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 |
| --- | --- | --- |
Expand Down
13 changes: 6 additions & 7 deletions src/main/navigation/navigation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bd36eed

Please sign in to comment.