From 9c189172970fafa658a59c6fd65d227913864710 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sat, 20 Sep 2014 02:01:05 +0200 Subject: [PATCH] OP-1435 Small fixes. Common background color for Volt/Amp, display Lipo alarm if NbCells is defined. --- .../share/openpilotgcs/pfd/default/Info.qml | 25 +++-- .../share/openpilotgcs/pfd/default/pfd.svg | 100 +++++++++++------- .../src/plugins/pfdqml/pfdqmlgadgetwidget.cpp | 3 +- 3 files changed, 81 insertions(+), 47 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml index ab54c6b1f..96897fc38 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml @@ -262,6 +262,23 @@ Item { // Battery Info (Top) // Only visible when PathPlan not active and Battery module enabled + SvgElementPositionItem { + id: topbattery_voltamp_bg + sceneSize: info.sceneSize + elementName: "topbattery-label-voltamp-bg" + + width: scaledBounds.width * sceneItem.width + height: scaledBounds.height * sceneItem.height + y: scaledBounds.y * sceneItem.height + visible: (SystemAlarms.Alarm_PathPlan != 1) && (HwSettings.OptionalModules_Battery == 1) + + Rectangle { + anchors.fill: parent + color: FlightBatterySettings.NbCells > 0 ? info.batColors[SystemAlarms.Alarm_Battery] : "black" + + } + } + SvgElementImage { sceneSize: info.sceneSize elementName: "topbattery-labels" @@ -283,9 +300,7 @@ Item { Rectangle { anchors.fill: parent - color: info.batColors[SystemAlarms.Alarm_Battery] - border.color: info.batColors[SystemAlarms.Alarm_Battery] - border.width: topbattery_volt.width * 0.02 + color: "transparent" Text { text: FlightBatteryState.Voltage.toFixed(2) @@ -312,9 +327,7 @@ Item { Rectangle { anchors.fill: parent - color: info.batColors[SystemAlarms.Alarm_Battery] - border.color: info.batColors[SystemAlarms.Alarm_Battery] - border.width: topbattery_volt.width * 0.02 + color: "transparent" Text { text: FlightBatteryState.Current.toFixed(2) diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg index a07ff5d78..6c5ba3b8c 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg @@ -22,6 +22,18 @@ inkscape:export-ydpi="72"> + + + + + - + + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + transform="translate(0,4)"> - + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + transform="matrix(0.7,0,0,0.725,345.2216,-211.375)"> + transform="matrix(0.7,0,0,0.725,345.2216,-211.375)"> + id="g12760" + transform="translate(-1.07066,4.962966)"> - - @@ -4048,14 +4061,14 @@ inkscape:connector-curvature="0" id="path6379-2" style="font-size:8px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans" - d="M 241.36773,-33.456512 L 250.86882,-33.456512 L 250.86882,-32.359076 L 246.88182,-32.359076 L 246.88182,-23.818429 L 245.35473,-23.818429 L 245.35473,-32.359076 L 241.36773,-32.359076 L 241.36773,-33.456512" /> + d="M 213.32104,29.837108 L 227.243,29.837108 L 227.243,31.445181 L 221.40084,31.445181 L 221.40084,43.959797 L 219.1632,43.959797 L 219.1632,31.445181 L 213.32104,31.445181 L 213.32104,29.837108" /> @@ -4087,7 +4100,7 @@ d="M 626.46764,52 L 628.70735,46.168 L 629.53879,46.168 L 631.92569,52 L 631.04652,52 L 630.36625,50.233692 L 627.92763,50.233692 L 627.28714,52 L 626.46764,52 M 628.15041,49.605141 L 630.12756,49.605141 L 629.5189,47.990003 C 629.33325,47.499366 629.19534,47.096245 629.10517,46.780639 C 629.03087,47.154592 628.92615,47.525887 628.79089,47.894527 L 628.15041,49.605141" /> + style="fill:#373737;fill-opacity:1;stroke:#ffffff;stroke-width:0.59997100000000003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + style="fill:url(#linearGradient12811);fill-opacity:1;stroke:#ffffff;stroke-width:0.60000001999999997;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + getObject();