From 7e62aa4161575781de2af96ac8b00d272ad03834 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sat, 21 Jun 2014 13:09:23 +0200 Subject: [PATCH] OP-1354 Added waypoint info : wp# / wp count and mode --- .../share/openpilotgcs/pfd/default/Info.qml | 37 +++++++++ .../share/openpilotgcs/pfd/default/pfd.svg | 78 ++++++++++++------- .../src/plugins/pfdqml/pfdqmlgadgetwidget.cpp | 3 +- 3 files changed, 87 insertions(+), 31 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml index c11784949..95b198cef 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml @@ -118,6 +118,43 @@ Item { } } + SvgElementPositionItem { + sceneSize: info.sceneSize + elementName: "waypoint-description-text" + width: scaledBounds.width * sceneItem.width + height: scaledBounds.height * sceneItem.height + y: Math.floor(scaledBounds.y * sceneItem.height) + visible: SystemAlarms.Alarm_PathPlan == 1 + + Text { + text: WaypointActive.Index+" / "+PathPlan.WaypointCount+" " + + anchors.centerIn: parent + font.pixelSize: parent.height*1.1 + color: "magenta" + } + } + + SvgElementPositionItem { + sceneSize: info.sceneSize + elementName: "waypoint-mode-text" + width: scaledBounds.width * sceneItem.width + height: scaledBounds.height * sceneItem.height + y: Math.floor(scaledBounds.y * sceneItem.height) + visible: SystemAlarms.Alarm_PathPlan == 1 + + Text { + text: ["Fly End Point","Fly Vector","Fly Circle Right","Fly Circle Left","Drive End Point","Drive Vector","Drive Circle Right", + "Drive Circle Left","Fixed Attitude","Set Accessory","Land","Disarm Alarm"][PathDesired.Mode] + + anchors.centerIn: parent + font.pixelSize: parent.height*1.1 + color: "magenta" + } + } + + + SvgElementPositionItem { sceneSize: info.sceneSize elementName: "battery-volt-text" diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg index bca747fc0..c55acfb1e 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg @@ -50,11 +50,11 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="9.9282028" - inkscape:cx="593.25555" - inkscape:cy="43.480232" + inkscape:zoom="3.3787325" + inkscape:cx="305.54267" + inkscape:cy="416.93352" inkscape:document-units="px" - inkscape:current-layer="layer25" + inkscape:current-layer="layer18" showgrid="true" fit-margin-top="0" fit-margin-left="0" @@ -115,7 +115,7 @@ image/svg+xml - + @@ -124,7 +124,8 @@ id="layer2" inkscape:label="horizon" style="display:inline" - transform="translate(0,-4)"> + transform="translate(0,-4)" + sodipodi:insensitive="true"> + transform="translate(0,-4)" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + id="waypoint-label" + transform="matrix(1.0375459,0,0,1.0375459,-7.161678,-3.5667345)"> + id="waypoint-heading-label" + transform="translate(0,-3.00017)"> + id="waypoint-distance-label" + transform="translate(0,-3.00017)"> + id="waypoint-mode-label" + transform="translate(0,-3.113201)"> + id="waypoint-eta-label" + transform="matrix(1.0375459,0,0,1.0375459,-14.202279,-4.0166731)"> + transform="translate(0,0.595158)"> + transform="translate(0,0.595158)"> + transform="translate(0,0.595158)"> + transform="translate(0,0.595158)"> @@ -1845,7 +1859,7 @@ + transform="translate(0,0.595158)"> @@ -2813,7 +2827,8 @@ id="layer7" inkscape:label="compass" style="display:inline" - transform="translate(0,-4)"> + transform="translate(0,-4)" + sodipodi:insensitive="true"> + inkscape:groupmode="layer" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> getObject();