From 9384d9ac441d658cac762ef71e52a61a18d5a80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Sat, 27 Jan 2018 15:53:16 -0800 Subject: [PATCH] QGC: Solve problem with limitAngleToPMPId when angle is bigger than PI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/QGC.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QGC.cc b/src/QGC.cc index 812099ab6..dcfa7e2d5 100644 --- a/src/QGC.cc +++ b/src/QGC.cc @@ -61,14 +61,14 @@ double limitAngleToPMPId(double angle) { while (angle < -M_PI) { - angle += M_PI; + angle += 2.0f * M_PI; } } else if (angle > M_PI) { while (angle > M_PI) { - angle -= M_PI; + angle -= 2.0f * M_PI; } } } -- 2.22.0