Skip to content

Commit

Permalink
Merge pull request #9067 from breadoven/abo_mr_wp_speed_alt_enforce_fix
Browse files Browse the repository at this point in the history
Multirotor WP speed fix when altitude enforce enabled
  • Loading branch information
breadoven committed May 23, 2023
2 parents 5497e9d + fb8be51 commit 0d88429
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/navigation/navigation.c
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,7 @@ static navigationFSMEvent_t navOnEnteringState_NAV_STATE_WAYPOINT_HOLD_TIME(navi
timeMs_t currentTime = millis();

if (posControl.waypointList[posControl.activeWaypointIndex].p1 <= 0 ||
posControl.waypointList[posControl.activeWaypointIndex].action == NAV_WP_ACTION_WAYPOINT ||
(posControl.wpReachedTime != 0 && currentTime - posControl.wpReachedTime >= (timeMs_t)posControl.waypointList[posControl.activeWaypointIndex].p1*1000L)) {
return NAV_FSM_EVENT_SUCCESS;
}
Expand Down

0 comments on commit 0d88429

Please sign in to comment.