From dabf92f5b6c4b9d1d1b825e519bd016de17b31d8 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 27 Mar 2019 11:34:07 +1100 Subject: [PATCH] Rover: use sanitize method rather than location_sanitize function --- APMrover2/mode_auto.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/APMrover2/mode_auto.cpp b/APMrover2/mode_auto.cpp index 97351fb0ed..14d8514788 100644 --- a/APMrover2/mode_auto.cpp +++ b/APMrover2/mode_auto.cpp @@ -251,7 +251,7 @@ void ModeAuto::start_guided(const Location& loc) // sanity check target location if ((loc.lat != 0) || (loc.lng != 0)) { guided_target.loc = loc; - location_sanitize(rover.current_loc, guided_target.loc); + guided_target.loc.sanitize(rover.current_loc); guided_target.valid = true; } else { guided_target.valid = false; @@ -499,7 +499,7 @@ void ModeAuto::do_nav_wp(const AP_Mission::Mission_Command& cmd, bool always_sto // retrieve and sanitize target location Location cmdloc = cmd.content.location; - location_sanitize(rover.current_loc, cmdloc); + cmdloc.sanitize(rover.current_loc); set_desired_location(cmdloc, next_leg_bearing_cd); }