diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index b6820994850aa418ad969d6a342d9b7e0bbf677e..fd5b1709c48499697fe857edcd0bcdf4139c99de 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -813,25 +813,7 @@ bool Vehicle::joystickEnabled(void) void Vehicle::setJoystickEnabled(bool enabled) { - // The magic parameter will go away, - // until then don't mess with the logic here! - Fact* fact = _autopilotPlugin->getParameterFact(FactSystem::defaultComponentId, "COM_RC_IN_MODE"); - if (!fact) { - qCWarning(JoystickLog) << "Missing COM_RC_IN_MODE parameter"; - } - - // Any value greater than one - // indicates special handling on - // the autopilot side. Force the - // joystick to on. - if (fact->value().toInt() > 1) { - // Mandatory in this setting - _joystickEnabled = true; - } else { - fact->setValue(enabled ? 1 : 0); - _joystickEnabled = enabled; - } - + _joystickEnabled = enabled; _startJoystick(_joystickEnabled); _saveSettings(); } diff --git a/src/VehicleSetup/JoystickConfig.qml b/src/VehicleSetup/JoystickConfig.qml index 11f578f8e3c05eac9db382e2f032b8214d495172..2613ad30de8727ed8b3925df39f9935169610c0f 100644 --- a/src/VehicleSetup/JoystickConfig.qml +++ b/src/VehicleSetup/JoystickConfig.qml @@ -356,11 +356,10 @@ QGCView { QGCCheckBox { enabled: allowEnableDisable - text: _activeJoystick.calibrated ? (rcInMode.value < 2 ? "Enable joystick input, disable RC input" : "Enable/Disable not allowed (COM_RC_IN_MODE=2)") : "Enable/Disable not allowed (Calibrate First)" + text: _activeJoystick.calibrated ? "Enable joystick input" : "Enable/Disable not allowed (Calibrate First)" checked: _activeVehicle.joystickEnabled - property bool allowEnableDisable: _activeJoystick.calibrated && rcInMode.value < 2 - property Fact rcInMode: controller.getParameterFact(-1, "COM_RC_IN_MODE") + property bool allowEnableDisable: _activeJoystick.calibrated onClicked: _activeVehicle.joystickEnabled = checked }