From aba11a06342339040f29b16589791fd16d0f4b5d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 21 May 2014 20:20:33 +1000 Subject: [PATCH] AP_L1_Control: wrap the target_bearing --- 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 6466f1169d..235ad82134 100644 --- a/libraries/AP_L1_Control/AP_L1_Control.cpp +++ b/libraries/AP_L1_Control/AP_L1_Control.cpp @@ -67,7 +67,7 @@ int32_t AP_L1_Control::bearing_error_cd(void) const int32_t AP_L1_Control::target_bearing_cd(void) const { - return _target_bearing_cd; + return wrap_180_cd(_target_bearing_cd); } float AP_L1_Control::turn_distance(float wp_radius) const