From 8cfdfb21a5dde213d5abe3de56ec122ec774ee3c Mon Sep 17 00:00:00 2001 From: jmt Date: Tue, 22 Dec 2009 12:05:52 +0000 Subject: [PATCH] GPS / route-manager: only drive autopilot true-heading in LEG mode, for compatibility with the old behaviour. --- src/Instrumentation/gps.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Instrumentation/gps.cxx b/src/Instrumentation/gps.cxx index 1dd72d9fc..3303b669c 100644 --- a/src/Instrumentation/gps.cxx +++ b/src/Instrumentation/gps.cxx @@ -1003,8 +1003,12 @@ void GPS::driveAutopilot() return; } - // FIXME: we want to set desired track, not heading, here - _apTrueHeading->setDoubleValue(getWP1Bearing()); + // compatability feature - allow the route-manager / GPS to drive the + // generic autopilot heading hold *in leg mode only* + if (_mode == "leg") { + // FIXME: we want to set desired track, not heading, here + _apTrueHeading->setDoubleValue(getWP1Bearing()); + } } void GPS::wp1Changed() -- 2.39.5