From 4c2cc511e690c9ea663c9c94d00c67b6650b2a9d Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 24 Jan 2024 10:57:16 +1100 Subject: [PATCH] ArduCopter: handle RADIO_STATUS is GCS base class --- ArduCopter/GCS_Mavlink.cpp | 11 ----------- ArduCopter/GCS_Mavlink.h | 5 +++++ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/ArduCopter/GCS_Mavlink.cpp b/ArduCopter/GCS_Mavlink.cpp index f625654ce2..c35d96e4ba 100644 --- a/ArduCopter/GCS_Mavlink.cpp +++ b/ArduCopter/GCS_Mavlink.cpp @@ -1485,17 +1485,6 @@ void GCS_MAVLINK_Copter::handle_message(const mavlink_message_t &msg) } #endif - case MAVLINK_MSG_ID_RADIO: - case MAVLINK_MSG_ID_RADIO_STATUS: // MAV ID: 109 - { -#if HAL_LOGGING_ENABLED - handle_radio_status(msg, copter.should_log(MASK_LOG_PM)); -#else - handle_radio_status(msg, false); -#endif - break; - } - case MAVLINK_MSG_ID_TERRAIN_DATA: case MAVLINK_MSG_ID_TERRAIN_CHECK: #if AP_TERRAIN_AVAILABLE diff --git a/ArduCopter/GCS_Mavlink.h b/ArduCopter/GCS_Mavlink.h index 0167a5d096..1961916e03 100644 --- a/ArduCopter/GCS_Mavlink.h +++ b/ArduCopter/GCS_Mavlink.h @@ -2,6 +2,7 @@ #include #include +#include "defines.h" #ifndef AC_MAVLINK_SOLO_BUTTON_COMMAND_HANDLING_ENABLED #define AC_MAVLINK_SOLO_BUTTON_COMMAND_HANDLING_ENABLED 1 @@ -57,6 +58,10 @@ protected: void handle_manual_control_axes(const mavlink_manual_control_t &packet, const uint32_t tnow) override; +#if HAL_LOGGING_ENABLED + uint32_t log_radio_bit() const override { return MASK_LOG_PM; } +#endif + private: // sanity check velocity or acceleration vector components are numbers