From bce81f7d0ad590dbc9669af55a8f5420f767c136 Mon Sep 17 00:00:00 2001 From: Ryan <25047695+Ryanf55@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:56:24 +0900 Subject: [PATCH] AP_L1_Control: Use is_positive Avoid !is_zero --- libraries/AP_L1_Control/AP_L1_Control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_L1_Control/AP_L1_Control.cpp b/libraries/AP_L1_Control/AP_L1_Control.cpp index 6d4839c258057..330612c6aca5e 100644 --- a/libraries/AP_L1_Control/AP_L1_Control.cpp +++ b/libraries/AP_L1_Control/AP_L1_Control.cpp @@ -553,7 +553,7 @@ void AP_L1_Control::update_level_flight(void) // update L1 control for path following void AP_L1_Control::follow_path(const Location &location_on_path, const Vector2f& unit_path_tangent, float path_curvature, int8_t direction) { //! @note initial implementation uses existing functions - if (!is_zero(path_curvature)) { + if (is_positive(path_curvature)) { // moving along arc of circle - loiter about wp located at // centre of curvature. float radius_m = 1.0 / path_curvature;