Browse Source

GCS_MAVLink: added severity to send_statustext_all()

mission-4.1.18
Andrew Tridgell 10 years ago
parent
commit
bc4d37c91e
  1. 2
      libraries/GCS_MAVLink/GCS.h
  2. 4
      libraries/GCS_MAVLink/GCS_Common.cpp

2
libraries/GCS_MAVLink/GCS.h

@ -163,7 +163,7 @@ public: @@ -163,7 +163,7 @@ public:
connections. This function is static so it can be called from
any library
*/
static void send_statustext_all(const prog_char_t *fmt, ...);
static void send_statustext_all(MAV_SEVERITY severity, const prog_char_t *fmt, ...);
/*
send a MAVLink message to all components with this vehicle's system id

4
libraries/GCS_MAVLink/GCS_Common.cpp

@ -1169,7 +1169,7 @@ void GCS_MAVLINK::send_ahrs(AP_AHRS &ahrs) @@ -1169,7 +1169,7 @@ void GCS_MAVLINK::send_ahrs(AP_AHRS &ahrs)
/*
send a statustext message to all active MAVLink connections
*/
void GCS_MAVLINK::send_statustext_all(const prog_char_t *fmt, ...)
void GCS_MAVLINK::send_statustext_all(MAV_SEVERITY severity, const prog_char_t *fmt, ...)
{
for (uint8_t i=0; i<MAVLINK_COMM_NUM_BUFFERS; i++) {
if ((1U<<i) & mavlink_active) {
@ -1181,7 +1181,7 @@ void GCS_MAVLINK::send_statustext_all(const prog_char_t *fmt, ...) @@ -1181,7 +1181,7 @@ void GCS_MAVLINK::send_statustext_all(const prog_char_t *fmt, ...)
hal.util->vsnprintf_P((char *)msg2, sizeof(msg2), fmt, arg_list);
va_end(arg_list);
mavlink_msg_statustext_send(chan,
MAV_SEVERITY_CRITICAL,
severity,
msg2);
}
}

Loading…
Cancel
Save