From b9cd3a8a399e271177e2a04aef14fe8cca6d5954 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 7 Feb 2019 13:30:09 +1100 Subject: [PATCH] AP_Logger: add logging of mavlink stats --- libraries/AP_Logger/LogStructure.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libraries/AP_Logger/LogStructure.h b/libraries/AP_Logger/LogStructure.h index df6756055b..f06d6ea95f 100644 --- a/libraries/AP_Logger/LogStructure.h +++ b/libraries/AP_Logger/LogStructure.h @@ -325,6 +325,15 @@ struct PACKED log_RCOUT { uint16_t chan14; }; +struct PACKED log_MAV { + LOG_PACKET_HEADER; + uint64_t time_us; + uint8_t chan; + uint16_t packet_tx_count; + uint16_t packet_rx_success_count; + uint16_t packet_rx_drop_count; +}; + struct PACKED log_RSSI { LOG_PACKET_HEADER; uint64_t time_us; @@ -1461,6 +1470,8 @@ Format characters in the format string for binary log messages "RATE", "Qffffffffffff", "TimeUS,RDes,R,ROut,PDes,P,POut,YDes,Y,YOut,ADes,A,AOut", "skk-kk-kk-oo-", "F?????????BB-" }, \ { LOG_RALLY_MSG, sizeof(log_Rally), \ "RALY", "QBBLLh", "TimeUS,Tot,Seq,Lat,Lng,Alt", "s--DUm", "F--GGB" }, \ + { LOG_MAV_MSG, sizeof(log_MAV), \ + "MAV", "QBHHH", "TimeUS,chan,txp,rxp,rxdp", "s#---", "F-000" }, \ { LOG_VISUALODOM_MSG, sizeof(log_VisualOdom), \ "VISO", "Qffffffff", "TimeUS,dt,AngDX,AngDY,AngDZ,PosDX,PosDY,PosDZ,conf", "ssrrrmmm-", "FF000000-" }, \ { LOG_OPTFLOW_MSG, sizeof(log_Optflow), \ @@ -1637,6 +1648,7 @@ enum LogMessages : uint8_t { LOG_OPTFLOW_MSG, LOG_EVENT_MSG, LOG_WHEELENCODER_MSG, + LOG_MAV_MSG, _LOG_LAST_MSG_ };