Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
82e8b33b
Commit
82e8b33b
authored
Dec 20, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle missing channel options
parent
8eced4a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
APMFlightModesComponent.qml
src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
+5
-3
No files found.
src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
View file @
82e8b33b
...
@@ -36,6 +36,7 @@ QGCView {
...
@@ -36,6 +36,7 @@ QGCView {
viewPanel
:
panel
viewPanel
:
panel
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
property
bool
_channelOptionsAvailable
:
controller
.
parameterExists
(
-
1
,
"
CH7_OPT
"
)
// Not available in all firmware types
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
...
@@ -116,6 +117,7 @@ QGCView {
...
@@ -116,6 +117,7 @@ QGCView {
anchors.left
:
flightModeSettings
.
right
anchors.left
:
flightModeSettings
.
right
text
:
"
Channel Options
"
text
:
"
Channel Options
"
font.weight
:
Font
.
DemiBold
font.weight
:
Font
.
DemiBold
visible
:
_channelOptionsAvailable
}
}
Rectangle
{
Rectangle
{
...
@@ -126,6 +128,7 @@ QGCView {
...
@@ -126,6 +128,7 @@ QGCView {
width
:
channelOptColumn
.
width
+
(
_margins
*
2
)
width
:
channelOptColumn
.
width
+
(
_margins
*
2
)
height
:
channelOptColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
height
:
channelOptColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
color
:
qgcPal
.
windowShade
visible
:
_channelOptionsAvailable
Column
{
Column
{
id
:
channelOptColumn
id
:
channelOptColumn
...
@@ -141,19 +144,18 @@ QGCView {
...
@@ -141,19 +144,18 @@ QGCView {
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
ScreenTools
.
defaultFontPixelWidth
property
int
index
:
modelData
+
7
property
int
index
:
modelData
+
7
property
Fact
nullFact
:
Fact
{
}
QGCLabel
{
QGCLabel
{
anchors.baseline
:
optCombo
.
baseline
anchors.baseline
:
optCombo
.
baseline
text
:
"
Channel option
"
+
index
+
"
:
"
text
:
"
Channel option
"
+
index
+
"
:
"
color
:
controller
.
channelOptionEnabled
[
modelData
]
?
qgcPal
.
buttonHighlight
:
qgcPal
.
text
color
:
controller
.
channelOptionEnabled
[
modelData
]
?
qgcPal
.
buttonHighlight
:
qgcPal
.
text
Component.onCompleted
:
console
.
log
(
index
,
controller
.
channelOptionEnabled
[
modelData
])
}
}
FactComboBox
{
FactComboBox
{
id
:
optCombo
id
:
optCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
controller
.
getParameterFact
(
-
1
,
"
CH
"
+
index
+
"
_OPT
"
)
fact
:
_channelOptionsAvailable
?
controller
.
getParameterFact
(
-
1
,
"
CH
"
+
index
+
"
_OPT
"
)
:
nullFact
indexModel
:
false
indexModel
:
false
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment