From ae9a4a82e59805dbfea6e04e793dde4b5fabfbbf Mon Sep 17 00:00:00 2001 From: Gregory Dymarek Date: Sat, 16 Apr 2016 18:32:53 +0100 Subject: [PATCH] Default case for RADIO_STATUS --- src/comm/MAVLinkProtocol.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/comm/MAVLinkProtocol.cc b/src/comm/MAVLinkProtocol.cc index 44779f7ef..ef605400f 100644 --- a/src/comm/MAVLinkProtocol.cc +++ b/src/comm/MAVLinkProtocol.cc @@ -270,6 +270,9 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b) */ rssi = qMin(qMax(qRound(static_cast(rssi) / 1.9 - 127.0), - 120), 0); remrssi = qMin(qMax(qRound(static_cast(remrssi) / 1.9 - 127.0), - 120), 0); + } else { + rssi = (int8_t) rstatus.rssi; + remrssi = (int8_t) rstatus.remrssi; } emit radioStatusChanged(link, rstatus.rxerrors, rstatus.fixed, rssi, remrssi, -- 2.22.0