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
73a4286d
Commit
73a4286d
authored
Aug 13, 2019
by
Stefan Dunca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
custom-example: Make GPS info optional and persistent
parent
80ce7ae0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
CustomFlyView.qml
custom-example/res/CustomFlyView.qml
+19
-9
No files found.
custom-example/res/CustomFlyView.qml
View file @
73a4286d
...
...
@@ -61,7 +61,6 @@ Item {
property
real
_distance
:
0.0
property
string
_messageTitle
:
""
property
string
_messageText
:
""
property
bool
_showAttitude
:
true
function
secondsToHHMMSS
(
timeS
)
{
var
sec_num
=
parseInt
(
timeS
,
10
);
...
...
@@ -260,19 +259,25 @@ Item {
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.right
:
attitudeIndicator
.
visible
?
attitudeIndicator
.
left
:
parent
.
right
anchors.rightMargin
:
attitudeIndicator
.
visible
?
-
ScreenTools
.
defaultFontPixelWidth
:
ScreenTools
.
defaultFontPixelWidth
GridLayout
{
id
:
vehicleStatusGrid
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
readonly
property
bool
_showGps
:
CustomQuickInterface
.
showAttitudeWidget
GridLayout
{
id
:
vehicleStatusGrid
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
columns
:
7
anchors.centerIn
:
parent
//-- Latitude
QGCLabel
{
height
:
_indicatorsHeight
width
:
height
Layout.alignment
:
Qt
.
AlignVCenter
|
Qt
.
AlignHCenter
color
:
qgcPal
.
text
text
:
"
lat:
"
text
:
"
Lat:
"
visible
:
vehicleIndicator
.
_showGps
}
QGCLabel
{
id
:
firstLabel
...
...
@@ -282,6 +287,7 @@ Item {
Layout.fillWidth
:
true
Layout.minimumWidth
:
indicatorValueWidth
horizontalAlignment
:
Text
.
AlignLeft
visible
:
vehicleIndicator
.
_showGps
}
//-- Longitude
QGCLabel
{
...
...
@@ -289,7 +295,8 @@ Item {
width
:
height
Layout.alignment
:
Qt
.
AlignVCenter
|
Qt
.
AlignHCenter
color
:
qgcPal
.
text
text
:
"
lon:
"
text
:
"
Lon:
"
visible
:
vehicleIndicator
.
_showGps
}
QGCLabel
{
text
:
activeVehicle
?
activeVehicle
.
gps
.
lon
.
value
.
toFixed
(
activeVehicle
.
gps
.
lon
.
decimalPlaces
)
:
"
-
"
...
...
@@ -298,6 +305,7 @@ Item {
Layout.fillWidth
:
true
Layout.minimumWidth
:
indicatorValueWidth
horizontalAlignment
:
firstLabel
.
horizontalAlignment
visible
:
vehicleIndicator
.
_showGps
}
//-- HDOP
QGCLabel
{
...
...
@@ -306,6 +314,7 @@ Item {
Layout.alignment
:
Qt
.
AlignVCenter
|
Qt
.
AlignHCenter
color
:
qgcPal
.
text
text
:
"
HDOP:
"
visible
:
vehicleIndicator
.
_showGps
}
QGCLabel
{
text
:
activeVehicle
?
activeVehicle
.
gps
.
hdop
.
value
.
toFixed
(
activeVehicle
.
gps
.
hdop
.
decimalPlaces
)
:
"
-
"
...
...
@@ -314,6 +323,7 @@ Item {
Layout.fillWidth
:
true
Layout.minimumWidth
:
indicatorValueWidth
horizontalAlignment
:
firstLabel
.
horizontalAlignment
visible
:
vehicleIndicator
.
_showGps
}
//-- Compass
...
...
@@ -506,7 +516,7 @@ Item {
}
MouseArea
{
anchors.fill
:
parent
onDoubleClicked
:
_showAttitude
=
!
_showAttitude
onDoubleClicked
:
CustomQuickInterface
.
showAttitudeWidget
=
!
CustomQuickInterface
.
showAttitudeWidget
}
}
//-------------------------------------------------------------------------
...
...
@@ -515,7 +525,7 @@ Item {
color
:
qgcPal
.
window
width
:
attitudeIndicator
.
width
*
0.5
height
:
vehicleIndicator
.
height
visible
:
_showAttitude
visible
:
CustomQuickInterface
.
showAttitudeWidget
anchors.top
:
vehicleIndicator
.
top
anchors.left
:
vehicleIndicator
.
right
}
...
...
@@ -529,7 +539,7 @@ Item {
width
:
height
radius
:
height
*
0.5
color
:
qgcPal
.
windowShade
visible
:
_showAttitude
visible
:
CustomQuickInterface
.
showAttitudeWidget
CustomAttitudeWidget
{
size
:
parent
.
height
*
0.95
vehicle
:
activeVehicle
...
...
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