QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
JoystickComponentSettings.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Dialogs
4import QtQuick.Layouts
5
6import QGroundControl
7import QGroundControl.Controls
8import QGroundControl.VehicleSetup
9import QGroundControl.FactControls
10
11ColumnLayout {
12 spacing: _margins
13
14 required property var joystick
15
16 readonly property var _joystickSettings: joystick.settings
17 readonly property real _margins: ScreenTools.defaultFontPixelHeight / 2
18
19 ColumnLayout {
20 Layout.fillWidth: true
21 Layout.leftMargin: _margins
22 Layout.rightMargin: _margins
23 spacing: _margins
24
25 FactCheckBoxSlider {
26 Layout.fillWidth: true
27 text: qsTr("Center stick is zero throttle")
28 fact: _joystickSettings.throttleModeCenterZero
29 visible: fact.visible
30 }
31
32 FactCheckBoxSlider {
33 Layout.fillWidth: true
34 text: qsTr("Spring loaded throttle smoothing")
35 fact: _joystickSettings.throttleSmoothing
36 visible: fact.visible && _joystickSettings.throttleModeCenterZero.rawValue
37 }
38
39 FactTextFieldSlider {
40 Layout.fillWidth: true
41 label: fact.shortDescription
42 fact: _joystickSettings.exponentialPct
43 }
44
45 FactCheckBoxSlider {
46 Layout.fillWidth: true
47 text: qsTr("Negative Thrust")
48 fact: _joystickSettings.negativeThrust
49 visible: globals.activeVehicle.supports.negativeThrust && fact.visible
50 }
51
52 QGCCheckBoxSlider {
53 id: advancedSettingsCheckbox
54 Layout.fillWidth: true
55 text: qsTr("Advanced Settings")
56 }
57 }
58
59 SettingsGroupLayout {
60 Layout.fillWidth: true
61 heading: qsTr("Advanced Settings")
62 visible: advancedSettingsCheckbox.checked
63
64 FactCheckBoxSlider {
65 Layout.fillWidth: true
66 text: qsTr("Circle Correction")
67 fact: _joystickSettings.circleCorrection
68 visible: fact.visible
69 }
70
71 FactTextFieldSlider {
72 Layout.fillWidth: true
73 label: fact.shortDescription
74 fact: _joystickSettings.axisFrequencyHz
75 visible: fact.visible
76 }
77
78 FactTextFieldSlider {
79 Layout.fillWidth: true
80 label: fact.shortDescription
81 fact: _joystickSettings.buttonFrequencyHz
82 visible: fact.visible
83 }
84
85 ColumnLayout {
86 Layout.preferredWidth: parent.width
87 spacing: 0
88 visible: advancedSettingsCheckbox.checked
89
90 FactCheckBoxSlider {
91 text: qsTr("Deadband")
92 fact: _joystickSettings.useDeadband
93 visible: fact.visible
94 }
95
96 QGCLabel{
97 Layout.fillWidth: true
98 font.pointSize: ScreenTools.smallFontPointSize
99 wrapMode: Text.WordWrap
100 text: qsTr("Deadband can be set during the first step of calibration by gently wiggling each axis. ")
101 }
102 }
103
104 FactCheckBoxSlider {
105 Layout.fillWidth: true
106 text: qsTr("MANUAL_CONTROL Pitch Extension")
107 fact: _joystickSettings.enableManualControlPitchExtension
108 visible: fact.visible
109 }
110
111 FactCheckBoxSlider {
112 Layout.fillWidth: true
113 text: qsTr("MANUAL_CONTROL Roll Extension")
114 fact: _joystickSettings.enableManualControlRollExtension
115 visible: fact.visible
116 }
117
118 FactCheckBoxSlider {
119 Layout.fillWidth: true
120 text: qsTr("MANUAL_CONTROL Aux1")
121 fact: _joystickSettings.enableManualControlAux1
122 visible: fact.visible
123 }
124
125 FactCheckBoxSlider {
126 Layout.fillWidth: true
127 text: qsTr("MANUAL_CONTROL Aux2")
128 fact: _joystickSettings.enableManualControlAux2
129 visible: fact.visible
130 }
131
132 FactCheckBoxSlider {
133 Layout.fillWidth: true
134 text: qsTr("MANUAL_CONTROL Aux3")
135 fact: _joystickSettings.enableManualControlAux3
136 visible: fact.visible
137 }
138
139 FactCheckBoxSlider {
140 Layout.fillWidth: true
141 text: qsTr("MANUAL_CONTROL Aux4")
142 fact: _joystickSettings.enableManualControlAux4
143 visible: fact.visible
144 }
145
146 FactCheckBoxSlider {
147 Layout.fillWidth: true
148 text: qsTr("MANUAL_CONTROL Aux5")
149 fact: _joystickSettings.enableManualControlAux5
150 visible: fact.visible
151 }
152
153 FactCheckBoxSlider {
154 Layout.fillWidth: true
155 text: qsTr("MANUAL_CONTROL Aux6")
156 fact: _joystickSettings.enableManualControlAux6
157 visible: fact.visible
158 }
159 }
160}