From 47d0b9f7a4eed1e6aa871fb439a939cb41cbce32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Thu, 2 Jul 2020 14:03:41 -0300 Subject: [PATCH] MAVLinkProtocol: Add handle for HIGH_LATENCY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/comm/MAVLinkProtocol.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/comm/MAVLinkProtocol.cc b/src/comm/MAVLinkProtocol.cc index b32119d96..e89754390 100644 --- a/src/comm/MAVLinkProtocol.cc +++ b/src/comm/MAVLinkProtocol.cc @@ -325,6 +325,14 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b) emit vehicleHeartbeatInfo(link, _message.sysid, _message.compid, heartbeat.autopilot, heartbeat.type); } + if (_message.msgid == MAVLINK_MSG_ID_HIGH_LATENCY) { + _startLogging(); + mavlink_high_latency_t highLatency; + mavlink_msg_high_latency_decode(&_message, &highLatency); + // HIGH_LATENCY does not provide autopilot or type information, generic is our safest bet + emit vehicleHeartbeatInfo(link, _message.sysid, _message.compid, MAV_AUTOPILOT_GENERIC, MAV_TYPE_GENERIC); + } + if (_message.msgid == MAVLINK_MSG_ID_HIGH_LATENCY2) { _startLogging(); mavlink_high_latency2_t highLatency2; -- 2.22.0