diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml index 449389ca1..9f5a3ce2a 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml @@ -36,6 +36,8 @@ Item { property real total_distance property bool init_dist: false + property bool hide_display_rc: false + function reset_distance(){ total_distance = 0; } @@ -59,6 +61,14 @@ Item { else return time.toString(); } + + function hide_display_rcinput(){ + console.log("module: "+hide_display_rc); + if (hide_display_rc == false) + hide_display_rc = true; + else + hide_display_rc = false; + } SvgElementImage { id: info_bg @@ -462,6 +472,98 @@ Item { } + SvgElementImage { + id: rc_input_bg + elementName: "rc-input-bg" + sceneSize: info.sceneSize + y: Math.floor(scaledBounds.y * sceneItem.height) + + states: State { + name: "fading" + when: hide_display_rc !== true + PropertyChanges { target: rc_input_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.91); } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; duration: 800 } + } + } + } + + SvgElementImage { + id: rc_input_labels + elementName: "rc-input-labels" + sceneSize: info.sceneSize + y: Math.floor(scaledBounds.y * sceneItem.height) + + states: State { + name: "fading" + when: hide_display_rc !== true + PropertyChanges { target: rc_input_labels; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.91); } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; duration: 800 } + } + } + } + + SvgElementImage { + id: rc_input_icon + elementName: "rc-input-icon" + sceneSize: info.sceneSize + y: Math.floor(scaledBounds.y * sceneItem.height) + + MouseArea { id: hidedisp_rcinput; anchors.fill: parent; onClicked: hide_display_rcinput()} + + states: State { + name: "fading" + when: hide_display_rc !== true + PropertyChanges { target: rc_input_icon; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.91); } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; duration: 800 } + } + } + } + + SvgElementImage { + id: rc_stick + elementName: "rc-stick" + sceneSize: info.sceneSize + + width: scaledBounds.width * sceneItem.width + height: scaledBounds.height * sceneItem.height + + x: (scaledBounds.x * sceneItem.width) + (ManualControlCommand.Roll * rc_stick.width *2.5) + y: (scaledBounds.y * sceneItem.height) + (ManualControlCommand.Pitch * rc_stick.width * 2.5) + + smooth: true + + //rotate it around the center of horizon + transform: Rotation { + angle: ManualControlCommand.Yaw * 90 + origin.y : rc_stick.height / 2 + origin.x : rc_stick.width / 2 + } + + states: State { + name: "fading" + when: hide_display_rc !== true + PropertyChanges { target: rc_stick; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.91); } + } + + transitions: Transition { + SequentialAnimation { + PropertyAnimation { property: "x"; duration: 800 } + } + } + } + SvgElementImage { id: info_border elementName: "info-border" diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg index 2b83893a0..c59921c0a 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg @@ -2,6 +2,7 @@ + + + + + + + + + + + + + + + + + @@ -963,17 +1057,17 @@ id="home-eta-label" transform="matrix(1,0,0,1.0973877,0,-46.442937)"> @@ -983,22 +1077,22 @@ id="home-distance-label" transform="matrix(1,0,0,1.0577142,0,-27.456636)"> @@ -1007,29 +1101,29 @@ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans" id="home-label"> @@ -1065,42 +1159,42 @@ id="home-eta-text" transform="matrix(1,0,0,0.99160769,0,2.0646588)"> @@ -1117,37 +1211,37 @@ id="home-distance-text" transform="matrix(1,0,0,0.99160769,0,2.0975587)"> @@ -1164,23 +1258,229 @@ id="home-heading-text" transform="matrix(1,0,0,0.99160769,15.28151,1.9884587)"> + + + + + + + + + + + + + + + + + + + + + + PITCH + ROLL + + + + + + + + style="display:inline" + sodipodi:insensitive="true"> @@ -4203,104 +4504,104 @@ @@ -4308,12 +4609,12 @@ inkscape:label="#path3532" inkscape:connector-curvature="0" id="speed5" - d="M 65.000001,-31 52,-31" + d="M 65.000001,-31 L 52,-31" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> @@ -4332,7 +4633,7 @@ sodipodi:nodetypes="cccccccccc" inkscape:connector-curvature="0" id="path10059" - d="m 91,148.5 0,20.5 0,20.5 44,0 0,-9.78125 8.5,-9.46875 0,-2.5 -8.5,-9.46875 0,-9.78125 z" + d="m 91,148.5 l 0,20.5 l 0,20.5 l 44,0 l 0,-9.78125 l 8.5,-9.46875 l 0,-2.5 L 135,158.28125 L 135,148.5 z" style="fill:#000000;stroke:#ffffff" /> @@ -4367,27 +4668,27 @@ id="speed-text" transform="translate(0,42)"> @@ -4399,7 +4700,8 @@ style="display:inline" inkscape:label="altitude" id="g9762" - inkscape:groupmode="layer"> + inkscape:groupmode="layer" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> + inkscape:label="warning-thrustmode" + sodipodi:insensitive="true"> + inkscape:label="warning-flightmode" + sodipodi:insensitive="true"> @@ -5090,7 +5397,8 @@ inkscape:groupmode="layer" id="layer51" inkscape:label="warning-autopilot" - style="display:inline"> + style="display:inline" + sodipodi:insensitive="true"> + style="display:inline" + sodipodi:insensitive="true"> @@ -5247,7 +5556,8 @@ inkscape:groupmode="layer" id="layer33" inkscape:label="warning-rc-input" - style="display:inline"> + style="display:inline" + sodipodi:insensitive="true"> + inkscape:label="warning-arm" + sodipodi:insensitive="true"> diff --git a/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadgetwidget.cpp b/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadgetwidget.cpp index 1055a71c8..ad8cb4a27 100644 --- a/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadgetwidget.cpp @@ -72,7 +72,8 @@ PfdQmlGadgetWidget::PfdQmlGadgetWidget(QWindow *parent) : "SystemStats" << "StabilizationDesired" << "VtolPathFollowerSettings" << - "HwSettings"; + "HwSettings" << + "ManualControlCommand"; ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); UAVObjectManager *objManager = pm->getObject();