diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml index f8db82737..d2df20e31 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml @@ -157,7 +157,6 @@ Item { width: scaledBounds.width * sceneItem.width height: scaledBounds.height * sceneItem.height y: Math.floor(scaledBounds.y * sceneItem.height) - visible: OPLinkStatus.LinkState == 4 //OPLink Connected MouseArea { id: total_dist_mouseArea; anchors.fill: parent; cursorShape: Qt.PointingHandCursor; onClicked: reset_distance()} diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml index 0abf4bd16..77ffa661e 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml @@ -72,11 +72,33 @@ Item { property real memory_free : SystemStats.HeapRemaining > 1024 ? SystemStats.HeapRemaining / 1024 : SystemStats.HeapRemaining // 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 - + property int oplm0_db: telemetry_link == 1 ? OPLinkStatus.PairSignalStrengths_0 : -127 + property int oplm1_db: telemetry_link == 1 ? OPLinkStatus.PairSignalStrengths_1 : -127 + property int oplm2_db: telemetry_link == 1 ? OPLinkStatus.PairSignalStrengths_2 : -127 + property int oplm3_db: telemetry_link == 1 ? OPLinkStatus.PairSignalStrengths_3 : -127 + + property real telemetry_sum + property real telemetry_sum_old + property bool telemetry_link + + // Hack : check if telemetry is active. Works with real link and log replay + function telemetry_check(){ + telemetry_sum = OPLinkStatus.RXRate + OPLinkStatus.RXRate + + if (telemetry_sum != telemetry_sum_old){ + telemetry_link = 1 + } else { + telemetry_link = 0 + } + telemetry_sum_old = telemetry_sum + } + + Timer { + id: telemetry_activity + interval: 700; running: true; repeat: true + onTriggered: telemetry_check() + } + // Filtering for S-meter. Smeter range -127dB <--> -13dB = S9+60dB Timer {