Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
5e051cb0
Commit
5e051cb0
authored
Jan 10, 2016
by
dogmaphobic
Browse files
GPS Indicator fixes.
parent
6006dc32
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ui/toolbar/MainToolBar.qml
View file @
5e051cb0
...
...
@@ -190,16 +190,22 @@ Rectangle {
function
getGpsLockStatus
()
{
if
(
activeVehicle
)
{
if
(
activeVehicle
.
satelliteLock
==
0
)
{
return
"
No Satellite Link
"
}
if
(
activeVehicle
.
satelliteLock
==
1
)
{
return
"
No GPS Lock
"
if
(
activeVehicle
.
satelliteLock
<
2
)
{
return
"
No Satellite Lock
"
}
if
(
activeVehicle
.
satelliteLock
==
2
)
{
return
"
2D Lock
"
}
return
"
3D Lock
"
if
(
activeVehicle
.
satelliteLock
==
3
)
{
return
"
3D Lock
"
}
if
(
activeVehicle
.
satelliteLock
==
4
)
{
return
"
3D Lock with Differential
"
}
if
(
activeVehicle
.
satelliteLock
==
5
)
{
return
"
3D Lock with Relative Positioning
"
}
return
"
Unkown Lock Type (
"
+
activeVehicle
.
satelliteLock
+
"
)
"
}
return
"
N/A
"
}
...
...
@@ -226,14 +232,14 @@ Rectangle {
anchors.centerIn
:
parent
QGCLabel
{
id
:
gpsLabel
text
:
(
activeVehicle
&&
(
activeVehicle
.
satelliteCount
>
0
)
)
?
"
GPS Status
"
:
"
GPS Data Unavailable
"
text
:
(
activeVehicle
&&
activeVehicle
.
satelliteCount
>
=
0
)
?
"
GPS Status
"
:
"
GPS Data Unavailable
"
font.weight
:
Font
.
DemiBold
color
:
colorWhite
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
GridLayout
{
id
:
gpsGrid
visible
:
(
activeVehicle
&&
(
activeVehicle
.
satelliteCount
>
0
)
)
visible
:
(
activeVehicle
&&
activeVehicle
.
satelliteCount
>
=
0
)
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.horizontalCenter
:
parent
.
horizontalCenter
...
...
src/ui/toolbar/MainToolBarIndicators.qml
View file @
5e051cb0
...
...
@@ -176,7 +176,7 @@ Row {
smooth
:
true
width
:
mainWindow
.
tbCellHeight
*
0.65
height
:
mainWindow
.
tbCellHeight
*
0.5
opacity
:
activeVehicle
?
(
activeVehicle
.
satelliteCount
<
1
?
0.5
:
1
)
:
0.5
opacity
:
(
activeVehicle
&&
activeVehicle
.
satelliteCount
>=
0
)
?
1
:
0.5
anchors.verticalCenter
:
parent
.
verticalCenter
}
SignalStrength
{
...
...
@@ -186,10 +186,10 @@ Row {
}
}
QGCLabel
{
text
:
activeVehicle
?
activeVehicle
.
satelliteCount
:
0
text
:
(
activeVehicle
&&
activeVehicle
.
satelliteCount
>=
0
)
?
activeVehicle
.
satelliteCount
:
""
visible
:
(
activeVehicle
&&
activeVehicle
.
satelliteCount
>=
0
)
font.pixelSize
:
tbFontSmall
color
:
colorWhite
opacity
:
activeVehicle
?
(
activeVehicle
.
satelliteCount
<
1
?
0.5
:
1
)
:
0.5
anchors.top
:
parent
.
top
anchors.leftMargin
:
gpsIcon
.
width
anchors.left
:
parent
.
left
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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