From bf3da4396be74c6708a843d93286a63ce8dafc95 Mon Sep 17 00:00:00 2001 From: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com> Date: Wed, 6 Nov 2024 01:20:23 -0700 Subject: [PATCH] AP_Follow: use set_alt_m when possible Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com> --- libraries/AP_Follow/AP_Follow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Follow/AP_Follow.cpp b/libraries/AP_Follow/AP_Follow.cpp index b4acb2fc04..8792efd248 100644 --- a/libraries/AP_Follow/AP_Follow.cpp +++ b/libraries/AP_Follow/AP_Follow.cpp @@ -389,7 +389,7 @@ bool AP_Follow::handle_follow_target_message(const mavlink_message_t &msg) Location new_loc = _target_location; new_loc.lat = packet.lat; new_loc.lng = packet.lon; - new_loc.set_alt_cm(packet.alt*100, Location::AltFrame::ABSOLUTE); + new_loc.set_alt_m(packet.alt, Location::AltFrame::ABSOLUTE); // FOLLOW_TARGET is always AMSL, change the provided alt to // above home if we are configured for relative alt