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
e0b483ff
Commit
e0b483ff
authored
Jun 07, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3501 from DonLakeFlyer/FlightModeSmallScreen
Flight Mode: Flow sections to available real estate
parents
c99edca4
6dc04346
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
124 additions
and
120 deletions
+124
-120
APMFlightModesComponent.qml
src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
+122
-118
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+2
-2
No files found.
src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
View file @
e0b483ff
...
...
@@ -44,136 +44,140 @@ QGCView {
QGCFlickable
{
anchors.fill
:
parent
clip
:
true
flickableDirection
:
Flickable
.
VerticalFlick
contentHeight
:
flightModeSettings
.
y
+
flightModeSettings
.
height
QGCLabel
{
id
:
flightModeLabel
text
:
qsTr
(
"
Flight Mode Settings
"
)
+
(
_fltmodeChExists
?
""
:
qsTr
(
"
(Channel 5)
"
))
font.family
:
ScreenTools
.
demiboldFontFamily
}
Rectangle
{
id
:
flightModeSettings
anchors.topMargin
:
_margins
anchors.top
:
flightModeLabel
.
bottom
width
:
flightModeColumn
.
width
+
(
_margins
*
2
)
height
:
flightModeColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
contentHeight
:
flowLayout
.
height
contentWidth
:
flowLayout
.
width
Column
{
id
:
flightModeColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelHeight
Row
{
spacing
:
_margins
visible
:
_fltmodeChExists
QGCLabel
{
id
:
modeChannelLabel
anchors.baseline
:
modeChannelCombo
.
baseline
text
:
qsTr
(
"
Flight mode channel:
"
)
}
QGCComboBox
{
id
:
modeChannelCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
model
:
[
qsTr
(
"
Not assigned
"
),
qsTr
(
"
Channel 1
"
),
qsTr
(
"
Channel 2
"
),
qsTr
(
"
Channel 3
"
),
qsTr
(
"
Channel 4
"
),
qsTr
(
"
Channel 5
"
),
qsTr
(
"
Channel 6
"
),
qsTr
(
"
Channel 7
"
),
qsTr
(
"
Channel 8
"
)
]
currentIndex
:
_fltmodeCh
.
value
onActivated
:
_fltmodeCh
.
value
=
index
}
}
Repeater
{
model
:
6
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
property
int
index
:
modelData
+
1
property
var
pwmStrings
:
[
"
PWM 0 - 1230
"
,
"
PWM 1231 - 1360
"
,
"
PWM 1361 - 1490
"
,
"
PWM 1491 - 1620
"
,
"
PWM 1621 - 1749
"
,
"
PWM 1750 +
"
]
Flow
{
id
:
flowLayout
width
:
panel
.
width
// parent.width doesn't work here for some reason!
spacing
:
_margins
Column
{
spacing
:
_margins
QGCLabel
{
anchors.baseline
:
modeCombo
.
baseline
text
:
qsTr
(
"
Flight Mode
"
)
+
index
+
"
:
"
color
:
controller
.
activeFlightMode
==
index
?
"
yellow
"
:
qgcPal
.
text
}
QGCLabel
{
id
:
flightModeLabel
text
:
qsTr
(
"
Flight Mode Settings
"
)
+
(
_fltmodeChExists
?
""
:
qsTr
(
"
(Channel 5)
"
))
font.family
:
ScreenTools
.
demiboldFontFamily
}
FactComboBox
{
id
:
modeCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
controller
.
getParameterFact
(
-
1
,
"
FLTMODE
"
+
index
)
indexModel
:
false
Rectangle
{
id
:
flightModeSettings
width
:
flightModeColumn
.
width
+
(
_margins
*
2
)
height
:
flightModeColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
Column
{
id
:
flightModeColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelHeight
Row
{
spacing
:
_margins
visible
:
_fltmodeChExists
QGCLabel
{
id
:
modeChannelLabel
anchors.baseline
:
modeChannelCombo
.
baseline
text
:
qsTr
(
"
Flight mode channel:
"
)
}
QGCComboBox
{
id
:
modeChannelCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
model
:
[
qsTr
(
"
Not assigned
"
),
qsTr
(
"
Channel 1
"
),
qsTr
(
"
Channel 2
"
),
qsTr
(
"
Channel 3
"
),
qsTr
(
"
Channel 4
"
),
qsTr
(
"
Channel 5
"
),
qsTr
(
"
Channel 6
"
),
qsTr
(
"
Channel 7
"
),
qsTr
(
"
Channel 8
"
)
]
currentIndex
:
_fltmodeCh
.
value
onActivated
:
_fltmodeCh
.
value
=
index
}
}
QGCLabel
{
anchors.baseline
:
modeCombo
.
baseline
text
:
pwmStrings
[
modelData
]
}
}
}
// Repeater - Flight Modes
Repeater
{
model
:
6
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
property
int
index
:
modelData
+
1
property
var
pwmStrings
:
[
"
PWM 0 - 1230
"
,
"
PWM 1231 - 1360
"
,
"
PWM 1361 - 1490
"
,
"
PWM 1491 - 1620
"
,
"
PWM 1621 - 1749
"
,
"
PWM 1750 +
"
]
QGCLabel
{
anchors.baseline
:
modeCombo
.
baseline
text
:
qsTr
(
"
Flight Mode
"
)
+
index
+
"
:
"
color
:
controller
.
activeFlightMode
==
index
?
"
yellow
"
:
qgcPal
.
text
}
FactComboBox
{
id
:
modeCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
controller
.
getParameterFact
(
-
1
,
"
FLTMODE
"
+
index
)
indexModel
:
false
}
QGCLabel
{
anchors.baseline
:
modeCombo
.
baseline
text
:
pwmStrings
[
modelData
]
}
}
}
// Repeater - Flight Modes
}
// Column - Flight Modes
}
// Rectangle - Flight Modes
}
// Column - Flight Modes
}
// Rectangle - Flight Modes
QGCLabel
{
id
:
channelOptionsLabel
anchors.leftMargin
:
_margins
anchors.top
:
parent
.
top
anchors.left
:
flightModeSettings
.
right
text
:
qsTr
(
"
Channel Options
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
visible
:
_channelOptionCount
!=
0
}
Rectangle
{
id
:
channelOptionsSettings
anchors.topMargin
:
_margins
anchors.top
:
channelOptionsLabel
.
bottom
anchors.left
:
channelOptionsLabel
.
left
width
:
channelOptColumn
.
width
+
(
_margins
*
2
)
height
:
channelOptColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
visible
:
_channelOptionCount
!=
0
Column
{
id
:
channelOptColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelHeight
Repeater
{
model
:
_channelOptionCount
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
property
int
index
:
modelData
+
7
property
Fact
nullFact
:
Fact
{
}
spacing
:
_margins
visible
:
_channelOptionCount
!=
0
QGCLabel
{
anchors.baseline
:
optCombo
.
baseline
text
:
qsTr
(
"
Channel option %1 :
"
).
arg
(
index
)
color
:
controller
.
channelOptionEnabled
[
modelData
]
?
"
yellow
"
:
qgcPal
.
text
}
QGCLabel
{
id
:
channelOptionsLabel
text
:
qsTr
(
"
Channel Options
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
FactComboBox
{
id
:
optCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
controller
.
getParameterFact
(
-
1
,
"
CH
"
+
index
+
"
_OPT
"
)
indexModel
:
false
}
}
}
// Repeater -- Channel options
Rectangle
{
id
:
channelOptionsSettings
width
:
channelOptColumn
.
width
+
(
_margins
*
2
)
height
:
channelOptColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
Column
{
id
:
channelOptColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelHeight
Repeater
{
model
:
_channelOptionCount
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
property
int
index
:
modelData
+
7
property
Fact
nullFact
:
Fact
{
}
QGCLabel
{
anchors.baseline
:
optCombo
.
baseline
text
:
qsTr
(
"
Channel option %1 :
"
).
arg
(
index
)
color
:
controller
.
channelOptionEnabled
[
modelData
]
?
"
yellow
"
:
qgcPal
.
text
}
FactComboBox
{
id
:
optCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
controller
.
getParameterFact
(
-
1
,
"
CH
"
+
index
+
"
_OPT
"
)
indexModel
:
false
}
}
}
// Repeater -- Channel options
}
// Column - Channel options
}
// Rectangle - Channel options
}
// Column - Channel options
}
//
Rectangle - Channel options
}
//
Flow
}
// QGCFlickable
}
// QGCViewPanel
}
// QGCView
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
e0b483ff
...
...
@@ -238,7 +238,7 @@ Item {
//-- Zoom Map In
RoundButton
{
id
:
mapZoomPlus
visible
:
_mainIsMap
visible
:
!
ScreenTools
.
isTinyScreen
&&
_mainIsMap
buttonImage
:
"
/qmlimages/ZoomPlus.svg
"
exclusiveGroup
:
_dropButtonsExclusiveGroup
z
:
QGroundControl
.
zOrderWidgets
...
...
@@ -253,7 +253,7 @@ Item {
//-- Zoom Map Out
RoundButton
{
id
:
mapZoomMinus
visible
:
_mainIsMap
visible
:
!
ScreenTools
.
isTinyScreen
&&
_mainIsMap
buttonImage
:
"
/qmlimages/ZoomMinus.svg
"
exclusiveGroup
:
_dropButtonsExclusiveGroup
z
:
QGroundControl
.
zOrderWidgets
...
...
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