diff --git a/src/comm/MAVLinkProtocol.cc b/src/comm/MAVLinkProtocol.cc index 35b7218a096008e5b8073ff24ea77c8c867f2dd6..ae16ed10aca8b4c2d2e9df7c0a5444efb3e00df1 100644 --- a/src/comm/MAVLinkProtocol.cc +++ b/src/comm/MAVLinkProtocol.cc @@ -308,6 +308,16 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b) } } + if(message.msgid == MAVLINK_MSG_ID_RADIO_STATUS) + { + // process telemetry status message + mavlink_radio_status_t rstatus; + mavlink_msg_radio_status_decode(&message, &rstatus); + + emit radioStatusChanged(link, rstatus.rxerrors, rstatus.fixed, rstatus.rssi, rstatus.remrssi, + rstatus.txbuf, rstatus.noise, rstatus.remnoise); + } + #if defined(QGC_PROTOBUF_ENABLED) if (message.msgid == MAVLINK_MSG_ID_EXTENDED_MESSAGE) diff --git a/src/comm/MAVLinkProtocol.h b/src/comm/MAVLinkProtocol.h index 158890dbab600a9a71fcebb15e254d288f398056..16dea03bdcde56983f962d0480137e60572b3b00 100644 --- a/src/comm/MAVLinkProtocol.h +++ b/src/comm/MAVLinkProtocol.h @@ -276,6 +276,19 @@ signals: void actionGuardChanged(bool enabled); /** @brief Emitted if actiion request timeout changed */ void actionRetransmissionTimeoutChanged(int ms); + /** + * @brief Emitted if a new radio status packet received + * + * @param rxerrors receive errors + * @param fixed count of error corrected packets + * @param rssi local signal strength + * @param remrssi remote signal strength + * @param txbuf how full the tx buffer is as a percentage + * @param noise background noise level + * @param remnoise remote background noise level + */ + void radioStatusChanged(LinkInterface* link, unsigned rxerrors, unsigned fixed, unsigned rssi, unsigned remrssi, + unsigned txbuf, unsigned noise, unsigned remnoise); }; #endif // MAVLINKPROTOCOL_H_