diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index bcd6653d462c5ccbf373c78b0972470ecd52a5d8..7ebdcace1e0fe9c5000b51921be175d15e19cb6e 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -838,6 +838,7 @@ void Vehicle::setJoystickEnabled(bool enabled) _joystickEnabled = enabled; _startJoystick(_joystickEnabled); _saveSettings(); + emit joystickEnabledChanged(_joystickEnabled); } void Vehicle::_startJoystick(bool start) diff --git a/src/VehicleSetup/JoystickConfig.qml b/src/VehicleSetup/JoystickConfig.qml index 2613ad30de8727ed8b3925df39f9935169610c0f..c5926410faa602550bb5da34edae143fad3b9042 100644 --- a/src/VehicleSetup/JoystickConfig.qml +++ b/src/VehicleSetup/JoystickConfig.qml @@ -355,12 +355,10 @@ QGCView { QGCCheckBox { - enabled: allowEnableDisable + enabled: _activeJoystick.calibrated text: _activeJoystick.calibrated ? "Enable joystick input" : "Enable/Disable not allowed (Calibrate First)" checked: _activeVehicle.joystickEnabled - property bool allowEnableDisable: _activeJoystick.calibrated - onClicked: _activeVehicle.joystickEnabled = checked }