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
6a7a15c8
Commit
6a7a15c8
authored
Jul 16, 2019
by
Pierre TILAK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compass : Filter low angle-distance issues
parent
b2082edb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
QGCCompassWidget.qml
src/FlightMap/Widgets/QGCCompassWidget.qml
+17
-3
No files found.
src/FlightMap/Widgets/QGCCompassWidget.qml
View file @
6a7a15c8
...
...
@@ -36,9 +36,23 @@ Item {
property
int
_fontSize
:
ScreenTools
.
defaultFontPointSize
*
_sizeRatio
property
real
_heading
:
vehicle
?
vehicle
.
heading
.
rawValue
:
0
property
real
_headingToHome
:
vehicle
?
vehicle
.
headingToHome
.
rawValue
:
0
property
real
_groundSpeed
:
vehicle
?
vehicle
.
groundSpeed
.
rawValue
:
0
property
real
_courseOverGround
:
activeVehicle
?
activeVehicle
.
gps
.
courseOverGround
.
rawValue
:
0
readonly
property
bool
_showHomeHeadingCompass
:
QGroundControl
.
settingsManager
.
flyViewSettings
.
showHomeHeadingCompass
.
value
function
isCOGAngleOK
(){
if
(
_groundSpeed
<
0.5
&&
_showCOGAngleCompass
){
return
false
}
else
{
return
true
}
}
function
isHeadingAngleOK
(){
return
_showHomeHeadingCompass
&&
!
isNaN
(
_headingToHome
)
}
readonly
property
bool
_showHomeHeadingCompass
:
QGroundControl
.
settingsManager
.
flyViewSettings
.
showHomeHeadingCompass
.
value
readonly
property
bool
_showCOGAngleCompass
:
QGroundControl
.
settingsManager
.
flyViewSettings
.
showCOGAngleCompass
.
value
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
...
...
@@ -60,7 +74,7 @@ Item {
Image
{
id
:
cOGPointer
source
:
_showCOGAngleCompass
?
"
/qmlimages/cOGPointer.svg
"
:
""
source
:
isCOGAngleOK
()
?
"
/qmlimages/cOGPointer.svg
"
:
""
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.fill
:
parent
...
...
@@ -86,7 +100,7 @@ Item {
Image
{
id
:
homePointer
width
:
size
*
0.1
source
:
_showHomeHeadingCompass
?
"
/qmlimages/Home.svg
"
:
""
source
:
isHeadingAngleOK
()
?
"
/qmlimages/Home.svg
"
:
""
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.centerIn
:
parent
...
...
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