Function rc_mav_init¶
Defined in File mavlink_udp.h
Function Documentation¶
-
int rc_mav_init(uint8_t system_id, const char *dest_ip, uint16_t port, uint64_t connection_timeout_us)¶
Initialize a UDP port for sending and receiving.
Initialize a UDP port for sending and receiving. Additionally starts a listening thread that handles incomming packets and makes them available with the remaining functions in this API.
- Parameters
system_id – [in] The system id of this device tagged in outgoing packets
dest_ip – [in] The destination ip, can be changed later with rc_mav_set_dest_ip
port – [in] Port to listen on and send to
connection_timeout_us – [in] microseconds since last received packet to consider connection lost, after which point rc_mav_connection_state will change to MAV_CONNECTION_LOST and the connection-lost callback will be called if set. Should be >=200000
- Returns
0 on success, -1 on failure