|
|
|
@ -28,7 +28,7 @@ void ModeRTL::update()
@@ -28,7 +28,7 @@ void ModeRTL::update()
|
|
|
|
|
_distance_to_destination = rover.current_loc.get_distance(_destination); |
|
|
|
|
const bool near_wp = _distance_to_destination <= rover.g.waypoint_radius; |
|
|
|
|
// check if we've reached the destination
|
|
|
|
|
if (!_reached_destination && (near_wp || location_passed_point(rover.current_loc, _origin, _destination))) { |
|
|
|
|
if (!_reached_destination && (near_wp || rover.current_loc.past_interval_finish_line(_origin, _destination))) { |
|
|
|
|
// trigger reached
|
|
|
|
|
_reached_destination = true; |
|
|
|
|
gcs().send_text(MAV_SEVERITY_INFO, "Reached destination"); |
|
|
|
|