|
|
|
@ -27,8 +27,8 @@ Item {
@@ -27,8 +27,8 @@ Item {
|
|
|
|
|
|
|
|
|
|
property real _margins: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
|
|
|
|
|
readonly property real _flightModeComboWidth: ScreenTools.defaultFontPixelWidth * 23 |
|
|
|
|
readonly property real _channelComboWidth: ScreenTools.defaultFontPixelWidth * 20 |
|
|
|
|
readonly property real _flightModeComboWidth: ScreenTools.defaultFontPixelWidth * 13 |
|
|
|
|
readonly property real _channelComboWidth: ScreenTools.defaultFontPixelWidth * 13 |
|
|
|
|
|
|
|
|
|
QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled } |
|
|
|
|
|
|
|
|
@ -80,7 +80,7 @@ Item {
@@ -80,7 +80,7 @@ Item {
|
|
|
|
|
QGCLabel { |
|
|
|
|
id: modeChannelLabel |
|
|
|
|
anchors.baseline: modeChannelCombo.baseline |
|
|
|
|
text: qsTr("Flight mode channel:") |
|
|
|
|
text: qsTr("Mode channel:") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
@ -139,28 +139,62 @@ Item {
@@ -139,28 +139,62 @@ Item {
|
|
|
|
|
anchors.top: parent.top |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
model: [ "RC_MAP_RETURN_SW", "RC_MAP_KILL_SW", "RC_MAP_OFFB_SW" ] |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
property Fact fact: controller.getParameterFact(-1, "RC_MAP_RETURN_SW") |
|
|
|
|
|
|
|
|
|
property Fact fact: controller.getParameterFact(-1, modelData) |
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: returnCombo.baseline |
|
|
|
|
text: "Return switch:" |
|
|
|
|
color: fact.value == 0 ? qgcPal.text : (controller.rcChannelValues[fact.value - 1] >= 1500 ? "yellow" : qgcPal.text) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: optCombo.baseline |
|
|
|
|
text: fact.shortDescription + ":" |
|
|
|
|
color: fact.value == 0 ? qgcPal.text : (controller.rcChannelValues[fact.value - 1] >= 1500 ? "yellow" : qgcPal.text) |
|
|
|
|
} |
|
|
|
|
FactComboBox { |
|
|
|
|
id: returnCombo |
|
|
|
|
width: _channelComboWidth |
|
|
|
|
fact: parent.fact |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
|
id: optCombo |
|
|
|
|
width: _channelComboWidth |
|
|
|
|
fact: parent.fact |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
property Fact fact: controller.getParameterFact(-1, "RC_MAP_KILL_SW") |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: killCombo.baseline |
|
|
|
|
text: "Kill switch:" |
|
|
|
|
color: fact.value == 0 ? qgcPal.text : (controller.rcChannelValues[fact.value - 1] >= 1500 ? "yellow" : qgcPal.text) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
|
id: killCombo |
|
|
|
|
width: _channelComboWidth |
|
|
|
|
fact: parent.fact |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
} // Repeater |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
property Fact fact: controller.getParameterFact(-1, "RC_MAP_OFFB_SW") |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.baseline: offboardCombo.baseline |
|
|
|
|
text: "Offboard switch:" |
|
|
|
|
color: fact.value == 0 ? qgcPal.text : (controller.rcChannelValues[fact.value - 1] >= 1500 ? "yellow" : qgcPal.text) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
|
id: offboardCombo |
|
|
|
|
width: _channelComboWidth |
|
|
|
|
fact: parent.fact |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} // Column |
|
|
|
|
} // Rectangle |
|
|
|
|
|
|
|
|
|