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 {
...
@@ -61,7 +61,6 @@ Item {
property
real
_distance
:
0.0
property
real
_distance
:
0.0
property
string
_messageTitle
:
""
property
string
_messageTitle
:
""
property
string
_messageText
:
""
property
string
_messageText
:
""
property
bool
_showAttitude
:
true
function
secondsToHHMMSS
(
timeS
)
{
function
secondsToHHMMSS
(
timeS
)
{
var
sec_num
=
parseInt
(
timeS
,
10
);
var
sec_num
=
parseInt
(
timeS
,
10
);
...
@@ -260,19 +259,25 @@ Item {
...
@@ -260,19 +259,25 @@ Item {
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.right
:
attitudeIndicator
.
visible
?
attitudeIndicator
.
left
:
parent
.
right
anchors.right
:
attitudeIndicator
.
visible
?
attitudeIndicator
.
left
:
parent
.
right
anchors.rightMargin
:
attitudeIndicator
.
visible
?
-
ScreenTools
.
defaultFontPixelWidth
:
ScreenTools
.
defaultFontPixelWidth
anchors.rightMargin
:
attitudeIndicator
.
visible
?
-
ScreenTools
.
defaultFontPixelWidth
:
ScreenTools
.
defaultFontPixelWidth
GridLayout
{
id
:
vehicleStatusGrid
readonly
property
bool
_showGps
:
CustomQuickInterface
.
showAttitudeWidget
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
GridLayout
{
id
:
vehicleStatusGrid
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
*
1.5
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
columns
:
7
columns
:
7
anchors.centerIn
:
parent
anchors.centerIn
:
parent
//-- Latitude
//-- Latitude
QGCLabel
{
QGCLabel
{
height
:
_indicatorsHeight
height
:
_indicatorsHeight
width
:
height
width
:
height
Layout.alignment
:
Qt
.
AlignVCenter
|
Qt
.
AlignHCenter
Layout.alignment
:
Qt
.
AlignVCenter
|
Qt
.
AlignHCenter
color
:
qgcPal
.
text
color
:
qgcPal
.
text
text
:
"
lat:
"
text
:
"
Lat:
"
visible
:
vehicleIndicator
.
_showGps
}
}
QGCLabel
{
QGCLabel
{
id
:
firstLabel
id
:
firstLabel
...
@@ -282,6 +287,7 @@ Item {
...
@@ -282,6 +287,7 @@ Item {
Layout.fillWidth
:
true
Layout.fillWidth
:
true
Layout.minimumWidth
:
indicatorValueWidth
Layout.minimumWidth
:
indicatorValueWidth
horizontalAlignment
:
Text
.
AlignLeft
horizontalAlignment
:
Text
.
AlignLeft
visible
:
vehicleIndicator
.
_showGps
}
}
//-- Longitude
//-- Longitude
QGCLabel
{
QGCLabel
{
...
@@ -289,7 +295,8 @@ Item {
...
@@ -289,7 +295,8 @@ Item {
width
:
height
width
:
height
Layout.alignment
:
Qt
.
AlignVCenter
|
Qt
.
AlignHCenter
Layout.alignment
:
Qt
.
AlignVCenter
|
Qt
.
AlignHCenter
color
:
qgcPal
.
text
color
:
qgcPal
.
text
text
:
"
lon:
"
text
:
"
Lon:
"
visible
:
vehicleIndicator
.
_showGps
}
}
QGCLabel
{
QGCLabel
{
text
:
activeVehicle
?
activeVehicle
.
gps
.
lon
.
value
.
toFixed
(
activeVehicle
.
gps
.
lon
.
decimalPlaces
)
:
"
-
"
text
:
activeVehicle
?
activeVehicle
.
gps
.
lon
.
value
.
toFixed
(
activeVehicle
.
gps
.
lon
.
decimalPlaces
)
:
"
-
"
...
@@ -298,6 +305,7 @@ Item {
...
@@ -298,6 +305,7 @@ Item {
Layout.fillWidth
:
true
Layout.fillWidth
:
true
Layout.minimumWidth
:
indicatorValueWidth
Layout.minimumWidth
:
indicatorValueWidth
horizontalAlignment
:
firstLabel
.
horizontalAlignment
horizontalAlignment
:
firstLabel
.
horizontalAlignment
visible
:
vehicleIndicator
.
_showGps
}
}
//-- HDOP
//-- HDOP
QGCLabel
{
QGCLabel
{
...
@@ -306,6 +314,7 @@ Item {
...
@@ -306,6 +314,7 @@ Item {
Layout.alignment
:
Qt
.
AlignVCenter
|
Qt
.
AlignHCenter
Layout.alignment
:
Qt
.
AlignVCenter
|
Qt
.
AlignHCenter
color
:
qgcPal
.
text
color
:
qgcPal
.
text
text
:
"
HDOP:
"
text
:
"
HDOP:
"
visible
:
vehicleIndicator
.
_showGps
}
}
QGCLabel
{
QGCLabel
{
text
:
activeVehicle
?
activeVehicle
.
gps
.
hdop
.
value
.
toFixed
(
activeVehicle
.
gps
.
hdop
.
decimalPlaces
)
:
"
-
"
text
:
activeVehicle
?
activeVehicle
.
gps
.
hdop
.
value
.
toFixed
(
activeVehicle
.
gps
.
hdop
.
decimalPlaces
)
:
"
-
"
...
@@ -314,6 +323,7 @@ Item {
...
@@ -314,6 +323,7 @@ Item {
Layout.fillWidth
:
true
Layout.fillWidth
:
true
Layout.minimumWidth
:
indicatorValueWidth
Layout.minimumWidth
:
indicatorValueWidth
horizontalAlignment
:
firstLabel
.
horizontalAlignment
horizontalAlignment
:
firstLabel
.
horizontalAlignment
visible
:
vehicleIndicator
.
_showGps
}
}
//-- Compass
//-- Compass
...
@@ -506,7 +516,7 @@ Item {
...
@@ -506,7 +516,7 @@ Item {
}
}
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
onDoubleClicked
:
_showAttitude
=
!
_showAttitude
onDoubleClicked
:
CustomQuickInterface
.
showAttitudeWidget
=
!
CustomQuickInterface
.
showAttitudeWidget
}
}
}
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
...
@@ -515,7 +525,7 @@ Item {
...
@@ -515,7 +525,7 @@ Item {
color
:
qgcPal
.
window
color
:
qgcPal
.
window
width
:
attitudeIndicator
.
width
*
0.5
width
:
attitudeIndicator
.
width
*
0.5
height
:
vehicleIndicator
.
height
height
:
vehicleIndicator
.
height
visible
:
_showAttitude
visible
:
CustomQuickInterface
.
showAttitudeWidget
anchors.top
:
vehicleIndicator
.
top
anchors.top
:
vehicleIndicator
.
top
anchors.left
:
vehicleIndicator
.
right
anchors.left
:
vehicleIndicator
.
right
}
}
...
@@ -529,7 +539,7 @@ Item {
...
@@ -529,7 +539,7 @@ Item {
width
:
height
width
:
height
radius
:
height
*
0.5
radius
:
height
*
0.5
color
:
qgcPal
.
windowShade
color
:
qgcPal
.
windowShade
visible
:
_showAttitude
visible
:
CustomQuickInterface
.
showAttitudeWidget
CustomAttitudeWidget
{
CustomAttitudeWidget
{
size
:
parent
.
height
*
0.95
size
:
parent
.
height
*
0.95
vehicle
:
activeVehicle
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