From 75dec6fcc7a124558cb49689b6136ff89c8c019d Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 24 Jan 2024 10:57:16 +1100 Subject: [PATCH] Rover: handle RADIO_STATUS is GCS base class --- Rover/GCS_Mavlink.cpp | 14 -------------- Rover/GCS_Mavlink.h | 6 ++++++ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Rover/GCS_Mavlink.cpp b/Rover/GCS_Mavlink.cpp index 6fab0bc591..efe14de078 100644 --- a/Rover/GCS_Mavlink.cpp +++ b/Rover/GCS_Mavlink.cpp @@ -793,11 +793,6 @@ void GCS_MAVLINK_Rover::handle_message(const mavlink_message_t &msg) handle_set_position_target_global_int(msg); break; - case MAVLINK_MSG_ID_RADIO: - case MAVLINK_MSG_ID_RADIO_STATUS: - handle_radio(msg); - break; - default: GCS_MAVLINK::handle_message(msg); break; @@ -1063,15 +1058,6 @@ void GCS_MAVLINK_Rover::handle_set_position_target_global_int(const mavlink_mess } } -void GCS_MAVLINK_Rover::handle_radio(const mavlink_message_t &msg) -{ -#if HAL_LOGGING_ENABLED - handle_radio_status(msg, rover.should_log(MASK_LOG_PM)); -#else - handle_radio_status(msg, false); -#endif -} - /* handle a LANDING_TARGET command. The timestamp has been jitter corrected */ diff --git a/Rover/GCS_Mavlink.h b/Rover/GCS_Mavlink.h index c5df38a432..048bb86969 100644 --- a/Rover/GCS_Mavlink.h +++ b/Rover/GCS_Mavlink.h @@ -7,6 +7,8 @@ #define AP_MAVLINK_MAV_CMD_NAV_SET_YAW_SPEED_ENABLED 1 #endif +#include "defines.h" + class GCS_MAVLINK_Rover : public GCS_MAVLINK { public: @@ -36,6 +38,10 @@ protected: void send_nav_controller_output() const override; void send_pid_tuning() override; +#if HAL_LOGGING_ENABLED + uint32_t log_radio_bit() const override { return MASK_LOG_PM; } +#endif + private: void handle_message(const mavlink_message_t &msg) override;