Info on play_tune and led_control on pixhawk2

I couldn’t find much code that involves sending mavlink_led_control_t and mavlink_msg_play_tune_t messages and the comments / documentation on both isn’t too helpful.

I would like to know more about the message format, in particular, what to put in the following fields…

char tune[30]; /*< tune in board specific format*/

for mavlink_msg_play_tune

uint8_t instance; /*< Instance (LED instance to control or 255 for all LEDs)*/
uint8_t pattern; /*< Pattern (see LED_PATTERN_ENUM)*/
uint8_t custom_len; /*< Custom Byte Length*/
uint8_t custom_bytes[24]; /*< Custom Bytes*/`

for mavlink_msg_led_control

Additionally, what is the proper way of triggering a tune play or led change outside AP_Notify (e.g. say I wanted to play a certain tune and flash some LEDs whenever a particular message is received, should I call AP_Notify::handle_play_tune(&my_tune_msg);? )

EDIT: clarify question asked

https://github.com/ardupilot/ardupilot/blob/master/libraries/GCS_MAVLink/GCS_Common.cpp#L2343

GCS_MAVLINK_Copter is the wrong place for a generic message like you
describe - that’s why we have GCS_MAVLINK :slight_smile:

Apologies for the unclear question… edited for clarification, thanks!