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
c87b34b1
Commit
c87b34b1
authored
Jun 26, 2016
by
Don Gagne
Committed by
GitHub
Jun 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show sat count and hdop instead of signal strength (#3660)
parent
dcfc0b1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
43 deletions
+32
-43
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+1
-1
MainToolBarIndicators.qml
src/ui/toolbar/MainToolBarIndicators.qml
+31
-42
No files found.
src/ui/toolbar/MainToolBar.qml
View file @
c87b34b1
...
@@ -67,7 +67,7 @@ Rectangle {
...
@@ -67,7 +67,7 @@ Rectangle {
function
getBatteryColor
()
{
function
getBatteryColor
()
{
if
(
activeVehicle
)
{
if
(
activeVehicle
)
{
if
(
activeVehicle
.
battery
.
percentRemaining
.
value
>
75
)
{
if
(
activeVehicle
.
battery
.
percentRemaining
.
value
>
75
)
{
return
colorGreen
return
qgcPal
.
text
}
}
if
(
activeVehicle
.
battery
.
percentRemaining
.
value
>
50
)
{
if
(
activeVehicle
.
battery
.
percentRemaining
.
value
>
50
)
{
return
colorOrange
return
colorOrange
...
...
src/ui/toolbar/MainToolBarIndicators.qml
View file @
c87b34b1
...
@@ -24,19 +24,6 @@ Row {
...
@@ -24,19 +24,6 @@ Row {
QGCPalette
{
id
:
qgcPal
}
QGCPalette
{
id
:
qgcPal
}
//-------------------------------------------------------------------------
function
getSatStrength
(
hdop
)
{
if
(
hdop
<=
1.0
)
return
100
if
(
hdop
<=
1.4
)
return
75
if
(
hdop
<=
1.8
)
return
50
if
(
hdop
<=
3.0
)
return
25
return
0
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
function
getMessageColor
()
{
function
getMessageColor
()
{
if
(
activeVehicle
)
{
if
(
activeVehicle
)
{
...
@@ -130,38 +117,40 @@ Row {
...
@@ -130,38 +117,40 @@ Row {
//-- GPS Indicator
//-- GPS Indicator
Item
{
Item
{
id
:
satelitte
id
:
satelitte
width
:
gpsRow
.
width
*
1.1
width
:
(
gpsValuesColumn
.
x
+
gpsValuesColumn
.
width
)
*
1.1
height
:
mainWindow
.
tbCellHeight
height
:
mainWindow
.
tbCellHeight
Row
{
id
:
gpsRow
QGCColoredImage
{
height
:
parent
.
height
id
:
gpsIcon
spacing
:
ScreenTools
.
defaultFontPixelWidth
source
:
"
/qmlimages/Gps.svg
"
QGCColoredImage
{
fillMode
:
Image
.
PreserveAspectFit
id
:
gpsIcon
width
:
mainWindow
.
tbCellHeight
*
0.65
source
:
"
/qmlimages/Gps.svg
"
height
:
mainWindow
.
tbCellHeight
*
0.5
fillMode
:
Image
.
PreserveAspectFit
sourceSize.height
:
height
width
:
mainWindow
.
tbCellHeight
*
0.65
opacity
:
(
activeVehicle
&&
activeVehicle
.
gps
.
count
.
value
>=
0
)
?
1
:
0.5
height
:
mainWindow
.
tbCellHeight
*
0.5
color
:
qgcPal
.
buttonText
sourceSize.height
:
height
anchors.verticalCenter
:
parent
.
verticalCenter
opacity
:
(
activeVehicle
&&
activeVehicle
.
gps
.
count
.
value
>=
0
)
?
1
:
0.5
}
color
:
qgcPal
.
buttonText
anchors.verticalCenter
:
parent
.
verticalCenter
Column
{
id
:
gpsValuesColumn
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.left
:
gpsIcon
.
right
QGCLabel
{
visible
:
activeVehicle
&&
!
isNaN
(
activeVehicle
.
gps
.
hdop
.
value
)
color
:
qgcPal
.
buttonText
text
:
activeVehicle
?
activeVehicle
.
gps
.
count
.
valueString
:
""
}
}
SignalStrength
{
size
:
mainWindow
.
tbCellHeight
*
0.5
QGCLabel
{
percent
:
activeVehicle
?
getSatStrength
(
activeVehicle
.
gps
.
hdop
.
value
)
:
""
visible
:
activeVehicle
&&
!
isNaN
(
activeVehicle
.
gps
.
hdop
.
value
)
anchors.verticalCenter
:
parent
.
verticalCenter
color
:
qgcPal
.
buttonText
text
:
activeVehicle
?
activeVehicle
.
gps
.
hdop
.
value
.
toFixed
(
1
)
:
""
}
}
}
}
// Column
QGCLabel
{
anchors.top
:
parent
.
top
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.horizontalCenter
:
parent
.
horizontalCenter
visible
:
activeVehicle
&&
!
isNaN
(
activeVehicle
.
gps
.
hdop
.
value
)
font.pointSize
:
ScreenTools
.
smallFontPointSize
color
:
qgcPal
.
buttonText
text
:
activeVehicle
?
activeVehicle
.
gps
.
hdop
.
value
.
toFixed
(
1
)
:
""
}
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
onClicked
:
{
onClicked
:
{
...
...
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