Skip to content

Commit

Permalink
AP_Landing: restart_landing_sequence get current location and pass …
Browse files Browse the repository at this point in the history
…it to `get_landing_sequence_start`
  • Loading branch information
IamPete1 authored and tridge committed Apr 2, 2024
1 parent afec757 commit b16f70a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libraries/AP_Landing/AP_Landing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,11 @@ bool AP_Landing::restart_landing_sequence()
return false;
}

uint16_t do_land_start_index = mission.get_landing_sequence_start();
uint16_t do_land_start_index = 0;
Location loc;
if (ahrs.get_location(loc)) {
do_land_start_index = mission.get_landing_sequence_start(loc);
}
uint16_t prev_cmd_with_wp_index = mission.get_prev_nav_cmd_with_wp_index();
bool success = false;
uint16_t current_index = mission.get_current_nav_index();
Expand Down

0 comments on commit b16f70a

Please sign in to comment.