GCS_MAVLink: handle RADIO_STATUS is GCS base class

This commit is contained in:
Peter Barker 2024-01-24 10:57:16 +11:00 committed by Andrew Tridgell
parent d4cbb54e35
commit 5e5bca2bba
2 changed files with 11 additions and 3 deletions

View File

@ -573,7 +573,10 @@ protected:
#endif
void handle_fence_message(const mavlink_message_t &msg);
void handle_param_value(const mavlink_message_t &msg);
void handle_radio_status(const mavlink_message_t &msg, bool log_radio);
#if HAL_LOGGING_ENABLED
virtual uint32_t log_radio_bit() const { return 0; }
#endif
void handle_radio_status(const mavlink_message_t &msg);
void handle_serial_control(const mavlink_message_t &msg);
void handle_vision_position_delta(const mavlink_message_t &msg);

View File

@ -827,7 +827,7 @@ float GCS_MAVLINK::telemetry_radio_rssi()
return last_radio_status.rssi/254.0f;
}
void GCS_MAVLINK::handle_radio_status(const mavlink_message_t &msg, bool log_radio)
void GCS_MAVLINK::handle_radio_status(const mavlink_message_t &msg)
{
mavlink_radio_t packet;
mavlink_msg_radio_decode(&msg, &packet);
@ -874,7 +874,7 @@ void GCS_MAVLINK::handle_radio_status(const mavlink_message_t &msg, bool log_rad
#if HAL_LOGGING_ENABLED
//log rssi, noise, etc if logging Performance monitoring data
if (log_radio) {
if (AP::logger().should_log(log_radio_bit())) {
AP::logger().Write_Radio(packet);
}
#endif
@ -4070,6 +4070,11 @@ void GCS_MAVLINK::handle_message(const mavlink_message_t &msg)
handle_param_value(msg);
break;
case MAVLINK_MSG_ID_RADIO:
case MAVLINK_MSG_ID_RADIO_STATUS:
handle_radio_status(msg);
break;
#if AP_MAVLINK_MSG_SERIAL_CONTROL_ENABLED
case MAVLINK_MSG_ID_SERIAL_CONTROL:
handle_serial_control(msg);