|
|
|
@ -35,8 +35,10 @@ QGCView {
@@ -35,8 +35,10 @@ QGCView {
|
|
|
|
|
id: rootQGCView |
|
|
|
|
viewPanel: panel |
|
|
|
|
|
|
|
|
|
property real _margins: ScreenTools.defaultFontPixelHeight |
|
|
|
|
property bool _channelOptionsAvailable: controller.parameterExists(-1, "CH7_OPT") // Not available in all firmware types |
|
|
|
|
property real _margins: ScreenTools.defaultFontPixelHeight |
|
|
|
|
property bool _channel7OptionsAvailable: controller.parameterExists(-1, "CH7_OPT") // Not available in all firmware types |
|
|
|
|
property bool _channel9OptionsAvailable: controller.parameterExists(-1, "CH9_OPT") // Not available in all firmware types |
|
|
|
|
property int _channelOptionCount: _channel7OptionsAvailable ? (_channel9OptionsAvailable ? 6 : 2) : 0 |
|
|
|
|
|
|
|
|
|
QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled } |
|
|
|
|
|
|
|
|
@ -117,7 +119,7 @@ QGCView {
@@ -117,7 +119,7 @@ QGCView {
|
|
|
|
|
anchors.left: flightModeSettings.right |
|
|
|
|
text: "Channel Options" |
|
|
|
|
font.weight: Font.DemiBold |
|
|
|
|
visible: _channelOptionsAvailable |
|
|
|
|
visible: _channelOptionCount != 0 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
@ -128,7 +130,7 @@ QGCView {
@@ -128,7 +130,7 @@ QGCView {
|
|
|
|
|
width: channelOptColumn.width + (_margins * 2) |
|
|
|
|
height: channelOptColumn.height + ScreenTools.defaultFontPixelHeight |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
visible: _channelOptionsAvailable |
|
|
|
|
visible: _channelOptionCount != 0 |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
id: channelOptColumn |
|
|
|
@ -138,7 +140,7 @@ QGCView {
@@ -138,7 +140,7 @@ QGCView {
|
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
model: 6 |
|
|
|
|
model: _channelOptionCount |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
@ -155,7 +157,7 @@ QGCView {
@@ -155,7 +157,7 @@ QGCView {
|
|
|
|
|
FactComboBox { |
|
|
|
|
id: optCombo |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 15 |
|
|
|
|
fact: _channelOptionsAvailable ? controller.getParameterFact(-1, "CH" + index + "_OPT") : nullFact |
|
|
|
|
fact: controller.getParameterFact(-1, "CH" + index + "_OPT") |
|
|
|
|
indexModel: false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|