GCS_Common: accept any type of severity, not just the old enum

This commit is contained in:
squilter 2015-08-11 15:21:06 -07:00 committed by Randy Mackay
parent da37769e33
commit 9d3a906602
2 changed files with 5 additions and 5 deletions

View File

@ -84,8 +84,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(gcs_severity severity, const char *str);
void send_text_P(gcs_severity severity, const prog_char_t *str);
void send_text(uint8_t severity, const char *str);
void send_text_P(uint8_t severity, const prog_char_t *str);
void data_stream_send(void);
void queued_param_send();
void queued_waypoint_send();

View File

@ -601,9 +601,9 @@ void GCS_MAVLINK::handle_param_set(mavlink_message_t *msg, DataFlash_Class *Data
void
GCS_MAVLINK::send_text(gcs_severity severity, const char *str)
GCS_MAVLINK::send_text(uint8_t severity, const char *str)
{
if (severity != SEVERITY_LOW &&
if (severity < MAV_SEVERITY_WARNING &&
comm_get_txspace(chan) >=
MAVLINK_NUM_NON_PAYLOAD_BYTES+MAVLINK_MSG_ID_STATUSTEXT_LEN) {
// send immediately
@ -618,7 +618,7 @@ GCS_MAVLINK::send_text(gcs_severity severity, const char *str)
}
void
GCS_MAVLINK::send_text_P(gcs_severity severity, const prog_char_t *str)
GCS_MAVLINK::send_text_P(uint8_t severity, const prog_char_t *str)
{
mavlink_statustext_t m;
uint8_t i;