From 80a56a5fdf7b3ea66ef6f4bf9e32a54962018d57 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 27 Aug 2021 13:05:00 +1000 Subject: [PATCH] ArduSub: eliminate AP::ahrs().get_location --- ArduSub/commands.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduSub/commands.cpp b/ArduSub/commands.cpp index 4085a20a6e..7162b89f31 100644 --- a/ArduSub/commands.cpp +++ b/ArduSub/commands.cpp @@ -25,7 +25,7 @@ void Sub::set_home_to_current_location_inflight() // get current location from EKF Location temp_loc; Location ekf_origin; - if (ahrs.get_location(temp_loc) && ahrs.get_origin(ekf_origin)) { + if (ahrs.get_position(temp_loc) && ahrs.get_origin(ekf_origin)) { temp_loc.alt = ekf_origin.alt; if (!set_home(temp_loc, false)) { // ignore this failure @@ -38,7 +38,7 @@ bool Sub::set_home_to_current_location(bool lock) { // get current location from EKF Location temp_loc; - if (ahrs.get_location(temp_loc)) { + if (ahrs.get_position(temp_loc)) { // Make home always at the water's surface. // This allows disarming and arming again at depth.