From e53123fd7acac3d87e4e305456e76b49bd3fcbc7 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Wed, 8 Jan 2020 18:37:06 -0800 Subject: [PATCH] Fix Follow X/Y calc from distance/angle --- src/AutoPilotPlugins/APM/APMFollowComponent.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AutoPilotPlugins/APM/APMFollowComponent.qml b/src/AutoPilotPlugins/APM/APMFollowComponent.qml index 447614c1d..7b1e27831 100644 --- a/src/AutoPilotPlugins/APM/APMFollowComponent.qml +++ b/src/AutoPilotPlugins/APM/APMFollowComponent.qml @@ -112,10 +112,10 @@ SetupPage { } else { _followOffsetX.rawValue = Math.sin(angleRadians) * distance _followOffsetY.rawValue = Math.cos(angleRadians) * distance - if (_followOffsetX.rawValue < 0.0001) { + if (Math.abs(_followOffsetX.rawValue) < 0.0001) { _followOffsetX.rawValue = 0 } - if (_followOffsetY.rawValue < 0.0001) { + if (Math.abs(_followOffsetY.rawValue) < 0.0001) { _followOffsetY.rawValue = 0 } } -- 2.22.0