From 48a3367c29c5120f236b76aedd52c49551fa1f43 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 3 Sep 2015 16:39:59 -0700 Subject: [PATCH] Leave old setting --- src/Vehicle/Vehicle.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index ee0cf8687..bc3efe249 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -891,7 +891,10 @@ void Vehicle::setJoystickEnabled(bool enabled) if (!fact) { qCWarning(JoystickLog) << "Missing COM_RC_IN_MODE parameter"; } - fact->setValue(enabled ? 1 : 0); + + if (fact->value().toInt() != 2) { + fact->setValue(enabled ? 1 : 0); + } _joystickEnabled = enabled; _startJoystick(_joystickEnabled); -- 2.22.0