mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-26 15:54:15 +01:00
LP-230 Update PFD for Autotune and new PathPlan alarm behavior.
This commit is contained in:
parent
19fa385f28
commit
f0d6823d42
@ -305,6 +305,10 @@ function estimatedTimeAlarmColor() {
|
||||
* Pathplan and Waypoints
|
||||
*
|
||||
*/
|
||||
function isPathPlanEnabled() {
|
||||
return (flightStatus.flightMode == FlightStatus.FlightMode.PathPlanner);
|
||||
}
|
||||
|
||||
function isPathPlanValid() {
|
||||
return (systemAlarms.alarmPathPlan == SystemAlarms.Alarm.OK);
|
||||
}
|
||||
@ -379,13 +383,13 @@ function isVtolPathFollowerSettingsThrustAuto() {
|
||||
function flightModeName() {
|
||||
return ["MANUAL", "STAB 1", "STAB 2", "STAB 3", "STAB 4", "STAB 5", "STAB 6",
|
||||
"POS HOLD", "COURSELOCK", "VEL ROAM", "HOME LEASH", "ABS POS", "RTB",
|
||||
"LAND", "PATHPLAN", "POI", "AUTOCRUISE", "AUTOTAKEOFF"][flightStatus.flightMode];
|
||||
"LAND", "PATHPLAN", "POI", "AUTOCRUISE", "AUTOTAKEOFF", "AUTOTUNE"][flightStatus.flightMode];
|
||||
}
|
||||
|
||||
function flightModeColor() {
|
||||
return ["gray", "green", "green", "green", "green", "green", "green",
|
||||
"cyan", "cyan", "cyan", "cyan", "cyan", "cyan",
|
||||
"cyan", "cyan", "cyan", "cyan", "cyan"][flightStatus.flightMode];
|
||||
"cyan", "cyan", "cyan", "cyan", "cyan", "cyan"][flightStatus.flightMode];
|
||||
}
|
||||
|
||||
function thrustMode() {
|
||||
@ -399,12 +403,12 @@ function thrustModeName() {
|
||||
// Last "Auto" Thrust mode is added to UAVO enum list
|
||||
// Lower case modes are never displayed/used for Thrust
|
||||
return ["MANUAL", "rate", "ratetrainer", "attitude", "axislock", "weakleveling", "virtualbar", "acro+ ", "rattitude",
|
||||
"ALT HOLD", "ALT VARIO", "CRUISECTRL", "AUTO"][thrustMode()]
|
||||
"ALT HOLD", "ALT VARIO", "CRUISECTRL", "systemident", "AUTO"][thrustMode()]
|
||||
}
|
||||
|
||||
function thrustModeColor() {
|
||||
return ["green", "grey", "grey", "grey", "grey", "grey", "grey", "grey", "grey",
|
||||
"green", "green", "green", "cyan"][thrustMode()];
|
||||
"green", "green", "green", "grey", "cyan"][thrustMode()];
|
||||
}
|
||||
|
||||
function armStatusName() {
|
||||
|
@ -134,7 +134,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||
visible: UAV.isPathPlanValid()
|
||||
visible: UAV.isPathPlanEnabled()
|
||||
}
|
||||
|
||||
SvgElementPositionItem {
|
||||
@ -143,7 +143,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||
visible: UAV.isPathPlanValid()
|
||||
visible: UAV.isPathPlanEnabled()
|
||||
|
||||
Text {
|
||||
text: UAV.isPathPlanValid() ? " " + UAV.waypointHeading().toFixed(1) + "°" : " 0°"
|
||||
@ -164,7 +164,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||
visible: UAV.isPathPlanValid()
|
||||
visible: UAV.isPathPlanEnabled()
|
||||
|
||||
Text {
|
||||
text: UAV.isPathPlanValid() ? " " + UAV.waypointDistance().toFixed(0) + " m" : " 0 m"
|
||||
@ -185,7 +185,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||
visible: UAV.isPathPlanValid()
|
||||
visible: UAV.isPathPlanEnabled()
|
||||
|
||||
MouseArea { id: total_dist_mouseArea; anchors.fill: parent; cursorShape: Qt.PointingHandCursor; onClicked: reset_distance()}
|
||||
|
||||
@ -213,7 +213,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||
visible: UAV.isPathPlanValid()
|
||||
visible: UAV.isPathPlanEnabled()
|
||||
|
||||
Text {
|
||||
text: UAV.isPathPlanValid() ? Utils.estimatedTimeOfArrival(UAV.waypointDistance(), UAV.currentVelocity()) : "00:00:00"
|
||||
@ -234,7 +234,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||
visible: UAV.isPathPlanValid()
|
||||
visible: UAV.isPathPlanEnabled()
|
||||
|
||||
Text {
|
||||
text: UAV.isPathPlanValid() ? UAV.currentWaypointActive() + " / " + UAV.waypointCount() : "0 / 0"
|
||||
@ -255,7 +255,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||
visible: UAV.isPathPlanValid()
|
||||
visible: UAV.isPathPlanEnabled()
|
||||
|
||||
Text {
|
||||
text: UAV.isPathPlanValid() ? UAV.pathModeDesired() : ""
|
||||
@ -281,7 +281,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: scaledBounds.y * sceneItem.height
|
||||
visible: (!UAV.isPathPlanValid() && UAV.batteryModuleEnabled())
|
||||
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled())
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
@ -296,7 +296,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||
visible: (!UAV.isPathPlanValid() && UAV.batteryModuleEnabled())
|
||||
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled())
|
||||
}
|
||||
|
||||
SvgElementPositionItem {
|
||||
@ -307,7 +307,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: scaledBounds.y * sceneItem.height
|
||||
visible: (!UAV.isPathPlanValid() && UAV.batteryModuleEnabled())
|
||||
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled())
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
@ -334,7 +334,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: scaledBounds.y * sceneItem.height
|
||||
visible: (!UAV.isPathPlanValid() && UAV.batteryModuleEnabled())
|
||||
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled())
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
@ -361,7 +361,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: scaledBounds.y * sceneItem.height
|
||||
visible: (!UAV.isPathPlanValid() && UAV.batteryModuleEnabled())
|
||||
visible: (!UAV.isPathPlanEnabled() && UAV.batteryModuleEnabled())
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
@ -406,7 +406,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||
visible: !UAV.isPathPlanValid()
|
||||
visible: !UAV.isPathPlanEnabled()
|
||||
}
|
||||
|
||||
SvgElementPositionItem {
|
||||
@ -415,7 +415,7 @@ Item {
|
||||
width: scaledBounds.width * sceneItem.width
|
||||
height: scaledBounds.height * sceneItem.height
|
||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||
visible: !UAV.isPathPlanValid()
|
||||
visible: !UAV.isPathPlanEnabled()
|
||||
|
||||
TooltipArea {
|
||||
text: "Reset distance counter"
|
||||
|
Loading…
x
Reference in New Issue
Block a user