mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-05 13:14:03 -04:00
GCS_MAVLink: eliminate GCS_MAVLINK::send_statustext_all
This commit is contained in:
parent
f6a09d0657
commit
a599bc9031
@ -182,10 +182,9 @@ public:
|
||||
static uint8_t streaming_channel_mask(void) { return chan_is_streaming; }
|
||||
|
||||
/*
|
||||
send a statustext message to active MAVLink connections, or a specific
|
||||
one. This function is static so it can be called from any library.
|
||||
send a statustext message to specific MAVLINK Connection
|
||||
This function is static so it can be called from any library.
|
||||
*/
|
||||
static void send_statustext_all(MAV_SEVERITY severity, const char *fmt, ...);
|
||||
static void send_statustext_chan(MAV_SEVERITY severity, uint8_t dest_chan, const char *fmt, ...);
|
||||
|
||||
// send a PARAM_VALUE message to all active MAVLink connections.
|
||||
|
@ -1141,20 +1141,6 @@ void GCS_MAVLINK::send_ahrs(AP_AHRS &ahrs)
|
||||
ahrs.get_error_yaw());
|
||||
}
|
||||
|
||||
/*
|
||||
send a statustext message to all active MAVLink connections
|
||||
*/
|
||||
void GCS_MAVLINK::send_statustext_all(MAV_SEVERITY severity, const char *fmt, ...)
|
||||
{
|
||||
char text[MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN+1] {};
|
||||
va_list arg_list;
|
||||
va_start(arg_list, fmt);
|
||||
hal.util->vsnprintf((char *)text, sizeof(text)-1, fmt, arg_list);
|
||||
va_end(arg_list);
|
||||
text[MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN] = 0;
|
||||
gcs().send_statustext(severity, mavlink_active | chan_is_streaming, text);
|
||||
}
|
||||
|
||||
/*
|
||||
send a statustext message to specific MAVLink channel, zero indexed
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user