diff --git a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml
index 88032dc41..023642870 100644
--- a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml
+++ b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml
@@ -2520,47 +2520,11 @@
-
-
- LineardialGadget
-
- Flight Time
-
- uavGadget
-
-
-
- LineardialGadget
-
- Arm Status
-
- uavGadget
-
-
- LineardialGadget
-
- Flight mode
-
- uavGadget
-
- 1
- @Variant(AAAACQAAAAIAAAACAAAAYwAAAAIAAAB7)
- splitter
-
- 1
- @Variant(AAAACQAAAAIAAAACAAAAZgAAAAIAAADf)
- splitter
-
-
PfdQmlGadget
NoTerrain
uavGadget
-
- 2
- @Variant(AAAACQAAAAIAAAACAAAAQAAAAAIAAAG4)
- splitter
@@ -2582,7 +2546,7 @@
splitter
2
- @Variant(AAAACQAAAAIAAAACAAABqQAAAAIAAADm)
+ @Variant(AAAACQAAAAIAAAACAAACigAAAAIAAAE0)
splitter
@@ -2593,7 +2557,7 @@
uavGadget
1
- @Variant(AAAACQAAAAIAAAACAAACdgAAAAIAAAMp)
+ @Variant(AAAACQAAAAIAAAACAAADXwAAAAIAAAQc)
splitter
UAVGadgetManagerV1
diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml
index 449389ca1..e8455caba 100644
--- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml
+++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml
@@ -3,10 +3,16 @@ import QtQuick 2.0
Item {
id: info
property variant sceneSize
-
- property var tele_status : (OPLinkStatus.LinkState == 1 ? GCSTelemetryStats.Status :
- OPLinkStatus.LinkState == 4 ? GCSTelemetryStats.Status : 0 )
+ //
+ // Waypoint functions
+ //
+
+ property real posEast_old
+ property real posNorth_old
+ property real total_distance
+ property bool init_dist: false
+
property real home_heading: 180/3.1415 * Math.atan2(TakeOffLocation.East - PositionState.East,
TakeOffLocation.North - PositionState.North)
@@ -31,10 +37,10 @@ Item {
property real wp_eta_m: (wp_eta > 0 ? Math.floor((wp_eta - wp_eta_h*3600)/60) : 0)
property real wp_eta_s: (wp_eta > 0 ? Math.floor(wp_eta - wp_eta_h*3600 - wp_eta_m*60) : 0)
- property real posEast_old
- property real posNorth_old
- property real total_distance
- property bool init_dist: false
+ property real est_flight_time: Math.round(FlightBatteryState.EstimatedFlightTime)
+ property real est_time_h: (est_flight_time > 0 ? Math.floor(est_flight_time / 3600) : 0 )
+ property real est_time_m: (est_flight_time > 0 ? Math.floor((est_flight_time - est_time_h*3600)/60) : 0)
+ property real est_time_s: (est_flight_time > 0 ? Math.floor(est_flight_time - est_time_h*3600 - est_time_m*60) : 0)
function reset_distance(){
total_distance = 0;
@@ -59,7 +65,115 @@ Item {
else
return time.toString();
}
-
+
+ //
+ // Panel functions
+ //
+
+ property bool hide_display_rc: false
+ property bool hide_display_bat: false
+ property bool hide_display_oplm: false
+
+ function hide_display_rcinput(){
+ if (hide_display_rc == false && hide_display_bat == false && hide_display_oplm == false)
+ hide_display_rc = true;
+ else
+ hide_display_rc = false;
+ battery_bg.z = -1
+ oplm_bg.z = -1
+ }
+
+ function hide_display_battery(){
+ if (hide_display_bat == false && hide_display_rc == false && hide_display_oplm == false)
+ hide_display_bat = true;
+ else
+ hide_display_bat = false;
+ battery_bg.z = 10
+ oplm_bg.z = -1
+ }
+
+ function hide_display_oplink(){
+ if (hide_display_oplm == false && hide_display_rc == false && hide_display_bat == false)
+ hide_display_oplm = true;
+ else
+ hide_display_oplm = false;
+ oplm_bg.z = 20
+ }
+
+ // Uninitialised, Ok, Warning, Critical, Error
+ property variant batColors : ["#2c2929", "green", "orange", "red", "red"]
+
+ property real smeter_angle
+
+ // Needed to get correctly int8 value, reset value (-127) on disconnect
+ property int oplm0_db: OPLinkStatus.LinkState == 4 ? OPLinkStatus.PairSignalStrengths_0 : -127
+ property int oplm1_db: OPLinkStatus.LinkState == 4 ? OPLinkStatus.PairSignalStrengths_1 : -127
+ property int oplm2_db: OPLinkStatus.LinkState == 4 ? OPLinkStatus.PairSignalStrengths_2 : -127
+ property int oplm3_db: OPLinkStatus.LinkState == 4 ? OPLinkStatus.PairSignalStrengths_3 : -127
+
+ // Filtering for S-meter. Smeter range -127dB <--> -13dB = S9+60dB
+
+ Timer {
+ id: smeter_filter0
+ interval: 100; running: true; repeat: true
+ onTriggered: smeter_angle = (0.90 * smeter_angle) + (0.1 * (oplm0_db + 13))
+ }
+
+ Timer {
+ id: smeter_filter1
+ interval: 100; repeat: true
+ onTriggered: smeter_angle = (0.90 * smeter_angle) + (0.1 * (oplm1_db + 13))
+ }
+
+ Timer {
+ id: smeter_filter2
+ interval: 100; repeat: true
+ onTriggered: smeter_angle = (0.90 * smeter_angle) + (0.1 * (oplm2_db + 13))
+ }
+
+ Timer {
+ id: smeter_filter3
+ interval: 100; repeat: true
+ onTriggered: smeter_angle = (0.90 * smeter_angle) + (0.1 * (oplm3_db + 13))
+ }
+
+ property int smeter_filter
+ property variant oplm_pair_id : OPLinkStatus.PairIDs_0
+
+ function select_oplm(index){
+ smeter_filter0.running = false;
+ smeter_filter1.running = false;
+ smeter_filter2.running = false;
+ smeter_filter3.running = false;
+
+ switch(index) {
+ case 0:
+ smeter_filter0.running = true;
+ smeter_filter = 0;
+ oplm_pair_id = OPLinkStatus.PairIDs_0
+ break;
+ case 1:
+ smeter_filter1.running = true;
+ smeter_filter = 1;
+ oplm_pair_id = OPLinkStatus.PairIDs_1
+ break;
+ case 2:
+ smeter_filter2.running = true;
+ smeter_filter = 2;
+ oplm_pair_id = OPLinkStatus.PairIDs_2
+ break;
+ case 3:
+ smeter_filter3.running = true;
+ smeter_filter = 3;
+ oplm_pair_id = OPLinkStatus.PairIDs_3
+ break;
+ }
+ }
+
+ // End Functions
+ //
+ // Start Drawing
+
SvgElementImage {
id: info_bg
sceneSize: info.sceneSize
@@ -67,21 +181,9 @@ Item {
width: parent.width
}
- SvgElementImage {
- id: batinfo_energy
- elementName: "warning-low-energy"
- sceneSize: info.sceneSize
- Rectangle {
- anchors.fill: batinfo_energy
- border.width: 0
- // Alarm based on FlightBatteryState.EstimatedFlightTime < 120s orange, < 60s red
- color: (FlightBatteryState.EstimatedFlightTime <= 120 && FlightBatteryState.EstimatedFlightTime > 60 ? "orange" :
- (FlightBatteryState.EstimatedFlightTime <= 60 ? "red": "black"))
-
- visible: FlightBatteryState.ConsumedEnergy > 0
- }
- }
-
+ //
+ // GPS Info (Top)
+ //
Repeater {
id: satNumberBar
@@ -103,55 +205,18 @@ Item {
elementName: "gps-mode-text"
Text {
- text: ["No GPS", "No Fix", "Fix2D", "Fix3D"][GPSPositionSensor.Status]
+ text: ["NO GPS", "NO FIX", "FIX 2D", "FIX 3D"][GPSPositionSensor.Status]
anchors.centerIn: parent
- font.pixelSize: Math.floor(parent.height*1.2)
+ font.pixelSize: Math.floor(parent.height*1.3)
+ font.family: "Arial"
+ font.weight: Font.DemiBold
color: "white"
}
}
- SvgElementPositionItem {
- sceneSize: info.sceneSize
- elementName: "telemetry-status"
-
- Text {
- text: ["Disconnected","HandshakeReq","HandshakeAck","Connected"][tele_status.toString()]
-
- anchors.centerIn: parent
- font.pixelSize: Math.floor(parent.height*1.2)
- color: "white"
- }
- }
-
- Repeater {
- id: txNumberBar
-
- property int txRateNumber : GCSTelemetryStats.TxDataRate.toFixed()/10 // 250 max
-
- model: 25
- SvgElementImage {
- property int minTxRateNumber : index+1
- elementName: "tx" + minTxRateNumber
- sceneSize: info.sceneSize
- visible: txNumberBar.txRateNumber >= minTxRateNumber && ((GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 4 )
- || (GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 1 ))
- }
- }
-
- Repeater {
- id: rxNumberBar
-
- property int rxRateNumber : GCSTelemetryStats.RxDataRate.toFixed()/100 // 2500 max
-
- model: 25
- SvgElementImage {
- property int minRxRateNumber : index+1
- elementName: "rx" + minRxRateNumber
- sceneSize: info.sceneSize
- visible: rxNumberBar.rxRateNumber >= minRxRateNumber && ((GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 4 )
- || (GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 1 ))
- }
- }
+ //
+ // Waypoint Info (Top)
+ //
SvgElementPositionItem {
sceneSize: info.sceneSize
@@ -163,10 +228,14 @@ Item {
Text {
text: " "+wp_heading.toFixed(1)+"°"
-
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
+ color: "cyan"
+
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
+ }
}
}
@@ -180,10 +249,14 @@ Item {
Text {
text: " "+wp_distance.toFixed(0)+" m"
-
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
+ color: "cyan"
+
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
+ }
}
}
@@ -195,14 +268,18 @@ Item {
y: Math.floor(scaledBounds.y * sceneItem.height)
visible: OPLinkStatus.LinkState == 4 //OPLink Connected
- MouseArea { id: total_dist_mouseArea; anchors.fill: parent; onClicked: reset_distance()}
+ MouseArea { id: total_dist_mouseArea; anchors.fill: parent; cursorShape: Qt.PointingHandCursor; onClicked: reset_distance()}
Text {
text: " "+total_distance.toFixed(0)+" m"
-
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
+ color: "cyan"
+
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
+ }
}
Timer {
@@ -221,10 +298,14 @@ Item {
Text {
text: formatTime(wp_eta_h) + ":" + formatTime(wp_eta_m) + ":" + formatTime(wp_eta_s)
-
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
+ color: "cyan"
+
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
+ }
}
}
@@ -238,10 +319,14 @@ Item {
Text {
text: (WaypointActive.Index+1)+" / "+PathPlan.WaypointCount
-
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
+ color: "cyan"
+
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
+ }
}
}
@@ -254,101 +339,28 @@ Item {
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]
-
+ text: ["FLY END POINT","FLY VECTOR","FLY CIRCLE RIGHT","FLY CIRCLE LEFT","DRIVE END POINT","DRIVE VECTOR","DRIVE CIRCLE LEFT",
+ "DRIVE CIRCLE RIGHT","FIXED ATTITUDE","SET ACCESSORY","LAND","DISARM ALARM"][PathDesired.Mode]
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
- }
- }
+ color: "cyan"
- SvgElementPositionItem {
- sceneSize: info.sceneSize
- elementName: "battery-volt-text"
- visible: FlightBatteryState.Voltage > 0
-
- Text {
- text: FlightBatteryState.Voltage.toFixed(2)
- anchors.centerIn: parent
- color: "white"
font {
family: "Arial"
- pixelSize: Math.floor(parent.height * 1.2)
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
}
}
}
- SvgElementPositionItem {
- sceneSize: info.sceneSize
- elementName: "battery-amp-text"
- visible: FlightBatteryState.Current > 0
-
- Text {
- text: FlightBatteryState.Current.toFixed(2)
- anchors.centerIn: parent
- color: "white"
- font {
- family: "Arial"
- pixelSize: Math.floor(parent.height * 1.2)
- }
- }
- }
-
- SvgElementPositionItem {
- sceneSize: info.sceneSize
- elementName: "battery-milliamp-text"
- visible: FlightBatteryState.ConsumedEnergy > 0
-
- Text {
- text: FlightBatteryState.ConsumedEnergy.toFixed()
- anchors.centerIn: parent
- color: "white"
- font {
- family: "Arial"
- pixelSize: Math.floor(parent.height * 1.2)
- }
- }
- }
-
- Repeater {
- id: throttleNumberBar
-
- property int throttleNumber : ActuatorDesired.Thrust.toFixed(1)*10
-
- model: 10
- SvgElementImage {
- property int minThrottleNumber : index+1
- elementName: "eng" + minThrottleNumber
- sceneSize: info.sceneSize
-
- visible: throttleNumberBar.throttleNumber >= minThrottleNumber
- }
- }
-
- SvgElementImage {
- id: mask_ThrottleBar
- elementName: "throttle-mask"
- sceneSize: info.sceneSize
- }
-
SvgElementImage {
id: mask_SatBar
elementName: "satbar-mask"
sceneSize: info.sceneSize
}
- SvgElementImage {
- id: mask_telemetryTx
- elementName: "tx-mask"
- sceneSize: info.sceneSize
- }
-
- SvgElementImage {
- id: mask_telemetryRx
- elementName: "rx-mask"
- sceneSize: info.sceneSize
- }
+ //
+ // Home info (visible after arming)
+ //
SvgElementImage {
id: home_bg
@@ -359,7 +371,7 @@ Item {
states: State {
name: "fading"
when: TakeOffLocation.Status !== 0
- PropertyChanges { target: home_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
+ PropertyChanges { target: home_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
}
transitions: Transition {
@@ -380,7 +392,7 @@ Item {
states: State {
name: "fading_heading"
when: TakeOffLocation.Status !== 0
- PropertyChanges { target: home_heading_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width }
+ PropertyChanges { target: home_heading_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
}
transitions: Transition {
@@ -410,7 +422,7 @@ Item {
states: State {
name: "fading_distance"
when: TakeOffLocation.Status !== 0
- PropertyChanges { target: home_distance_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
+ PropertyChanges { target: home_distance_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
}
transitions: Transition {
@@ -441,7 +453,7 @@ Item {
states: State {
name: "fading_distance"
when: TakeOffLocation.Status !== 0
- PropertyChanges { target: home_eta_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
+ PropertyChanges { target: home_eta_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
}
transitions: Transition {
@@ -461,6 +473,629 @@ Item {
}
}
+ //
+ // Rc-Input panel
+ //
+
+ 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.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ id: rc_input_anim
+ 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.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: rc_input_mousearea
+ elementName: "rc-input-panel-mousearea"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+
+ MouseArea {
+ id: hidedisp_rcinput;
+ anchors.fill: parent;
+ cursorShape: hide_display_bat == false && hide_display_oplm == false ? Qt.WhatsThisCursor : Qt.ArrowCursor
+ onClicked: hide_display_bat == false && hide_display_oplm == false ? hide_display_rcinput() : 0
+ }
+
+ states: State {
+ name: "fading"
+ when: hide_display_rc !== true
+ PropertyChanges { target: rc_input_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: rc_throttle
+ elementName: "rc-throttle"
+ sceneSize: info.sceneSize
+
+ width: scaledBounds.width * sceneItem.width
+ height: (scaledBounds.height * sceneItem.height) * (ManualControlCommand.Throttle)
+
+ x: scaledBounds.x * sceneItem.width
+ y: (scaledBounds.y * sceneItem.height) - rc_throttle.height + (scaledBounds.height * sceneItem.height)
+
+ smooth: true
+
+ states: State {
+ name: "fading"
+ when: hide_display_rc !== true
+ PropertyChanges { target: rc_throttle; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); }
+ }
+
+ 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 his center
+ 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.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ //
+ // Battery panel
+ //
+
+ SvgElementImage {
+ id: battery_bg
+ elementName: "battery-bg"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 10
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: battery_volt
+ sceneSize: info.sceneSize
+ elementName: "battery-volt-text"
+ z: 11
+
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ y: scaledBounds.y * sceneItem.height
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_volt; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: info.batColors[SystemAlarms.Alarm_Battery]
+ border.color: "white"
+ border.width: battery_volt.width * 0.01
+ radius: border.width * 4
+
+ Text {
+ text: FlightBatteryState.Voltage.toFixed(2)
+ anchors.centerIn: parent
+ color: "white"
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.6)
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: battery_amp
+ sceneSize: info.sceneSize
+ elementName: "battery-amp-text"
+ z: 12
+
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ y: scaledBounds.y * sceneItem.height
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_amp; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: info.batColors[SystemAlarms.Alarm_Battery]
+ border.color: "white"
+ border.width: battery_volt.width * 0.01
+ radius: border.width * 4
+
+ Text {
+ text: FlightBatteryState.Current.toFixed(2)
+ anchors.centerIn: parent
+ color: "white"
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.6)
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: battery_milliamp
+ sceneSize: info.sceneSize
+ elementName: "battery-milliamp-text"
+ z: 13
+
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ y: scaledBounds.y * sceneItem.height
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_milliamp; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+
+ // Alarm based on FlightBatteryState.EstimatedFlightTime < 120s orange, < 60s red
+ color: (FlightBatteryState.EstimatedFlightTime <= 120 && FlightBatteryState.EstimatedFlightTime > 60 ? "orange" :
+ (FlightBatteryState.EstimatedFlightTime <= 60 ? "red": info.batColors[SystemAlarms.Alarm_Battery]))
+
+ border.color: "white"
+ border.width: battery_volt.width * 0.01
+ radius: border.width * 4
+
+ Text {
+ text: FlightBatteryState.ConsumedEnergy.toFixed(0)
+ anchors.centerIn: parent
+ color: "white"
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.6)
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: battery_estimated_flight_time
+ sceneSize: info.sceneSize
+ elementName: "battery-estimated-flight-time"
+ z: 14
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ y: scaledBounds.y * sceneItem.height
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_estimated_flight_time; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ //color: info.batColors[SystemAlarms.Alarm_Battery]
+
+ // Alarm based on FlightBatteryState.EstimatedFlightTime < 120s orange, < 60s red
+ color: (FlightBatteryState.EstimatedFlightTime <= 120 && FlightBatteryState.EstimatedFlightTime > 60 ? "orange" :
+ (FlightBatteryState.EstimatedFlightTime <= 60 ? "red": info.batColors[SystemAlarms.Alarm_Battery]))
+
+ border.color: "white"
+ border.width: battery_volt.width * 0.01
+ radius: border.width * 4
+
+ Text {
+ text: formatTime(est_time_h) + ":" + formatTime(est_time_m) + ":" + formatTime(est_time_s)
+ anchors.centerIn: parent
+ color: "white"
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.6)
+ }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: battery_labels
+ elementName: "battery-labels"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 15
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_labels; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: battery_mousearea
+ elementName: "battery-panel-mousearea"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 16
+
+ MouseArea {
+ id: hidedisp_battery;
+ anchors.fill: parent;
+ cursorShape: hide_display_rc == false && hide_display_oplm == false ? Qt.WhatsThisCursor : Qt.ArrowCursor
+ onClicked: hide_display_rc == false && hide_display_oplm == false ? hide_display_battery() : 0
+ }
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ //
+ // OPLM panel
+ //
+
+ SvgElementImage {
+ id: oplm_bg
+ elementName: "oplm-bg"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 20
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: oplm_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: smeter_bg
+ elementName: "smeter-bg"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 21
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: smeter_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: smeter_scale
+ elementName: "smeter-scale"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 22
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: smeter_scale; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: smeter_needle
+ elementName: "smeter-needle"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 23
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: smeter_needle; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ transform: Rotation {
+ angle: smeter_angle.toFixed(1)
+ origin.y : smeter_needle.height
+ }
+ }
+
+ SvgElementImage {
+ id: smeter_mask
+ elementName: "smeter-mask"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 24
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: smeter_mask; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: oplm_button_bg
+ elementName: "oplm-button-bg"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 25
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: oplm_button_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ Repeater {
+ model: 4
+
+ SvgElementImage {
+ z: 25
+ property variant idButton_oplm: "oplm_button_" + index
+ property variant idButton_oplm_mousearea: "oplm_button_mousearea" + index
+ property variant button_color: "button"+index+"_color"
+
+ id: idButton_oplm
+
+ elementName: "oplm-button-" + index
+ sceneSize: info.sceneSize
+
+ Rectangle {
+ anchors.fill: parent
+ border.color: "red"
+ border.width: parent.width * 0.04
+ radius: border.width*3
+ color: "transparent"
+ opacity: smeter_filter == index ? 0.5 : 0
+ }
+
+ MouseArea {
+ id: idButton_oplm_mousearea;
+ anchors.fill: parent;
+ cursorShape: Qt.PointingHandCursor
+ onClicked: select_oplm(index)
+ }
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: idButton_oplm; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: oplm_id_label
+ elementName: "oplm-id-label"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 26
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: oplm_id_label; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: oplm_id_text
+ sceneSize: info.sceneSize
+ elementName: "oplm-id-text"
+ z: 27
+
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ y: scaledBounds.y * sceneItem.height
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: oplm_id_text; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ Text {
+ text: oplm_pair_id > 0 ? oplm_pair_id.toString(16) : "-- -- -- --"
+ anchors.centerIn: parent
+ color: "white"
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.4)
+ weight: Font.DemiBold
+ capitalization: Font.AllUppercase
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: oplm_mousearea
+ elementName: "oplm-panel-mousearea"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 26
+
+ MouseArea {
+ id: hidedisp_oplm;
+ anchors.fill: parent;
+ cursorShape: hide_display_rc == false && hide_display_bat == false ? Qt.WhatsThisCursor : Qt.ArrowCursor
+ onClicked: hide_display_rc == false && hide_display_bat == false ? hide_display_oplink() : 0
+ }
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: oplm_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
SvgElementImage {
id: info_border
diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml
index c40591424..033c8cb40 100644
--- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml
+++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml
@@ -3,6 +3,14 @@ import QtQuick 2.0
Item {
id: sceneItem
property variant sceneSize
+ property real vert_velocity
+
+ Timer {
+ interval: 100; running: true; repeat: true
+ onTriggered: vert_velocity = (0.9 * vert_velocity) + (0.1 * VelocityState.Down)
+ }
+
+
SvgElementImage {
id: vsi_window
@@ -13,82 +21,69 @@ Item {
x: Math.floor(scaledBounds.x * sceneItem.width)
y: Math.floor(scaledBounds.y * sceneItem.height)
- property double scaleSteps : 8
- property double scaleStepValue : 1000
- property double scaleStepHeight : height/scaleSteps
+ }
- SvgElementImage {
- id: vsi_bar
+ SvgElementImage {
+ id: vsi_waypoint
+ elementName: "vsi-waypoint"
+ sceneSize: sceneItem.sceneSize
- elementName: "vsi-bar"
- sceneSize: sceneItem.sceneSize
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
- //the scale in 1000 ft/min, convert from VelocityState.Down value in m/s
- height: (-VelocityState.Down*3.28*60/vsi_window.scaleStepValue)*vsi_window.scaleStepHeight
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
- anchors.bottom: parent.verticalCenter
- anchors.left: parent.left
- }
+ smooth: true
+ visible: VelocityDesired.Down !== 0.0 && FlightStatus.FlightMode > 7
- SvgElementImage {
- id: vsi_scale
-
- elementName: "vsi-scale"
- sceneSize: sceneItem.sceneSize
-
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
-
- //Text labels
- Column {
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.right
-
- Repeater {
- model: [3, 2, 1, 0, 1, 2, 3]
- Item {
- height: vsi_window.scaleStepHeight
- width: vsi_window.width - vsi_scale.width //fill area right to scale
-
- Text {
- text: modelData
- visible: modelData !== 0 //hide "0" label
- color: "white"
- font.pixelSize: parent.height * 0.5
- font.family: "Arial"
-
- anchors.centerIn: parent
- }
- }
- }
- }
+ //rotate it around the center
+ transform: Rotation {
+ angle: -VelocityDesired.Down * 5
+ origin.y : vsi_waypoint.height / 2
+ origin.x : vsi_waypoint.width * 33
}
}
-
SvgElementImage {
- id: vsi_centerline
- clip: true
- smooth: true
+ id: vsi_scale
- elementName: "vsi-centerline"
+ elementName: "vsi-scale"
sceneSize: sceneItem.sceneSize
x: Math.floor(scaledBounds.x * sceneItem.width)
y: Math.floor(scaledBounds.y * sceneItem.height)
+
}
- Text {
- id: vsi_unit_text
- text: "ft / m"
+ SvgElementImage {
+ id: vsi_arrow
+ elementName: "vsi-arrow"
+ sceneSize: sceneItem.sceneSize
- color: "white"
- font {
- family: "Arial"
- pixelSize: sceneSize.height * 0.02
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
+
+ smooth: true
+
+ //rotate it around the center
+ transform: Rotation {
+ angle: -vert_velocity * 5
+ origin.y : vsi_arrow.height / 2
+ origin.x : vsi_arrow.width * 3.15
}
- anchors.top: vsi_window.bottom
- anchors.left: vsi_window.left
- anchors.margins: font.pixelSize * 0.5
+ }
+
+ SvgElementImage {
+ id: foreground
+ elementName: "foreground"
+ sceneSize: sceneItem.sceneSize
+
+ x: Math.floor(scaledBounds.x * sceneItem.width)
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+
}
}
diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml
index 82030e16b..c6f4e6476 100644
--- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml
+++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml
@@ -6,6 +6,45 @@ Item {
// Uninitialised, OK, Warning, Error, Critical
property variant statusColors : ["gray", "green", "red", "red", "red"]
+ // DisArmed , Arming, Armed
+ property variant armColors : ["gray", "orange", "green"]
+
+ // All 'manual modes' are green, 'assisted' modes in cyan
+ // "MANUAL","STAB 1","STAB 2", "STAB 3", "STAB 4", "STAB 5", "STAB 6", "AUTOTUNE",
+ // "POS HOLD", "POS VFPV", "POS VLOS", "POS VNSEW", "RTB", "LAND", "PATHPLANNER", "POI", "AUTOCRUISE"
+
+ 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"]
+
+ // SystemSettings.AirframeType 3 - 17 : VtolPathFollower, check ThrustControl
+
+ property var thrust_mode: FlightStatus.FlightMode < 7 ? StabilizationDesired.StabilizationMode_Thrust :
+ FlightStatus.FlightMode > 7 && SystemSettings.AirframeType > 2 && SystemSettings.AirframeType < 18
+ && VtolPathFollowerSettings.ThrustControl == 1 ? 12 :
+ FlightStatus.FlightMode > 7 && SystemSettings.AirframeType < 3 ? 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)
+ property real time_s: (flight_time > 0 ? Math.floor(flight_time - time_h*3600 - time_m*60) : 0)
+
+ function formatTime(time) {
+ if (time === 0)
+ return "00"
+ if (time < 10)
+ return "0" + time;
+ else
+ return time.toString();
+ }
+
SvgElementImage {
id: warning_bg
elementName: "warnings-bg"
@@ -14,10 +53,64 @@ Item {
anchors.bottom: parent.bottom
}
+ SvgElementPositionItem {
+ id: warning_time
+ sceneSize: parent.sceneSize
+ elementName: "warning-time"
+ 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: (SystemStats.FlightTime > 0 ? "green" : "grey")
+
+ Text {
+ anchors.centerIn: parent
+ text: formatTime(time_h) + ":" + formatTime(time_m) + ":" + formatTime(time_s)
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.8)
+ weight: Font.DemiBold
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: warning_arm
+ sceneSize: parent.sceneSize
+ elementName: "warning-arm"
+ 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.armColors[FlightStatus.Armed]
+
+ Text {
+ anchors.centerIn: parent
+ text: ["DISARMED","ARMING","ARMED"][FlightStatus.Armed]
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.74)
+ weight: Font.DemiBold
+ }
+ }
+ }
+ }
+
SvgElementPositionItem {
id: warning_rc_input
sceneSize: parent.sceneSize
elementName: "warning-rc-input"
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
Rectangle {
anchors.fill: parent
@@ -28,7 +121,7 @@ Item {
text: "RC INPUT"
font {
family: "Arial"
- pixelSize: Math.floor(parent.height * 0.8)
+ pixelSize: Math.floor(parent.height * 0.74)
weight: Font.DemiBold
}
}
@@ -39,6 +132,10 @@ Item {
id: warning_master_caution
sceneSize: parent.sceneSize
elementName: "warning-master-caution"
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
property bool warningActive: (SystemAlarms.Alarm_BootFault > 1 ||
SystemAlarms.Alarm_OutOfMemory > 1 ||
@@ -48,14 +145,15 @@ Item {
Rectangle {
anchors.fill: parent
color: parent.warningActive ? "red" : "red"
- opacity: parent.warningActive ? 1.0 : 0.15
+ opacity: parent.warningActive ? 1.0 : 0.4
Text {
anchors.centerIn: parent
text: "MASTER CAUTION"
+ color: "white"
font {
family: "Arial"
- pixelSize: Math.floor(parent.height * 0.8)
+ pixelSize: Math.floor(parent.height * 0.74)
weight: Font.DemiBold
}
}
@@ -66,6 +164,10 @@ Item {
id: warning_autopilot
sceneSize: parent.sceneSize
elementName: "warning-autopilot"
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
Rectangle {
anchors.fill: parent
@@ -76,7 +178,62 @@ Item {
text: "AUTOPILOT"
font {
family: "Arial"
- pixelSize: Math.floor(parent.height * 0.8)
+ pixelSize: Math.floor(parent.height * 0.74)
+ weight: Font.DemiBold
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: warning_flightmode
+ sceneSize: parent.sceneSize
+ elementName: "warning-flightmode"
+ 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.flightmodeColors[FlightStatus.FlightMode]
+
+ Text {
+ anchors.centerIn: parent
+ text: ["MANUAL","STAB 1","STAB 2", "STAB 3", "STAB 4", "STAB 5", "STAB 6", "AUTOTUNE", "POS HOLD", "POS VFPV",
+ "POS VLOS", "POS VNSEW", "RTB", "LAND", "PATHPLAN", "POI", "AUTOCRUISE"][FlightStatus.FlightMode]
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.74)
+ weight: Font.DemiBold
+ }
+ }
+ }
+ }
+
+ 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: FlightStatus.FlightMode < 1 ? "grey" : 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", "CRUISECTRL", "AUTO"][thrust_mode.toString()]
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.74)
weight: Font.DemiBold
}
}
@@ -91,22 +248,6 @@ Item {
visible: SystemAlarms.Alarm_GPS > 1
}
- SvgElementImage {
- id: warning_telemetry
- elementName: "warning-telemetry"
- sceneSize: warnings.sceneSize
-
- visible: SystemAlarms.Alarm_Telemetry > 1
- }
-
- SvgElementImage {
- id: warning_battery
- elementName: "warning-battery"
- sceneSize: warnings.sceneSize
- anchors.right: parent.right
- visible: SystemAlarms.Alarm_Battery > 1
- }
-
SvgElementImage {
id: warning_attitude
elementName: "warning-attitude"
diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg
index eddbc6a21..560b7ee07 100644
--- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg
+++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg
@@ -2,24 +2,79 @@