mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
OP-1354 PFD fixes for telemetry rates display / Telemetry status. Sumdist only displayed if connected via OPLM
This commit is contained in:
parent
01b01052a8
commit
fc1b49fe01
@ -3,6 +3,9 @@ import QtQuick 2.0
|
|||||||
Item {
|
Item {
|
||||||
id: info
|
id: info
|
||||||
property variant sceneSize
|
property variant sceneSize
|
||||||
|
|
||||||
|
property var tele_status : (OPLinkStatus.LinkState == 1 ? GCSTelemetryStats.Status :
|
||||||
|
OPLinkStatus.LinkState == 4 ? GCSTelemetryStats.Status : 0 )
|
||||||
|
|
||||||
property real home_heading: 180/3.1415 * Math.atan2(TakeOffLocation.East - PositionState.East,
|
property real home_heading: 180/3.1415 * Math.atan2(TakeOffLocation.East - PositionState.East,
|
||||||
TakeOffLocation.North - PositionState.North)
|
TakeOffLocation.North - PositionState.North)
|
||||||
@ -112,7 +115,7 @@ Item {
|
|||||||
elementName: "telemetry-status"
|
elementName: "telemetry-status"
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: ["Disconnected","HandshakeReq","HandshakeAck","Connected"][GCSTelemetryStats.Status]
|
text: ["Disconnected","HandshakeReq","HandshakeAck","Connected"][tele_status.toString()]
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
font.pixelSize: Math.floor(parent.height*1.2)
|
font.pixelSize: Math.floor(parent.height*1.2)
|
||||||
@ -130,7 +133,8 @@ Item {
|
|||||||
property int minTxRateNumber : index+1
|
property int minTxRateNumber : index+1
|
||||||
elementName: "tx" + minTxRateNumber
|
elementName: "tx" + minTxRateNumber
|
||||||
sceneSize: info.sceneSize
|
sceneSize: info.sceneSize
|
||||||
visible: txNumberBar.txRateNumber >= minTxRateNumber
|
visible: txNumberBar.txRateNumber >= minTxRateNumber && ((GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 4 )
|
||||||
|
|| (GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 1 ))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +148,8 @@ Item {
|
|||||||
property int minRxRateNumber : index+1
|
property int minRxRateNumber : index+1
|
||||||
elementName: "rx" + minRxRateNumber
|
elementName: "rx" + minRxRateNumber
|
||||||
sceneSize: info.sceneSize
|
sceneSize: info.sceneSize
|
||||||
visible: rxNumberBar.rxRateNumber >= minRxRateNumber
|
visible: rxNumberBar.rxRateNumber >= minRxRateNumber && ((GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 4 )
|
||||||
|
|| (GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 1 ))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +193,7 @@ Item {
|
|||||||
width: scaledBounds.width * sceneItem.width
|
width: scaledBounds.width * sceneItem.width
|
||||||
height: scaledBounds.height * sceneItem.height
|
height: scaledBounds.height * sceneItem.height
|
||||||
y: Math.floor(scaledBounds.y * sceneItem.height)
|
y: Math.floor(scaledBounds.y * sceneItem.height)
|
||||||
visible: true
|
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; onClicked: reset_distance()}
|
||||||
|
|
||||||
|
@ -66,7 +66,8 @@ PfdQmlGadgetWidget::PfdQmlGadgetWidget(QWindow *parent) :
|
|||||||
"ActuatorDesired" <<
|
"ActuatorDesired" <<
|
||||||
"TakeOffLocation" <<
|
"TakeOffLocation" <<
|
||||||
"PathPlan" <<
|
"PathPlan" <<
|
||||||
"WaypointActive";
|
"WaypointActive" <<
|
||||||
|
"OPLinkStatus" ;
|
||||||
|
|
||||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||||
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
||||||
|
Loading…
Reference in New Issue
Block a user