diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml index 701183d19..b852fe1a4 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml @@ -16,6 +16,19 @@ Item { property variant flightmodeColors : ["gray", "green", "green", "green", "green", "green", "green", "red", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan"] + // Manual,Rate,Attitude,AxisLock,WeakLeveling,VirtualBar,Rattitude,RelayRate,RelayAttitude, + // AltitudeHold,AltitudeVario,CruiseControl + Auto mode (VTOL/Wing pathfollower) + // grey : 'disabled' modes + + property variant thrustmodeColors : ["green", "grey", "grey", "grey", "grey", "grey", "grey", "grey", "grey", + "green", "green", "green", "cyan"] + + property var thrust_mode: FlightStatus.FlightMode < 7 ? StabilizationDesired.StabilizationMode_Thrust : + FlightStatus.FlightMode > 7 && HwSettings.OptionalModules_VtolPathFollower == 1 + && VtolPathFollowerSettings.ThrustControl == 1 ? 12 : + FlightStatus.FlightMode > 7 && HwSettings.OptionalModules_FixedWingPathFollower == 1 ? 12: 0 + + property real flight_time: Math.round(SystemStats.FlightTime / 1000) property real time_h: (flight_time > 0 ? Math.floor(flight_time / 3600) : 0 ) property real time_m: (flight_time > 0 ? Math.floor((flight_time - time_h*3600)/60) : 0) @@ -195,6 +208,35 @@ Item { } } + SvgElementPositionItem { + id: warning_thrustmode + sceneSize: parent.sceneSize + elementName: "warning-thrustmode" + width: scaledBounds.width * sceneItem.width + height: scaledBounds.height * sceneItem.height + x: scaledBounds.x * sceneItem.width + y: scaledBounds.y * sceneItem.height + + Rectangle { + anchors.fill: parent + color: warnings.thrustmodeColors[thrust_mode.toString()] + + // Manual,Rate,Attitude,AxisLock,WeakLeveling,VirtualBar,Rattitude,RelayRate,RelayAttitude, + // AltitudeHold,AltitudeVario,CruiseControl + // grey : 'disabled' modes + Text { + anchors.centerIn: parent + text: ["MANUAL"," "," ", " ", " ", " ", " ", " ", " ", + "ALT HOLD", "ALT VARIO", "CRUIZECTRL", "AUTO"][thrust_mode.toString()] + font { + family: "Arial" + pixelSize: Math.floor(parent.height * 0.8) + weight: Font.DemiBold + } + } + } + } + SvgElementImage { id: warning_gps elementName: "warning-gps" diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg index d8b2dd653..2b83893a0 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg @@ -84,11 +84,11 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1" - inkscape:cx="313.78803" - inkscape:cy="164.34379" + inkscape:zoom="9.3372094" + inkscape:cx="596.49986" + inkscape:cy="8" inkscape:document-units="px" - inkscape:current-layer="layer29" + inkscape:current-layer="g3935" showgrid="true" fit-margin-top="0" fit-margin-left="0" @@ -150,7 +150,7 @@ image/svg+xml - + @@ -193,6 +193,20 @@ style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;display:inline" /> + + + @@ -254,37 +268,37 @@ style="font-size:40px;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" id="pitch_label10R"> @@ -293,36 +307,36 @@ style="font-size:40px;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" id="pitch_label20R"> @@ -331,12 +345,12 @@ style="font-size:40px;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" id="pitch_label-20R"> @@ -344,23 +358,23 @@ @@ -369,37 +383,37 @@ style="font-size:40px;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" id="pitch_label-10R"> @@ -408,12 +422,12 @@ style="font-size:40px;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" id="pitch_label30R"> @@ -421,11 +435,11 @@ @@ -447,12 +461,12 @@ style="font-size:40px;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" id="pitch_label40R"> @@ -460,11 +474,11 @@ @@ -486,37 +500,37 @@ style="font-size:40px;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" id="pitch_label50R"> @@ -525,37 +539,37 @@ style="font-size:40px;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" id="pitch_label60R"> @@ -564,12 +578,12 @@ style="font-size:40px;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" id="pitch_label70R"> @@ -577,23 +591,23 @@ @@ -602,25 +616,25 @@ style="font-size:40px;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" id="pitch_label80R"> @@ -642,12 +656,12 @@ style="font-size:40px;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" id="pitch_label90R"> @@ -655,23 +669,23 @@ @@ -680,36 +694,36 @@ style="font-size:40px;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" id="pitch_label-40R"> @@ -718,36 +732,36 @@ style="font-size:40px;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" id="pitch_label-30R"> @@ -756,12 +770,12 @@ style="font-size:40px;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" id="pitch_label-60R"> @@ -769,23 +783,23 @@ @@ -794,12 +808,12 @@ style="font-size:40px;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" id="pitch_label-50R"> @@ -807,23 +821,23 @@ @@ -832,36 +846,36 @@ style="font-size:40px;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" id="pitch_label-80R"> @@ -870,24 +884,24 @@ style="font-size:40px;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" id="pitch_label-70R"> @@ -895,12 +909,12 @@ style="font-size:40px;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" id="pitch_label-90L"> @@ -909,12 +923,12 @@ style="font-size:40px;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" id="pitch_label-90R"> @@ -2678,7 +2692,7 @@ transform="translate(0,4)" inkscape:transform-center-x="31.416405" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 290.26594,60.402428 286.90125,47.845226" + d="M 290.26594,60.402428 L 286.90125,47.845226" id="path3442" inkscape:connector-curvature="0" inkscape:transform-center-y="-117.24761" /> @@ -2687,14 +2701,14 @@ inkscape:transform-center-y="-105.12133" inkscape:connector-curvature="0" id="path3444" - d="m 262.55821,71.879346 -6.50008,-11.25848" + d="m 262.55821,71.879346 l -6.50008,-11.25848" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" inkscape:transform-center-x="60.69183" /> @@ -2713,7 +2727,7 @@ sodipodi:nodetypes="cc" inkscape:transform-center-x="20.198055" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 300.02868,57.474202 298.9979,52.82864" + d="M 300.02868,57.474202 L 298.9979,52.82864" id="path3464" inkscape:connector-curvature="0" inkscape:transform-center-y="-109.4812" /> @@ -2723,7 +2737,7 @@ inkscape:transform-center-y="-104.31057" inkscape:connector-curvature="0" id="path3466" - d="m 281.77925,62.464332 -1.94063,-4.28458" + d="m 281.77925,62.464332 l -1.94063,-4.28458" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" inkscape:transform-center-x="38.90241" /> @@ -2740,14 +2754,14 @@ inkscape:transform-center-y="-117.24761" inkscape:connector-curvature="0" id="path3491" - d="m 349.73406,60.402428 3.36469,-12.557202" + d="m 349.73406,60.402428 l 3.36469,-12.557202" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" inkscape:transform-center-x="31.416405" /> @@ -2756,7 +2770,7 @@ inkscape:transform-center-y="-85.831206" inkscape:connector-curvature="0" id="path3495" - d="m 399.82423,91.345686 11.40936,-9.763523" + d="m 399.82423,91.345686 l 11.40936,-9.763523" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" inkscape:transform-center-x="85.83121" sodipodi:nodetypes="cc" /> @@ -2765,7 +2779,7 @@ inkscape:transform-center-y="-51.353944" inkscape:connector-curvature="0" id="path3497" - d="m 330.38014,56.242757 0.76566,-4.817725" + d="m 330.38014,56.242757 l 0.76566,-4.817725" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" inkscape:transform-center-x="10.57928" sodipodi:nodetypes="cc" /> @@ -2774,7 +2788,7 @@ inkscape:transform-center-y="-109.4812" inkscape:connector-curvature="0" id="path3499" - d="M 339.97132,57.474202 341.0021,52.82864" + d="M 339.97132,57.474202 L 341.0021,52.82864" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" inkscape:transform-center-x="20.198055" sodipodi:nodetypes="cc" /> @@ -2782,7 +2796,7 @@ transform="translate(0,4)" inkscape:transform-center-x="38.90241" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="m 358.22075,62.464332 1.94063,-4.28458" + d="m 358.22075,62.464332 l 1.94063,-4.28458" id="path3501" inkscape:connector-curvature="0" inkscape:transform-center-y="-104.31057" @@ -2792,7 +2806,7 @@ inkscape:transform-center-y="-100.52307" inkscape:connector-curvature="0" id="path3503" - d="m 367.00252,66.39497 2.31603,-4.30844" + d="m 367.00252,66.39497 l 2.31603,-4.30844" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" inkscape:transform-center-x="47.84564" sodipodi:nodetypes="cc" /> @@ -2801,7 +2815,7 @@ sodipodi:open="true" sodipodi:end="5.5477076" sodipodi:start="3.8773293" - d="M 238.84479,91.530033 C 279.42114,46.70925 348.64918,43.268451 393.46997,83.844794 c 2.69442,2.439265 5.26569,5.011203 7.70426,7.706256" + d="m 238.84479,91.530033 a 109.47147,109.47147 0 0 1 162.32944,0.02102" sodipodi:ry="109.47147" sodipodi:rx="109.47147" sodipodi:cy="165" @@ -2811,7 +2825,7 @@ sodipodi:type="arc" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00.00.00 - - + + + + + + + + + + + + + + 00.00.00 + + - - - getObject();