From db9228ea3eb2d79899b65a94fcd1f4b0505215f8 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 26 May 2022 18:03:17 +1000 Subject: [PATCH] AP_DAL: correct error path in max_distance_cm_orient --- libraries/AP_DAL/AP_DAL_RangeFinder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_DAL/AP_DAL_RangeFinder.cpp b/libraries/AP_DAL/AP_DAL_RangeFinder.cpp index 01e8872de9..d6bb1f506a 100644 --- a/libraries/AP_DAL/AP_DAL_RangeFinder.cpp +++ b/libraries/AP_DAL/AP_DAL_RangeFinder.cpp @@ -53,7 +53,7 @@ int16_t AP_DAL_RangeFinder::max_distance_cm_orient(enum Rotation orientation) co const auto *rangefinder = AP::rangefinder(); // the EKF only asks for this from a specific orientation. Thankfully. INTERNAL_ERROR(AP_InternalError::error_t::flow_of_control); - return rangefinder->ground_clearance_cm_orient(orientation); + return rangefinder->max_distance_cm_orient(orientation); } #endif