* @brief Pack a change_operator_control message on a channel and send
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System the GCS requests control for
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
* @param version 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
* @param passkey Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
put_uint8_t_by_index(msg,0,target_system);// System the GCS requests control for
put_uint8_t_by_index(msg,1,control_request);// 0: request control of this MAV, 1: Release control of this MAV
put_uint8_t_by_index(msg,2,version);// 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
put_char_array_by_index(msg,3,passkey,25);// Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
put_uint8_t_by_index(msg,0,target_system);// System the GCS requests control for
put_uint8_t_by_index(msg,1,control_request);// 0: request control of this MAV, 1: Release control of this MAV
put_uint8_t_by_index(msg,2,version);// 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
put_char_array_by_index(msg,3,passkey,25);// Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"