diff --git a/src/FlightDisplay/FlightDisplayViewWidgets.qml b/src/FlightDisplay/FlightDisplayViewWidgets.qml index eb3dae40e4468790210287fb03713b23ded68f15..b5d534dc7357352b252bdbccebfc5b48604f9c9b 100644 --- a/src/FlightDisplay/FlightDisplayViewWidgets.qml +++ b/src/FlightDisplay/FlightDisplayViewWidgets.qml @@ -77,13 +77,17 @@ Item { //-- Instrument Pannel QGCInstrumentWidget { anchors.margins: ScreenTools.defaultFontPixelHeight - anchors.bottom: parent.bottom anchors.right: parent.right + anchors.bottom: parent.bottom size: ScreenTools.defaultFontPixelSize * (9) active: _activeVehicle != null heading: _heading rollAngle: _roll pitchAngle: _pitch + altitude: _altitudeWGS84 + groundSpeed: _groundSpeed + airSpeed: _airSpeed + climbRate: _climbRate isSatellite: _mainIsMap ? _flightMap ? _flightMap.isSatelliteMap : true : true z: QGroundControl.zOrderWidgets } diff --git a/src/FlightMap/Images/compassInstrumentDial.svg b/src/FlightMap/Images/compassInstrumentDial.svg index f265280b1905c2387d805fbf0ed70ed2a6efe3b5..dbef2e037655829e23c5484eefd2e2345e11f7e7 100644 --- a/src/FlightMap/Images/compassInstrumentDial.svg +++ b/src/FlightMap/Images/compassInstrumentDial.svg @@ -1,84 +1,87 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + viewBox="-161 253 288 288" enable-background="new -161 253 288 288" xml:space="preserve"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - - - - + + + + diff --git a/src/FlightMap/Widgets/QGCCompassWidget.qml b/src/FlightMap/Widgets/QGCCompassWidget.qml index 251acc94342aa3c8af734cbfdcb6653c511624bf..28fc249b54181e6d9b680db5d10f77b3f80f6e04 100644 --- a/src/FlightMap/Widgets/QGCCompassWidget.qml +++ b/src/FlightMap/Widgets/QGCCompassWidget.qml @@ -49,9 +49,7 @@ Item { id: borderRect anchors.fill: parent radius: width / 2 - color: "#202020" - border.color: "black" - border.width: 2 + color: "black" } Item { diff --git a/src/FlightMap/Widgets/QGCInstrumentWidget.qml b/src/FlightMap/Widgets/QGCInstrumentWidget.qml index c7d3bc263bda7f4d01dcddfb4a6d3030251c40b4..0789e3b221d307d0a5f771379581f6f558dd8889 100644 --- a/src/FlightMap/Widgets/QGCInstrumentWidget.qml +++ b/src/FlightMap/Widgets/QGCInstrumentWidget.qml @@ -39,7 +39,10 @@ Item { property alias heading: compass.heading property alias rollAngle: attitude.rollAngle property alias pitchAngle: attitude.pitchAngle - + property real altitude: 0 + property real groundSpeed: 0 + property real airSpeed: 0 + property real climbRate: 0 property real size: ScreenTools.defaultFontPixelSize * (10) property bool isSatellite: false property bool active: false @@ -49,29 +52,127 @@ Item { //-- Instrument Pannel Rectangle { id: instrumentPannel - anchors.right: parent.right - anchors.bottom: parent.bottom - height: root.size - width: instruments.width + ScreenTools.defaultFontPixelSize + height: instruments.height + ScreenTools.defaultFontPixelSize + width: root.size radius: root.size / 2 visible: _isVisible - color: isSatellite ? Qt.rgba(1,1,1,0.5) : Qt.rgba(0,0,0,0.5) - Row { + color: isSatellite ? Qt.rgba(1,1,1,0.75) : Qt.rgba(0,0,0,0.75) + anchors.right: parent.right + anchors.bottom: parent.bottom + Column { id: instruments - height: parent.height - spacing: ScreenTools.defaultFontPixelSize / 2 - anchors.horizontalCenter: parent.horizontalCenter + width: parent.width + spacing: ScreenTools.defaultFontPixelSize * 0.33 + anchors.verticalCenter: parent.verticalCenter + //-- Attitude Indicator QGCAttitudeWidget { id: attitude - size: parent.height * 0.9 + size: parent.width * 0.9 active: root.active - anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + } + //-- Altitude + Rectangle { + height: 1 + width: parent.width * 0.9 + color: isSatellite ? Qt.rgba(0,0,0,0.25) : Qt.rgba(1,1,1,0.25) + anchors.horizontalCenter: parent.horizontalCenter + } + Row { + width: root.size * 0.8 + anchors.horizontalCenter: parent.horizontalCenter + QGCLabel { + text: "H" + width: parent.width * 0.45 + color: isSatellite ? "black" : "white" + horizontalAlignment: TextEdit.AlignHCenter + } + QGCLabel { + text: altitude + font.weight: Font.DemiBold + color: isSatellite ? "black" : "white" + } + } + //-- Ground Speed + Rectangle { + height: 1 + width: parent.width * 0.9 + color: isSatellite ? Qt.rgba(0,0,0,0.25) : Qt.rgba(1,1,1,0.25) + anchors.horizontalCenter: parent.horizontalCenter + } + Row { + width: root.size * 0.8 + anchors.horizontalCenter: parent.horizontalCenter + QGCLabel { + text: "GS" + width: parent.width * 0.45 + color: isSatellite ? "black" : "white" + horizontalAlignment: TextEdit.AlignHCenter + } + QGCLabel { + text: groundSpeed + font.weight: Font.DemiBold + color: isSatellite ? "black" : "white" + } + } + //-- Air Speed + Rectangle { + height: 1 + width: parent.width * 0.9 + color: isSatellite ? Qt.rgba(0,0,0,0.25) : Qt.rgba(1,1,1,0.25) + anchors.horizontalCenter: parent.horizontalCenter + visible: airSpeed > 0 + } + Row { + width: root.size * 0.8 + anchors.horizontalCenter: parent.horizontalCenter + visible: airSpeed > 0 + QGCLabel { + text: "AS" + width: parent.width * 0.45 + color: isSatellite ? "black" : "white" + horizontalAlignment: TextEdit.AlignHCenter + } + QGCLabel { + text: airSpeed + font.weight: Font.DemiBold + color: isSatellite ? "black" : "white" + } + } + //-- Climb Rate + Rectangle { + height: 1 + width: parent.width * 0.9 + color: isSatellite ? Qt.rgba(0,0,0,0.25) : Qt.rgba(1,1,1,0.25) + anchors.horizontalCenter: parent.horizontalCenter + } + Row { + width: root.size * 0.8 + anchors.horizontalCenter: parent.horizontalCenter + QGCLabel { + text: "VS" + width: parent.width * 0.45 + color: isSatellite ? "black" : "white" + horizontalAlignment: TextEdit.AlignHCenter + } + QGCLabel { + text: climbRate + font.weight: Font.DemiBold + color: isSatellite ? "black" : "white" + } + } + //-- Compass + Rectangle { + height: 1 + width: parent.width * 0.9 + color: isSatellite ? Qt.rgba(0,0,0,0.25) : Qt.rgba(1,1,1,0.25) + anchors.horizontalCenter: parent.horizontalCenter } QGCCompassWidget { id: compass - size: parent.height * 0.9 + size: parent.width * 0.9 active: root.active - anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter } } MouseArea {