Function rc_mav_send_msg#
Defined in File mavlink_udp.h
Function Documentation#
-
int rc_mav_send_msg(mavlink_message_t msg)#
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