mirror of https://github.com/ArduPilot/ardupilot
Rover: boats keep navigating at WP if loiter fails
This commit is contained in:
parent
cf36ee463a
commit
f542d86cd2
|
@ -77,13 +77,13 @@ void ModeAuto::update()
|
||||||
case Auto_WP:
|
case Auto_WP:
|
||||||
{
|
{
|
||||||
// boats loiter once the waypoint is reached
|
// boats loiter once the waypoint is reached
|
||||||
|
bool keep_navigating = true;
|
||||||
if (rover.is_boat() && g2.wp_nav.reached_destination() && !g2.wp_nav.is_fast_waypoint()) {
|
if (rover.is_boat() && g2.wp_nav.reached_destination() && !g2.wp_nav.is_fast_waypoint()) {
|
||||||
start_loiter();
|
keep_navigating = !start_loiter();
|
||||||
|
}
|
||||||
|
|
||||||
// update distance to destination
|
// update navigation controller
|
||||||
_distance_to_destination = rover.current_loc.get_distance(g2.wp_nav.get_destination());
|
if (keep_navigating) {
|
||||||
} else {
|
|
||||||
// update navigation controller
|
|
||||||
navigate_to_waypoint();
|
navigate_to_waypoint();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue