Browse Source

Fixed an apparent bug that prevented the checkbox from accurately

representing the active state of the joystick after calibration
QGC4.4
nanthony21 7 years ago
parent
commit
faaa44d9b9
  1. 10
      src/VehicleSetup/JoystickConfig.qml

10
src/VehicleSetup/JoystickConfig.qml

@ -366,8 +366,16 @@ SetupPage {
id: enabledCheckBox id: enabledCheckBox
enabled: _activeJoystick ? _activeJoystick.calibrated : false enabled: _activeJoystick ? _activeJoystick.calibrated : false
text: _activeJoystick ? _activeJoystick.calibrated ? qsTr("Enable joystick input") : qsTr("Enable not allowed (Calibrate First)") : "" text: _activeJoystick ? _activeJoystick.calibrated ? qsTr("Enable joystick input") : qsTr("Enable not allowed (Calibrate First)") : ""
checked: _activeVehicle.joystickEnabled
onClicked: _activeVehicle.joystickEnabled = checked onClicked: _activeVehicle.joystickEnabled = checked
Component.onCompleted: checked = _activeVehicle.joystickEnabled
Connections {
target: _activeVehicle
onJoystickEnabledChanged: {
enabledCheckBox.checked = _activeVehicle.joystickEnabled
}
}
Connections { Connections {
target: joystickManager target: joystickManager

Loading…
Cancel
Save