This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_mav_send_msg

Function Documentation

Sends any user-packed mavlink message.

To construct your own mavlink_message_t from the packet definitions in include/rc/mavlink/common/, follow this example snippet and substitute in the functions for packing the packet you wish to send. rc/mavlink_udp_helpers.h provides many helper functions to pack and send the most common mavlink packets so that you do not need to use this function always.

mavlink_message_t msg;
mavlink_msg_heartbeat_pack(system_id, MAV_COMP_ID_ALL, &msg, 0, 0, 0, 0, 0);
rc_mav_send_msg(msg)){
Parameters

msg[in] The message to be sent

Returns

0 on success, -1 on failure