mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
GCS/PFDqml: fixed compass rendering
Converted AttitudeActual.Yaw to -180..180 range, so the whole compass band is always filled
This commit is contained in:
parent
99b898c5c2
commit
1102587570
@ -63,8 +63,8 @@ Rectangle {
|
||||
sourceSize: background.sourceSize
|
||||
|
||||
anchors.centerIn: parent
|
||||
//the band is 540 degrees wide
|
||||
anchors.horizontalCenterOffset: -1*AttitudeActual.Yaw/540*width
|
||||
//the band is 540 degrees wide, AttitudeActual.Yaw is converted to -180..180 range
|
||||
anchors.horizontalCenterOffset: -1*((AttitudeActual.Yaw+180+720) % 360 - 180)/540*width
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user