mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
LP-510 Changes from review - Add some limits and conditions for Rssi and S-Meter
This commit is contained in:
parent
c16eb9821b
commit
1d04b95323
@ -229,12 +229,12 @@ function isOplmConnected() {
|
||||
return (opLinkStatus.linkState == OPLinkStatus.LinkState.Connected);
|
||||
}
|
||||
|
||||
function OplmRSSI() {
|
||||
return (opLinkStatus.rssi);
|
||||
function oplmRSSI() {
|
||||
return (opLinkStatus.rssi > -13) ? -13 : opLinkStatus.rssi;
|
||||
}
|
||||
|
||||
function OplmDeviceID() {
|
||||
return (opLinkStatus.deviceID);
|
||||
function oplmDeviceID() {
|
||||
return opLinkStatus.deviceID;
|
||||
}
|
||||
|
||||
function magSourceName() {
|
||||
|
@ -86,7 +86,7 @@ Item {
|
||||
property real smeter_angle
|
||||
|
||||
// Needed to get correctly int8 value
|
||||
property int oplm_rssi: UAV.OplmRSSI()
|
||||
property int oplm_rssi: telemetry_link ? UAV.oplmRSSI() : -127
|
||||
|
||||
property real telemetry_sum
|
||||
property real telemetry_sum_old
|
||||
@ -772,7 +772,7 @@ Item {
|
||||
}
|
||||
|
||||
Text {
|
||||
text: UAV.OplmDeviceID() > 0 ? UAV.OplmDeviceID().toString(16) : "-- -- -- --"
|
||||
text: (UAV.oplmDeviceID() > 0) ? UAV.oplmDeviceID().toString(16) : "-- -- -- --"
|
||||
anchors.centerIn: parent
|
||||
color: "white"
|
||||
font {
|
||||
|
Loading…
x
Reference in New Issue
Block a user