From a0c80a0b3b11fca01228bfde67c0ac25342abe55 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 30 Apr 2019 20:17:10 +1000 Subject: [PATCH] GCS_MAVLink: make send_text and send_textv const --- libraries/GCS_MAVLink/GCS.h | 4 ++-- libraries/GCS_MAVLink/GCS_Common.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS.h b/libraries/GCS_MAVLink/GCS.h index 8c9538dda3..c771618ef8 100644 --- a/libraries/GCS_MAVLink/GCS.h +++ b/libraries/GCS_MAVLink/GCS.h @@ -121,8 +121,8 @@ public: void init(AP_HAL::UARTDriver *port, mavlink_channel_t mav_chan); void setup_uart(const AP_SerialManager& serial_manager, AP_SerialManager::SerialProtocol protocol, uint8_t instance); void send_message(enum ap_message id); - void send_text(MAV_SEVERITY severity, const char *fmt, ...); - void send_textv(MAV_SEVERITY severity, const char *fmt, va_list arg_list); + void send_text(MAV_SEVERITY severity, const char *fmt, ...) const; + void send_textv(MAV_SEVERITY severity, const char *fmt, va_list arg_list) const; void queued_param_send(); void queued_mission_request_send(); // packetReceived is called on any successful decode of a mavlink message diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 2d46c68064..d17cc572ed 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -686,13 +686,13 @@ void GCS_MAVLINK::handle_param_value(mavlink_message_t *msg) mount->handle_param_value(msg); } -void GCS_MAVLINK::send_textv(MAV_SEVERITY severity, const char *fmt, va_list arg_list) +void GCS_MAVLINK::send_textv(MAV_SEVERITY severity, const char *fmt, va_list arg_list) const { char text[MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN+1]; hal.util->vsnprintf(text, sizeof(text), fmt, arg_list); gcs().send_statustext(severity, (1<