Commit 49fe5bba authored by Pierre TILAK's avatar Pierre TILAK

Change NorthUp Setting, Update SVG res

- NorthUp becomes NoseUp and is disable by default
- Changes on SVG to make them with the same diameter as the CompassDiag
- Change the order of the indicator layouts
parent 701f3da2
......@@ -17,10 +17,10 @@
enable-background="new 0 0 288 288"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="cOGPointer .svg"><metadata
sodipodi:docname="cOGPointer.svg"><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs9" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
......@@ -30,20 +30,20 @@
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1855"
inkscape:window-height="1056"
inkscape:window-width="1918"
inkscape:window-height="1059"
id="namedview7"
showgrid="false"
inkscape:zoom="2.3177389"
inkscape:cx="103.82028"
inkscape:cy="155.36757"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:zoom="0.81944445"
inkscape:cx="-403.29176"
inkscape:cy="267.11976"
inkscape:window-x="1920"
inkscape:window-y="19"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_3" /><polygon
points="133.2,17.4 154.8,17.4 144,46.2 "
points="144,46.2 133.2,17.4 154.8,17.4 "
id="polygon3"
transform="matrix(-1,0,0,-1,288,104.6)"
transform="matrix(-1,0,0,-1,288,54.034031)"
style="fill:#008000" /><rect
x="135"
y="270"
......
......@@ -30,21 +30,21 @@
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1855"
inkscape:window-height="1056"
inkscape:window-width="1918"
inkscape:window-height="1059"
id="namedview127"
showgrid="false"
inkscape:zoom="3.2777778"
inkscape:cx="59.669563"
inkscape:cy="175.88441"
inkscape:window-x="1985"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:zoom="3.2013889"
inkscape:cx="81.386174"
inkscape:cy="177.0113"
inkscape:window-x="-1"
inkscape:window-y="18"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_2"
inkscape:snap-bbox="true"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true" /><path
style="fill:#ffff00;fill-rule:evenodd;stroke:#ffe400;stroke-width:3.805;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:7;stroke-dasharray:11.415,3.805;stroke-opacity:1;stroke-dashoffset:0"
d="m -17.052985,397 0.10597,-112.28426"
style="fill:#be781c;fill-opacity:1;fill-rule:evenodd;stroke:#be781c;stroke-width:6.41166306;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.29999995;stroke-dasharray:12.82332611,6.41166306;stroke-dashoffset:4.68051403;stroke-opacity:1"
d="m -17.131076,320.82151 0.10597,-60.58956"
id="path4263"
inkscape:connector-curvature="0" /></svg>
\ No newline at end of file
......@@ -57,12 +57,12 @@ Item {
return vehicle && _showAdditionalIndicatorsCompass && !isNaN(_headingToNextWP)
}
function isNorthUpLocked(){
return _lockNorthUpCompass
function isNoseUpLocked(){
return _lockNoseUpCompass
}
readonly property bool _showAdditionalIndicatorsCompass: QGroundControl.settingsManager.flyViewSettings.showAdditionalIndicatorsCompass.value
readonly property bool _lockNorthUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNorthUpCompass.value
readonly property bool _lockNoseUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNoseUpCompass.value
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
......@@ -80,16 +80,17 @@ Item {
anchors.fill: parent
visible: false
Image {
id: nextWPPointer
source: isHeadingToNextWPOK() ? "/qmlimages/compassDottedLine.svg":""
id: cOGPointer
source: isCOGAngleOK() ? "/qmlimages/cOGPointer.svg" : ""
mipmap: true
fillMode: Image.PreserveAspectFit
anchors.fill: parent
sourceSize.height: parent.height
transform: Rotation {
property var _angle: isNorthUpLocked()?_headingToNextWP-_heading:_headingToNextWP
property var _angle:isNoseUpLocked()?_courseOverGround-_heading:_courseOverGround
origin.x: cOGPointer.width / 2
origin.y: cOGPointer.height / 2
angle: _angle
......@@ -97,36 +98,21 @@ Item {
}
Image {
id: cOGPointer
source: isCOGAngleOK() ? "/qmlimages/cOGPointer.svg" : ""
id: nextWPPointer
source: isHeadingToNextWPOK() ? "/qmlimages/compassDottedLine.svg":""
mipmap: true
fillMode: Image.PreserveAspectFit
anchors.fill: parent
sourceSize.height: parent.height
transform: Rotation {
property var _angle:isNorthUpLocked()?_courseOverGround-_heading:_courseOverGround
property var _angle: isNoseUpLocked()?_headingToNextWP-_heading:_headingToNextWP
origin.x: cOGPointer.width / 2
origin.y: cOGPointer.height / 2
angle: _angle
}
}
Image {
id: pointer
width: size * 0.65
source: vehicle ? vehicle.vehicleImageCompass : ""
mipmap: true
sourceSize.width: width
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
transform: Rotation {
origin.x: pointer.width / 2
origin.y: pointer.height / 2
angle: isNorthUpLocked()?0:_heading
}
}
Image {
id: homePointer
width: size * 0.1
......@@ -137,12 +123,28 @@ Item {
sourceSize.width: width
transform: Translate {
property double _angle: isNorthUpLocked()?-_heading+_headingToHome:_headingToHome
property double _angle: isNoseUpLocked()?-_heading+_headingToHome:_headingToHome
x: size/2.3 * Math.sin((_angle)*(3.14/180))
y: - size/2.3 * Math.cos((_angle)*(3.14/180))
}
}
Image {
id: pointer
width: size * 0.65
source: vehicle ? vehicle.vehicleImageCompass : ""
mipmap: true
sourceSize.width: width
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
transform: Rotation {
origin.x: pointer.width / 2
origin.y: pointer.height / 2
angle: isNoseUpLocked()?0:_heading
}
}
QGCColoredImage {
id: compassDial
source: "/qmlimages/compassInstrumentDial.svg"
......@@ -154,7 +156,7 @@ Item {
transform: Rotation {
origin.x: compassDial.width / 2
origin.y: compassDial.height / 2
angle: isNorthUpLocked()?-_heading:0
angle: isNoseUpLocked()?-_heading:0
}
}
......
......@@ -32,9 +32,9 @@
"defaultValue": false
},
{
"name": "lockNorthUpCompass",
"shortDescription": "Lock North up on Compass",
"name": "lockNoseUpCompass",
"shortDescription": "Lock Compass Nose-Up",
"type": "bool",
"defaultValue": true
"defaultValue": false
}
]
......@@ -22,4 +22,4 @@ DECLARE_SETTINGSFACT(FlyViewSettings, guidedMaximumAltitude)
DECLARE_SETTINGSFACT(FlyViewSettings, showLogReplayStatusBar)
DECLARE_SETTINGSFACT(FlyViewSettings, alternateInstrumentPanel)
DECLARE_SETTINGSFACT(FlyViewSettings, showAdditionalIndicatorsCompass)
DECLARE_SETTINGSFACT(FlyViewSettings, lockNorthUpCompass)
DECLARE_SETTINGSFACT(FlyViewSettings, lockNoseUpCompass)
......@@ -24,5 +24,5 @@ public:
DEFINE_SETTINGFACT(showLogReplayStatusBar)
DEFINE_SETTINGFACT(alternateInstrumentPanel)
DEFINE_SETTINGFACT(showAdditionalIndicatorsCompass)
DEFINE_SETTINGFACT(lockNorthUpCompass)
DEFINE_SETTINGFACT(lockNoseUpCompass)
};
......@@ -483,11 +483,11 @@ Rectangle {
property Fact _showAdditionalIndicatorsCompass: QGroundControl.settingsManager.flyViewSettings.showAdditionalIndicatorsCompass
}
FactCheckBox {
text: qsTr("Lock North up on Compass")
visible: _lockNorthUpCompass.visible
fact: _lockNorthUpCompass
text: qsTr("Lock Compass Nose-Up")
visible: _lockNoseUpCompass.visible
fact: _lockNoseUpCompass
property Fact _lockNorthUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNorthUpCompass
property Fact _lockNoseUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNoseUpCompass
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment