Commit 78f9ea18 authored by PX4BuildBot's avatar PX4BuildBot

autogenerated headers for rev...

autogenerated headers for rev https://github.com/mavlink/mavlink/tree/d397e0a518b55b2cfcd33c23b6296c4db0ba94b0
parent 6bcdf8bc
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:54 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:33 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -16,15 +16,15 @@ extern "C" {
// MESSAGE LENGTHS AND CRCS
#ifndef MAVLINK_MESSAGE_LENGTHS
#define MAVLINK_MESSAGE_LENGTHS {9, 31, 12, 0, 14, 28, 3, 32, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 25, 23, 30, 101, 22, 26, 16, 14, 28, 32, 28, 28, 22, 22, 21, 6, 6, 37, 4, 4, 2, 2, 4, 2, 2, 3, 13, 12, 37, 0, 0, 0, 27, 25, 0, 0, 0, 0, 0, 68, 26, 185, 229, 42, 6, 4, 0, 11, 18, 0, 0, 37, 20, 35, 33, 3, 0, 0, 0, 22, 39, 37, 53, 51, 53, 51, 0, 28, 56, 42, 33, 0, 0, 0, 0, 0, 0, 0, 26, 32, 32, 20, 32, 62, 44, 64, 84, 9, 254, 16, 12, 36, 44, 64, 22, 6, 14, 12, 97, 2, 2, 113, 35, 6, 79, 35, 35, 22, 13, 255, 14, 18, 43, 8, 22, 14, 36, 43, 41, 32, 243, 14, 0, 0, 100, 36, 60, 30, 42, 8, 4, 12, 15, 13, 6, 15, 14, 0, 12, 3, 8, 28, 44, 3, 9, 22, 12, 18, 34, 66, 98, 8, 48, 19, 3, 20, 24, 29, 45, 4, 40, 2, 206, 7, 29, 0, 0, 0, 0, 27, 44, 22, 25, 0, 0, 0, 0, 0, 42, 14, 2, 3, 2, 1, 33, 1, 6, 2, 4, 0, 0, 0, 0, 2, 2, 5, 6, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 52, 53, 6, 2, 38, 0, 254, 36, 30, 18, 18, 51, 9, 0}
#define MAVLINK_MESSAGE_LENGTHS {9, 31, 12, 0, 14, 28, 3, 32, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 25, 23, 30, 101, 22, 26, 16, 14, 28, 32, 28, 28, 22, 22, 21, 6, 6, 37, 4, 4, 2, 2, 4, 2, 2, 3, 13, 12, 37, 0, 0, 0, 27, 25, 0, 0, 0, 0, 0, 68, 26, 185, 229, 42, 6, 4, 0, 11, 18, 0, 0, 37, 20, 35, 33, 3, 0, 0, 0, 22, 39, 37, 53, 51, 53, 51, 0, 28, 56, 42, 33, 0, 0, 0, 0, 0, 0, 0, 26, 32, 32, 20, 32, 62, 44, 64, 84, 9, 254, 16, 12, 36, 44, 64, 22, 6, 14, 12, 97, 2, 2, 113, 35, 6, 79, 35, 35, 22, 13, 255, 14, 18, 43, 8, 22, 14, 36, 43, 41, 32, 243, 14, 0, 0, 100, 36, 60, 30, 42, 8, 4, 12, 15, 13, 6, 15, 14, 0, 12, 3, 8, 28, 44, 3, 9, 22, 12, 18, 34, 66, 98, 8, 48, 19, 3, 20, 24, 29, 45, 4, 40, 2, 206, 7, 29, 0, 0, 0, 0, 27, 44, 22, 25, 0, 0, 0, 0, 0, 42, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 3, 3, 6, 7, 2, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 52, 53, 6, 2, 38, 0, 254, 36, 30, 18, 18, 51, 9, 0}
#endif
#ifndef MAVLINK_MESSAGE_CRCS
#define MAVLINK_MESSAGE_CRCS {50, 124, 137, 0, 237, 217, 104, 119, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 214, 159, 220, 168, 24, 23, 170, 144, 67, 115, 39, 246, 185, 104, 237, 244, 222, 212, 9, 254, 230, 28, 28, 132, 221, 232, 11, 153, 41, 39, 78, 0, 0, 0, 15, 3, 0, 0, 0, 0, 0, 153, 183, 51, 59, 118, 148, 21, 0, 243, 124, 0, 0, 38, 20, 158, 152, 143, 0, 0, 0, 106, 49, 22, 143, 140, 5, 150, 0, 231, 183, 63, 54, 0, 0, 0, 0, 0, 0, 0, 175, 102, 158, 208, 56, 93, 138, 108, 32, 185, 84, 34, 174, 124, 237, 4, 76, 128, 56, 116, 134, 237, 203, 250, 87, 203, 220, 25, 226, 46, 29, 223, 85, 6, 229, 203, 1, 195, 109, 168, 181, 47, 72, 131, 0, 0, 103, 154, 178, 200, 134, 219, 208, 188, 84, 22, 19, 21, 134, 0, 78, 68, 189, 127, 154, 21, 21, 144, 1, 234, 73, 181, 22, 83, 167, 138, 234, 240, 47, 189, 52, 174, 229, 85, 159, 186, 72, 0, 0, 0, 0, 92, 36, 71, 98, 0, 0, 0, 0, 0, 134, 205, 94, 128, 54, 63, 112, 201, 221, 226, 238, 0, 0, 0, 0, 241, 155, 43, 149, 0, 0, 0, 0, 0, 0, 0, 207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 104, 85, 95, 130, 158, 0, 8, 204, 49, 170, 44, 83, 46, 0}
#define MAVLINK_MESSAGE_CRCS {50, 124, 137, 0, 237, 217, 104, 119, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 214, 159, 220, 168, 24, 23, 170, 144, 67, 115, 39, 246, 185, 104, 237, 244, 222, 212, 9, 254, 230, 28, 28, 132, 221, 232, 11, 153, 41, 39, 78, 0, 0, 0, 15, 3, 0, 0, 0, 0, 0, 153, 183, 51, 59, 118, 148, 21, 0, 243, 124, 0, 0, 38, 20, 158, 152, 143, 0, 0, 0, 106, 49, 22, 143, 140, 5, 150, 0, 231, 183, 63, 54, 0, 0, 0, 0, 0, 0, 0, 175, 102, 158, 208, 56, 93, 138, 108, 32, 185, 84, 34, 174, 124, 237, 4, 76, 128, 56, 116, 134, 237, 203, 250, 87, 203, 220, 25, 226, 46, 29, 223, 85, 6, 229, 203, 1, 195, 109, 168, 181, 47, 72, 131, 0, 0, 103, 154, 178, 200, 134, 219, 208, 188, 84, 22, 19, 21, 134, 0, 78, 68, 189, 127, 154, 21, 21, 144, 1, 234, 73, 181, 22, 83, 167, 138, 234, 240, 47, 189, 52, 174, 229, 85, 159, 186, 72, 0, 0, 0, 0, 92, 36, 71, 98, 0, 0, 0, 0, 0, 134, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 101, 50, 202, 17, 162, 0, 0, 0, 0, 0, 0, 207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 104, 85, 95, 130, 158, 0, 8, 204, 49, 170, 44, 83, 46, 0}
#endif
#ifndef MAVLINK_MESSAGE_INFO
#define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_SET_MODE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS, MAVLINK_MESSAGE_INFO_SET_MAG_OFFSETS, MAVLINK_MESSAGE_INFO_MEMINFO, MAVLINK_MESSAGE_INFO_AP_ADC, MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE, MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE, MAVLINK_MESSAGE_INFO_MOUNT_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_STATUS, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_FENCE_POINT, MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_AHRS, MAVLINK_MESSAGE_INFO_SIMSTATE, MAVLINK_MESSAGE_INFO_HWSTATUS, MAVLINK_MESSAGE_INFO_RADIO, MAVLINK_MESSAGE_INFO_LIMITS_STATUS, MAVLINK_MESSAGE_INFO_WIND, MAVLINK_MESSAGE_INFO_DATA16, MAVLINK_MESSAGE_INFO_DATA32, MAVLINK_MESSAGE_INFO_DATA64, MAVLINK_MESSAGE_INFO_DATA96, MAVLINK_MESSAGE_INFO_RANGEFINDER, MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL, MAVLINK_MESSAGE_INFO_RALLY_POINT, MAVLINK_MESSAGE_INFO_RALLY_FETCH_POINT, MAVLINK_MESSAGE_INFO_COMPASSMOT_STATUS, MAVLINK_MESSAGE_INFO_AHRS2, MAVLINK_MESSAGE_INFO_CAMERA_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK, MAVLINK_MESSAGE_INFO_BATTERY2, MAVLINK_MESSAGE_INFO_AHRS3, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION_REQUEST, MAVLINK_MESSAGE_INFO_REMOTE_LOG_DATA_BLOCK, MAVLINK_MESSAGE_INFO_REMOTE_LOG_BLOCK_STATUS, MAVLINK_MESSAGE_INFO_LED_CONTROL, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, MAVLINK_MESSAGE_INFO_PID_TUNING, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT, MAVLINK_MESSAGE_INFO_GIMBAL_CONTROL, MAVLINK_MESSAGE_INFO_GIMBAL_RESET, MAVLINK_MESSAGE_INFO_GIMBAL_AXIS_CALIBRATION_PROGRESS, MAVLINK_MESSAGE_INFO_GIMBAL_SET_HOME_OFFSETS, MAVLINK_MESSAGE_INFO_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, MAVLINK_MESSAGE_INFO_GIMBAL_SET_FACTORY_PARAMETERS, MAVLINK_MESSAGE_INFO_GIMBAL_FACTORY_PARAMETERS_LOADED, MAVLINK_MESSAGE_INFO_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, MAVLINK_MESSAGE_INFO_GIMBAL_PERFORM_FACTORY_TESTS, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_GOPRO_POWER_ON, MAVLINK_MESSAGE_INFO_GOPRO_POWER_OFF, MAVLINK_MESSAGE_INFO_GOPRO_COMMAND, MAVLINK_MESSAGE_INFO_GOPRO_RESPONSE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_RPM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}}
#define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_SET_MODE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS, MAVLINK_MESSAGE_INFO_SET_MAG_OFFSETS, MAVLINK_MESSAGE_INFO_MEMINFO, MAVLINK_MESSAGE_INFO_AP_ADC, MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE, MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE, MAVLINK_MESSAGE_INFO_MOUNT_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_STATUS, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_FENCE_POINT, MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_AHRS, MAVLINK_MESSAGE_INFO_SIMSTATE, MAVLINK_MESSAGE_INFO_HWSTATUS, MAVLINK_MESSAGE_INFO_RADIO, MAVLINK_MESSAGE_INFO_LIMITS_STATUS, MAVLINK_MESSAGE_INFO_WIND, MAVLINK_MESSAGE_INFO_DATA16, MAVLINK_MESSAGE_INFO_DATA32, MAVLINK_MESSAGE_INFO_DATA64, MAVLINK_MESSAGE_INFO_DATA96, MAVLINK_MESSAGE_INFO_RANGEFINDER, MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL, MAVLINK_MESSAGE_INFO_RALLY_POINT, MAVLINK_MESSAGE_INFO_RALLY_FETCH_POINT, MAVLINK_MESSAGE_INFO_COMPASSMOT_STATUS, MAVLINK_MESSAGE_INFO_AHRS2, MAVLINK_MESSAGE_INFO_CAMERA_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK, MAVLINK_MESSAGE_INFO_BATTERY2, MAVLINK_MESSAGE_INFO_AHRS3, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION_REQUEST, MAVLINK_MESSAGE_INFO_REMOTE_LOG_DATA_BLOCK, MAVLINK_MESSAGE_INFO_REMOTE_LOG_BLOCK_STATUS, MAVLINK_MESSAGE_INFO_LED_CONTROL, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, MAVLINK_MESSAGE_INFO_PID_TUNING, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT, MAVLINK_MESSAGE_INFO_GIMBAL_CONTROL, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_GIMBAL_TORQUE_CMD_REPORT, MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT, MAVLINK_MESSAGE_INFO_GOPRO_GET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE, MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_RPM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}}
#endif
#include "../protocol.h"
......@@ -116,11 +116,20 @@ typedef enum MAV_CMD
MAV_CMD_DO_VTOL_TRANSITION=3000, /* Request VTOL transition |The target VTOL state, as defined by ENUM MAV_VTOL_STATE. Only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| */
MAV_CMD_PAYLOAD_PREPARE_DEPLOY=30001, /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in degrees compass heading (0..360). A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overriden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position in meters. A negative value indicates the system can define the clearance at will.| Latitude unscaled for MISSION_ITEM or in 1e7 degrees for MISSION_ITEM_INT| Longitude unscaled for MISSION_ITEM or in 1e7 degrees for MISSION_ITEM_INT| Altitude, in meters AMSL| */
MAV_CMD_PAYLOAD_CONTROL_DEPLOY=30002, /* Control the payload deployment. |Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deploment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */
MAV_CMD_DO_START_MAG_CAL=42424, /* Initiate a magnetometer calibration |uint8_t bitmask of magnetometers (0 means all)| Automatically retry on failure (0=no retry, 1=retry).| Save without user input (0=require input, 1=autosave).| Delay (seconds)| Empty| Empty| Empty| */
MAV_CMD_POWER_OFF_INITIATED=42000, /* A system wide power-off event has been initiated. |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_SOLO_BTN_FLY_CLICK=42001, /* FLY button has been clicked. |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_SOLO_BTN_FLY_HOLD=42002, /* FLY button has been held for 1.5 seconds. |Takeoff altitude| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_SOLO_BTN_PAUSE_CLICK=42003, /* PAUSE button has been clicked. |1 if Solo is in a shot mode, 0 otherwise| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_START_MAG_CAL=42424, /* Initiate a magnetometer calibration |uint8_t bitmask of magnetometers (0 means all)| Automatically retry on failure (0=no retry, 1=retry).| Save without user input (0=require input, 1=autosave).| Delay (seconds)| Autoreboot (0=user reboot, 1=autoreboot)| Empty| Empty| */
MAV_CMD_DO_ACCEPT_MAG_CAL=42425, /* Initiate a magnetometer calibration |uint8_t bitmask of magnetometers (0 means all)| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_CANCEL_MAG_CAL=42426, /* Cancel a running magnetometer calibration |uint8_t bitmask of magnetometers (0 means all)| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_SET_FACTORY_TEST_MODE=42427, /* Command autopilot to get into factory test/diagnostic mode |0 means get out of test mode, 1 means get into test mode| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_DO_SEND_BANNER=42428, /* Reply with the version banner |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_ENUM_END=42429, /* | */
MAV_CMD_GIMBAL_RESET=42501, /* Causes the gimbal to reset and boot as if it was just powered on |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_GIMBAL_AXIS_CALIBRATION_STATUS=42502, /* Reports progress and success or failure of gimbal axis calibration procedure |Gimbal axis we're reporting calibration progress for| Current calibration progress for this axis, 0x64=100%| Status of the calibration| Empty| Empty| Empty| Empty| */
MAV_CMD_GIMBAL_REQUEST_AXIS_CALIBRATION=42503, /* Starts commutation calibration on the gimbal |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
MAV_CMD_GIMBAL_FULL_RESET=42505, /* Erases gimbal application and parameters |Magic number| Magic number| Magic number| Magic number| Magic number| Magic number| Magic number| */
MAV_CMD_ENUM_END=42506, /* | */
} MAV_CMD;
#endif
......@@ -129,12 +138,12 @@ typedef enum MAV_CMD
#define HAVE_ENUM_LIMITS_STATE
typedef enum LIMITS_STATE
{
LIMITS_INIT=0, /* pre-initialization | */
LIMITS_DISABLED=1, /* disabled | */
LIMITS_ENABLED=2, /* checking limits | */
LIMITS_TRIGGERED=3, /* a limit has been breached | */
LIMITS_RECOVERING=4, /* taking action eg. RTL | */
LIMITS_RECOVERED=5, /* we're no longer in breach of a limit | */
LIMITS_INIT=0, /* pre-initialization | */
LIMITS_DISABLED=1, /* disabled | */
LIMITS_ENABLED=2, /* checking limits | */
LIMITS_TRIGGERED=3, /* a limit has been breached | */
LIMITS_RECOVERING=4, /* taking action eg. RTL | */
LIMITS_RECOVERED=5, /* we're no longer in breach of a limit | */
LIMITS_STATE_ENUM_END=6, /* | */
} LIMITS_STATE;
#endif
......@@ -144,9 +153,9 @@ typedef enum LIMITS_STATE
#define HAVE_ENUM_LIMIT_MODULE
typedef enum LIMIT_MODULE
{
LIMIT_GPSLOCK=1, /* pre-initialization | */
LIMIT_GEOFENCE=2, /* disabled | */
LIMIT_ALTITUDE=4, /* checking limits | */
LIMIT_GPSLOCK=1, /* pre-initialization | */
LIMIT_GEOFENCE=2, /* disabled | */
LIMIT_ALTITUDE=4, /* checking limits | */
LIMIT_MODULE_ENUM_END=5, /* | */
} LIMIT_MODULE;
#endif
......@@ -156,8 +165,8 @@ typedef enum LIMIT_MODULE
#define HAVE_ENUM_RALLY_FLAGS
typedef enum RALLY_FLAGS
{
FAVORABLE_WIND=1, /* Flag set when requiring favorable winds for landing. | */
LAND_IMMEDIATELY=2, /* Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land. | */
FAVORABLE_WIND=1, /* Flag set when requiring favorable winds for landing. | */
LAND_IMMEDIATELY=2, /* Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land. | */
RALLY_FLAGS_ENUM_END=3, /* | */
} RALLY_FLAGS;
#endif
......@@ -238,7 +247,7 @@ typedef enum MAV_MODE_GIMBAL
MAV_MODE_GIMBAL_CALIBRATING_YAW=3, /* Gimbal is currently running calibration on the yaw axis | */
MAV_MODE_GIMBAL_INITIALIZED=4, /* Gimbal has finished calibrating and initializing, but is relaxed pending reception of first rate command from copter | */
MAV_MODE_GIMBAL_ACTIVE=5, /* Gimbal is actively stabilizing | */
MAV_MODE_GIMBAL_RATE_CMD_TIMEOUT=6, /* Gimbal is relaxed because it missed more than 10 expected rate command messages in a row. Gimbal will move back to active mode when it receives a new rate command | */
MAV_MODE_GIMBAL_RATE_CMD_TIMEOUT=6, /* Gimbal is relaxed because it missed more than 10 expected rate command messages in a row. Gimbal will move back to active mode when it receives a new rate command | */
MAV_MODE_GIMBAL_ENUM_END=7, /* | */
} MAV_MODE_GIMBAL;
#endif
......@@ -268,34 +277,298 @@ typedef enum GIMBAL_AXIS_CALIBRATION_STATUS
#endif
/** @brief */
#ifndef HAVE_ENUM_FACTORY_TEST
#define HAVE_ENUM_FACTORY_TEST
typedef enum FACTORY_TEST
#ifndef HAVE_ENUM_GIMBAL_AXIS_CALIBRATION_REQUIRED
#define HAVE_ENUM_GIMBAL_AXIS_CALIBRATION_REQUIRED
typedef enum GIMBAL_AXIS_CALIBRATION_REQUIRED
{
FACTORY_TEST_AXIS_RANGE_LIMITS=0, /* Tests to make sure each axis can move to its mechanical limits | */
FACTORY_TEST_ENUM_END=1, /* | */
} FACTORY_TEST;
GIMBAL_AXIS_CALIBRATION_REQUIRED_UNKNOWN=0, /* Whether or not this axis requires calibration is unknown at this time | */
GIMBAL_AXIS_CALIBRATION_REQUIRED_TRUE=1, /* This axis requires calibration | */
GIMBAL_AXIS_CALIBRATION_REQUIRED_FALSE=2, /* This axis does not require calibration | */
GIMBAL_AXIS_CALIBRATION_REQUIRED_ENUM_END=3, /* | */
} GIMBAL_AXIS_CALIBRATION_REQUIRED;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_CMD_RESULT
#define HAVE_ENUM_GOPRO_CMD_RESULT
typedef enum GOPRO_CMD_RESULT
{
GOPRO_CMD_RESULT_UNKNOWN=0, /* The result of the command is unknown | */
GOPRO_CMD_RESULT_SUCCESSFUL=1, /* The command was successfully sent, and a response was successfully received | */
GOPRO_CMD_RESULT_SEND_CMD_START_TIMEOUT=2, /* Timed out waiting for the GoPro to acknowledge our request to send a command | */
GOPRO_CMD_RESULT_SEND_CMD_COMPLETE_TIMEOUT=3, /* Timed out waiting for the GoPro to read the command | */
GOPRO_CMD_RESULT_GET_RESPONSE_START_TIMEOUT=4, /* Timed out waiting for the GoPro to begin transmitting a response to the command | */
GOPRO_CMD_RESULT_GET_RESPONSE_COMPLETE_TIMEOUT=5, /* Timed out waiting for the GoPro to finish transmitting a response to the command | */
GOPRO_CMD_RESULT_GET_CMD_COMPLETE_TIMEOUT=6, /* Timed out waiting for the GoPro to finish transmitting its own command | */
GOPRO_CMD_RESULT_SEND_RESPONSE_START_TIMEOUT=7, /* Timed out waiting for the GoPro to start reading a response to its own command | */
GOPRO_CMD_RESULT_SEND_RESPONSE_COMPLETE_TIMEOUT=8, /* Timed out waiting for the GoPro to finish reading a response to its own command | */
GOPRO_CMD_RESULT_PREEMPTED=9, /* Command to the GoPro was preempted by the GoPro sending its own command | */
GOPRO_CMD_RECEIVED_DATA_OVERFLOW=10, /* More data than expected received in response to the command | */
GOPRO_CMD_RECEIVED_DATA_UNDERFLOW=11, /* Less data than expected received in response to the command | */
GOPRO_CMD_RESULT_ENUM_END=12, /* | */
} GOPRO_CMD_RESULT;
#ifndef HAVE_ENUM_GOPRO_HEARTBEAT_STATUS
#define HAVE_ENUM_GOPRO_HEARTBEAT_STATUS
typedef enum GOPRO_HEARTBEAT_STATUS
{
GOPRO_HEARTBEAT_STATUS_DISCONNECTED=0, /* No GoPro connected | */
GOPRO_HEARTBEAT_STATUS_INCOMPATIBLE=1, /* The detected GoPro is not HeroBus compatible | */
GOPRO_HEARTBEAT_STATUS_CONNECTED=2, /* A HeroBus compatible GoPro is connected | */
GOPRO_HEARTBEAT_STATUS_ERROR=3, /* An unrecoverable error was encountered with the connected GoPro, it may require a power cycle | */
GOPRO_HEARTBEAT_STATUS_ENUM_END=4, /* | */
} GOPRO_HEARTBEAT_STATUS;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_HEARTBEAT_FLAGS
#define HAVE_ENUM_GOPRO_HEARTBEAT_FLAGS
typedef enum GOPRO_HEARTBEAT_FLAGS
{
GOPRO_FLAG_RECORDING=1, /* GoPro is currently recording | */
GOPRO_HEARTBEAT_FLAGS_ENUM_END=2, /* | */
} GOPRO_HEARTBEAT_FLAGS;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_REQUEST_STATUS
#define HAVE_ENUM_GOPRO_REQUEST_STATUS
typedef enum GOPRO_REQUEST_STATUS
{
GOPRO_REQUEST_SUCCESS=0, /* The write message with ID indicated succeeded | */
GOPRO_REQUEST_FAILED=1, /* The write message with ID indicated failed | */
GOPRO_REQUEST_STATUS_ENUM_END=2, /* | */
} GOPRO_REQUEST_STATUS;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_COMMAND
#define HAVE_ENUM_GOPRO_COMMAND
typedef enum GOPRO_COMMAND
{
GOPRO_COMMAND_POWER=0, /* (Get/Set) | */
GOPRO_COMMAND_CAPTURE_MODE=1, /* (Get/Set) | */
GOPRO_COMMAND_SHUTTER=2, /* (___/Set) | */
GOPRO_COMMAND_BATTERY=3, /* (Get/___) | */
GOPRO_COMMAND_MODEL=4, /* (Get/___) | */
GOPRO_COMMAND_VIDEO_SETTINGS=5, /* (Get/Set) | */
GOPRO_COMMAND_LOW_LIGHT=6, /* (Get/Set) | */
GOPRO_COMMAND_PHOTO_RESOLUTION=7, /* (Get/Set) | */
GOPRO_COMMAND_PHOTO_BURST_RATE=8, /* (Get/Set) | */
GOPRO_COMMAND_PROTUNE=9, /* (Get/Set) | */
GOPRO_COMMAND_PROTUNE_WHITE_BALANCE=10, /* (Get/Set) Hero 3+ Only | */
GOPRO_COMMAND_PROTUNE_COLOUR=11, /* (Get/Set) Hero 3+ Only | */
GOPRO_COMMAND_PROTUNE_GAIN=12, /* (Get/Set) Hero 3+ Only | */
GOPRO_COMMAND_PROTUNE_SHARPNESS=13, /* (Get/Set) Hero 3+ Only | */
GOPRO_COMMAND_PROTUNE_EXPOSURE=14, /* (Get/Set) Hero 3+ Only | */
GOPRO_COMMAND_TIME=15, /* (Get/Set) | */
GOPRO_COMMAND_CHARGING=16, /* (Get/Set) | */
GOPRO_COMMAND_ENUM_END=17, /* | */
} GOPRO_COMMAND;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_CAPTURE_MODE
#define HAVE_ENUM_GOPRO_CAPTURE_MODE
typedef enum GOPRO_CAPTURE_MODE
{
GOPRO_CAPTURE_MODE_VIDEO=0, /* Video mode | */
GOPRO_CAPTURE_MODE_PHOTO=1, /* Photo mode | */
GOPRO_CAPTURE_MODE_BURST=2, /* Burst mode, hero 3+ only | */
GOPRO_CAPTURE_MODE_TIME_LAPSE=3, /* Time lapse mode, hero 3+ only | */
GOPRO_CAPTURE_MODE_MULTI_SHOT=4, /* Multi shot mode, hero 4 only | */
GOPRO_CAPTURE_MODE_PLAYBACK=5, /* Playback mode, hero 4 only, silver only except when LCD or HDMI is connected to black | */
GOPRO_CAPTURE_MODE_SETUP=6, /* Playback mode, hero 4 only | */
GOPRO_CAPTURE_MODE_UNKNOWN=255, /* Mode not yet known | */
GOPRO_CAPTURE_MODE_ENUM_END=256, /* | */
} GOPRO_CAPTURE_MODE;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_RESOLUTION
#define HAVE_ENUM_GOPRO_RESOLUTION
typedef enum GOPRO_RESOLUTION
{
GOPRO_RESOLUTION_480p=0, /* 848 x 480 (480p) | */
GOPRO_RESOLUTION_720p=1, /* 1280 x 720 (720p) | */
GOPRO_RESOLUTION_960p=2, /* 1280 x 960 (960p) | */
GOPRO_RESOLUTION_1080p=3, /* 1920 x 1080 (1080p) | */
GOPRO_RESOLUTION_1440p=4, /* 1920 x 1440 (1440p) | */
GOPRO_RESOLUTION_2_7k_17_9=5, /* 2704 x 1440 (2.7k-17:9) | */
GOPRO_RESOLUTION_2_7k_16_9=6, /* 2704 x 1524 (2.7k-16:9) | */
GOPRO_RESOLUTION_2_7k_4_3=7, /* 2704 x 2028 (2.7k-4:3) | */
GOPRO_RESOLUTION_4k_16_9=8, /* 3840 x 2160 (4k-16:9) | */
GOPRO_RESOLUTION_4k_17_9=9, /* 4096 x 2160 (4k-17:9) | */
GOPRO_RESOLUTION_720p_SUPERVIEW=10, /* 1280 x 720 (720p-SuperView) | */
GOPRO_RESOLUTION_1080p_SUPERVIEW=11, /* 1920 x 1080 (1080p-SuperView) | */
GOPRO_RESOLUTION_2_7k_SUPERVIEW=12, /* 2704 x 1520 (2.7k-SuperView) | */
GOPRO_RESOLUTION_4k_SUPERVIEW=13, /* 3840 x 2160 (4k-SuperView) | */
GOPRO_RESOLUTION_ENUM_END=14, /* | */
} GOPRO_RESOLUTION;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_FRAME_RATE
#define HAVE_ENUM_GOPRO_FRAME_RATE
typedef enum GOPRO_FRAME_RATE
{
GOPRO_FRAME_RATE_12=0, /* 12 FPS | */
GOPRO_FRAME_RATE_15=1, /* 15 FPS | */
GOPRO_FRAME_RATE_24=2, /* 24 FPS | */
GOPRO_FRAME_RATE_25=3, /* 25 FPS | */
GOPRO_FRAME_RATE_30=4, /* 30 FPS | */
GOPRO_FRAME_RATE_48=5, /* 48 FPS | */
GOPRO_FRAME_RATE_50=6, /* 50 FPS | */
GOPRO_FRAME_RATE_60=7, /* 60 FPS | */
GOPRO_FRAME_RATE_80=8, /* 80 FPS | */
GOPRO_FRAME_RATE_90=9, /* 90 FPS | */
GOPRO_FRAME_RATE_100=10, /* 100 FPS | */
GOPRO_FRAME_RATE_120=11, /* 120 FPS | */
GOPRO_FRAME_RATE_240=12, /* 240 FPS | */
GOPRO_FRAME_RATE_12_5=13, /* 12.5 FPS | */
GOPRO_FRAME_RATE_ENUM_END=14, /* | */
} GOPRO_FRAME_RATE;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_FIELD_OF_VIEW
#define HAVE_ENUM_GOPRO_FIELD_OF_VIEW
typedef enum GOPRO_FIELD_OF_VIEW
{
GOPRO_FIELD_OF_VIEW_WIDE=0, /* 0x00: Wide | */
GOPRO_FIELD_OF_VIEW_MEDIUM=1, /* 0x01: Medium | */
GOPRO_FIELD_OF_VIEW_NARROW=2, /* 0x02: Narrow | */
GOPRO_FIELD_OF_VIEW_ENUM_END=3, /* | */
} GOPRO_FIELD_OF_VIEW;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_VIDEO_SETTINGS_FLAGS
#define HAVE_ENUM_GOPRO_VIDEO_SETTINGS_FLAGS
typedef enum GOPRO_VIDEO_SETTINGS_FLAGS
{
GOPRO_VIDEO_SETTINGS_TV_MODE=1, /* 0=NTSC, 1=PAL | */
GOPRO_VIDEO_SETTINGS_FLAGS_ENUM_END=2, /* | */
} GOPRO_VIDEO_SETTINGS_FLAGS;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_PHOTO_RESOLUTION
#define HAVE_ENUM_GOPRO_PHOTO_RESOLUTION
typedef enum GOPRO_PHOTO_RESOLUTION
{
GOPRO_PHOTO_RESOLUTION_5MP_MEDIUM=0, /* 5MP Medium | */
GOPRO_PHOTO_RESOLUTION_7MP_MEDIUM=1, /* 7MP Medium | */
GOPRO_PHOTO_RESOLUTION_7MP_WIDE=2, /* 7MP Wide | */
GOPRO_PHOTO_RESOLUTION_10MP_WIDE=3, /* 10MP Wide | */
GOPRO_PHOTO_RESOLUTION_12MP_WIDE=4, /* 12MP Wide | */
GOPRO_PHOTO_RESOLUTION_ENUM_END=5, /* | */
} GOPRO_PHOTO_RESOLUTION;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_PROTUNE_WHITE_BALANCE
#define HAVE_ENUM_GOPRO_PROTUNE_WHITE_BALANCE
typedef enum GOPRO_PROTUNE_WHITE_BALANCE
{
GOPRO_PROTUNE_WHITE_BALANCE_AUTO=0, /* Auto | */
GOPRO_PROTUNE_WHITE_BALANCE_3000K=1, /* 3000K | */
GOPRO_PROTUNE_WHITE_BALANCE_5500K=2, /* 5500K | */
GOPRO_PROTUNE_WHITE_BALANCE_6500K=3, /* 6500K | */
GOPRO_PROTUNE_WHITE_BALANCE_RAW=4, /* Camera Raw | */
GOPRO_PROTUNE_WHITE_BALANCE_ENUM_END=5, /* | */
} GOPRO_PROTUNE_WHITE_BALANCE;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_PROTUNE_COLOUR
#define HAVE_ENUM_GOPRO_PROTUNE_COLOUR
typedef enum GOPRO_PROTUNE_COLOUR
{
GOPRO_PROTUNE_COLOUR_STANDARD=0, /* Auto | */
GOPRO_PROTUNE_COLOUR_NEUTRAL=1, /* Neutral | */
GOPRO_PROTUNE_COLOUR_ENUM_END=2, /* | */
} GOPRO_PROTUNE_COLOUR;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_PROTUNE_GAIN
#define HAVE_ENUM_GOPRO_PROTUNE_GAIN
typedef enum GOPRO_PROTUNE_GAIN
{
GOPRO_PROTUNE_GAIN_400=0, /* ISO 400 | */
GOPRO_PROTUNE_GAIN_800=1, /* ISO 800 (Only Hero 4) | */
GOPRO_PROTUNE_GAIN_1600=2, /* ISO 1600 | */
GOPRO_PROTUNE_GAIN_3200=3, /* ISO 3200 (Only Hero 4) | */
GOPRO_PROTUNE_GAIN_6400=4, /* ISO 6400 | */
GOPRO_PROTUNE_GAIN_ENUM_END=5, /* | */
} GOPRO_PROTUNE_GAIN;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_PROTUNE_SHARPNESS
#define HAVE_ENUM_GOPRO_PROTUNE_SHARPNESS
typedef enum GOPRO_PROTUNE_SHARPNESS
{
GOPRO_PROTUNE_SHARPNESS_LOW=0, /* Low Sharpness | */
GOPRO_PROTUNE_SHARPNESS_MEDIUM=1, /* Medium Sharpness | */
GOPRO_PROTUNE_SHARPNESS_HIGH=2, /* High Sharpness | */
GOPRO_PROTUNE_SHARPNESS_ENUM_END=3, /* | */
} GOPRO_PROTUNE_SHARPNESS;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_PROTUNE_EXPOSURE
#define HAVE_ENUM_GOPRO_PROTUNE_EXPOSURE
typedef enum GOPRO_PROTUNE_EXPOSURE
{
GOPRO_PROTUNE_EXPOSURE_NEG_5_0=0, /* -5.0 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_NEG_4_5=1, /* -4.5 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_NEG_4_0=2, /* -4.0 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_NEG_3_5=3, /* -3.5 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_NEG_3_0=4, /* -3.0 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_NEG_2_5=5, /* -2.5 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_NEG_2_0=6, /* -2.0 EV | */
GOPRO_PROTUNE_EXPOSURE_NEG_1_5=7, /* -1.5 EV | */
GOPRO_PROTUNE_EXPOSURE_NEG_1_0=8, /* -1.0 EV | */
GOPRO_PROTUNE_EXPOSURE_NEG_0_5=9, /* -0.5 EV | */
GOPRO_PROTUNE_EXPOSURE_ZERO=10, /* 0.0 EV | */
GOPRO_PROTUNE_EXPOSURE_POS_0_5=11, /* +0.5 EV | */
GOPRO_PROTUNE_EXPOSURE_POS_1_0=12, /* +1.0 EV | */
GOPRO_PROTUNE_EXPOSURE_POS_1_5=13, /* +1.5 EV | */
GOPRO_PROTUNE_EXPOSURE_POS_2_0=14, /* +2.0 EV | */
GOPRO_PROTUNE_EXPOSURE_POS_2_5=15, /* +2.5 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_POS_3_0=16, /* +3.0 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_POS_3_5=17, /* +3.5 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_POS_4_0=18, /* +4.0 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_POS_4_5=19, /* +4.5 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_POS_5_0=20, /* +5.0 EV (Hero 3+ Only) | */
GOPRO_PROTUNE_EXPOSURE_ENUM_END=21, /* | */
} GOPRO_PROTUNE_EXPOSURE;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_CHARGING
#define HAVE_ENUM_GOPRO_CHARGING
typedef enum GOPRO_CHARGING
{
GOPRO_CHARGING_DISABLED=0, /* Charging disabled | */
GOPRO_CHARGING_ENABLED=1, /* Charging enabled | */
GOPRO_CHARGING_ENUM_END=2, /* | */
} GOPRO_CHARGING;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_MODEL
#define HAVE_ENUM_GOPRO_MODEL
typedef enum GOPRO_MODEL
{
GOPRO_MODEL_UNKNOWN=0, /* Unknown gopro model | */
GOPRO_MODEL_HERO_3_PLUS_SILVER=1, /* Hero 3+ Silver (HeroBus not supported by GoPro) | */
GOPRO_MODEL_HERO_3_PLUS_BLACK=2, /* Hero 3+ Black | */
GOPRO_MODEL_HERO_4_SILVER=3, /* Hero 4 Silver | */
GOPRO_MODEL_HERO_4_BLACK=4, /* Hero 4 Black | */
GOPRO_MODEL_ENUM_END=5, /* | */
} GOPRO_MODEL;
#endif
/** @brief */
#ifndef HAVE_ENUM_GOPRO_BURST_RATE
#define HAVE_ENUM_GOPRO_BURST_RATE
typedef enum GOPRO_BURST_RATE
{
GOPRO_BURST_RATE_3_IN_1_SECOND=0, /* 3 Shots / 1 Second | */
GOPRO_BURST_RATE_5_IN_1_SECOND=1, /* 5 Shots / 1 Second | */
GOPRO_BURST_RATE_10_IN_1_SECOND=2, /* 10 Shots / 1 Second | */
GOPRO_BURST_RATE_10_IN_2_SECOND=3, /* 10 Shots / 2 Second | */
GOPRO_BURST_RATE_10_IN_3_SECOND=4, /* 10 Shots / 3 Second (Hero 4 Only) | */
GOPRO_BURST_RATE_30_IN_1_SECOND=5, /* 30 Shots / 1 Second | */
GOPRO_BURST_RATE_30_IN_2_SECOND=6, /* 30 Shots / 2 Second | */
GOPRO_BURST_RATE_30_IN_3_SECOND=7, /* 30 Shots / 3 Second | */
GOPRO_BURST_RATE_30_IN_6_SECOND=8, /* 30 Shots / 6 Second | */
GOPRO_BURST_RATE_ENUM_END=9, /* | */
} GOPRO_BURST_RATE;
#endif
/** @brief */
......@@ -329,6 +602,20 @@ typedef enum EKF_STATUS_FLAGS
} EKF_STATUS_FLAGS;
#endif
/** @brief */
#ifndef HAVE_ENUM_PID_TUNING_AXIS
#define HAVE_ENUM_PID_TUNING_AXIS
typedef enum PID_TUNING_AXIS
{
PID_TUNING_ROLL=1, /* | */
PID_TUNING_PITCH=2, /* | */
PID_TUNING_YAW=3, /* | */
PID_TUNING_ACCZ=4, /* | */
PID_TUNING_STEER=5, /* | */
PID_TUNING_AXIS_ENUM_END=6, /* | */
} PID_TUNING_AXIS;
#endif
/** @brief */
#ifndef HAVE_ENUM_MAG_CAL_STATUS
#define HAVE_ENUM_MAG_CAL_STATUS
......@@ -366,20 +653,6 @@ typedef enum MAV_REMOTE_LOG_DATA_BLOCK_STATUSES
} MAV_REMOTE_LOG_DATA_BLOCK_STATUSES;
#endif
/** @brief */
#ifndef HAVE_ENUM_PID_TUNING_AXIS
#define HAVE_ENUM_PID_TUNING_AXIS
typedef enum PID_TUNING_AXIS
{
PID_TUNING_ROLL=1, /* | */
PID_TUNING_PITCH=2, /* | */
PID_TUNING_YAW=3, /* | */
PID_TUNING_ACCZ=4, /* | */
PID_TUNING_STEER=5, /* | */
PID_TUNING_AXIS_ENUM_END=6, /* | */
} PID_TUNING_AXIS;
#endif
#include "../common/common.h"
// MAVLINK VERSION
......@@ -436,19 +709,12 @@ typedef enum PID_TUNING_AXIS
#include "./mavlink_msg_pid_tuning.h"
#include "./mavlink_msg_gimbal_report.h"
#include "./mavlink_msg_gimbal_control.h"
#include "./mavlink_msg_gimbal_reset.h"
#include "./mavlink_msg_gimbal_axis_calibration_progress.h"
#include "./mavlink_msg_gimbal_set_home_offsets.h"
#include "./mavlink_msg_gimbal_home_offset_calibration_result.h"
#include "./mavlink_msg_gimbal_set_factory_parameters.h"
#include "./mavlink_msg_gimbal_factory_parameters_loaded.h"
#include "./mavlink_msg_gimbal_erase_firmware_and_config.h"
#include "./mavlink_msg_gimbal_perform_factory_tests.h"
#include "./mavlink_msg_gimbal_report_factory_tests_progress.h"
#include "./mavlink_msg_gopro_power_on.h"
#include "./mavlink_msg_gopro_power_off.h"
#include "./mavlink_msg_gopro_command.h"
#include "./mavlink_msg_gopro_response.h"
#include "./mavlink_msg_gimbal_torque_cmd_report.h"
#include "./mavlink_msg_gopro_heartbeat.h"
#include "./mavlink_msg_gopro_get_request.h"
#include "./mavlink_msg_gopro_get_response.h"
#include "./mavlink_msg_gopro_set_request.h"
#include "./mavlink_msg_gopro_set_response.h"
#include "./mavlink_msg_rpm.h"
#ifdef __cplusplus
......
// MESSAGE GIMBAL_AXIS_CALIBRATION_PROGRESS PACKING
#define MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS 203
typedef struct __mavlink_gimbal_axis_calibration_progress_t
{
uint8_t calibration_axis; /*< Which gimbal axis we're reporting calibration progress for*/
uint8_t calibration_progress; /*< The current calibration progress for this axis, 0x64=100%*/
uint8_t calibration_status; /*< The status of the running calibration*/
} mavlink_gimbal_axis_calibration_progress_t;
#define MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN 3
#define MAVLINK_MSG_ID_203_LEN 3
#define MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC 128
#define MAVLINK_MSG_ID_203_CRC 128
#define MAVLINK_MESSAGE_INFO_GIMBAL_AXIS_CALIBRATION_PROGRESS { \
"GIMBAL_AXIS_CALIBRATION_PROGRESS", \
3, \
{ { "calibration_axis", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_axis_calibration_progress_t, calibration_axis) }, \
{ "calibration_progress", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_axis_calibration_progress_t, calibration_progress) }, \
{ "calibration_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gimbal_axis_calibration_progress_t, calibration_status) }, \
} \
}
/**
* @brief Pack a gimbal_axis_calibration_progress message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param calibration_axis Which gimbal axis we're reporting calibration progress for
* @param calibration_progress The current calibration progress for this axis, 0x64=100%
* @param calibration_status The status of the running calibration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_axis_calibration_progress_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t calibration_axis, uint8_t calibration_progress, uint8_t calibration_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, calibration_axis);
_mav_put_uint8_t(buf, 1, calibration_progress);
_mav_put_uint8_t(buf, 2, calibration_status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#else
mavlink_gimbal_axis_calibration_progress_t packet;
packet.calibration_axis = calibration_axis;
packet.calibration_progress = calibration_progress;
packet.calibration_status = calibration_status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
}
/**
* @brief Pack a gimbal_axis_calibration_progress message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param calibration_axis Which gimbal axis we're reporting calibration progress for
* @param calibration_progress The current calibration progress for this axis, 0x64=100%
* @param calibration_status The status of the running calibration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_axis_calibration_progress_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t calibration_axis,uint8_t calibration_progress,uint8_t calibration_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, calibration_axis);
_mav_put_uint8_t(buf, 1, calibration_progress);
_mav_put_uint8_t(buf, 2, calibration_status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#else
mavlink_gimbal_axis_calibration_progress_t packet;
packet.calibration_axis = calibration_axis;
packet.calibration_progress = calibration_progress;
packet.calibration_status = calibration_status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
}
/**
* @brief Encode a gimbal_axis_calibration_progress struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gimbal_axis_calibration_progress C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_axis_calibration_progress_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_axis_calibration_progress_t* gimbal_axis_calibration_progress)
{
return mavlink_msg_gimbal_axis_calibration_progress_pack(system_id, component_id, msg, gimbal_axis_calibration_progress->calibration_axis, gimbal_axis_calibration_progress->calibration_progress, gimbal_axis_calibration_progress->calibration_status);
}
/**
* @brief Encode a gimbal_axis_calibration_progress struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gimbal_axis_calibration_progress C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_axis_calibration_progress_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_axis_calibration_progress_t* gimbal_axis_calibration_progress)
{
return mavlink_msg_gimbal_axis_calibration_progress_pack_chan(system_id, component_id, chan, msg, gimbal_axis_calibration_progress->calibration_axis, gimbal_axis_calibration_progress->calibration_progress, gimbal_axis_calibration_progress->calibration_status);
}
/**
* @brief Send a gimbal_axis_calibration_progress message
* @param chan MAVLink channel to send the message
*
* @param calibration_axis Which gimbal axis we're reporting calibration progress for
* @param calibration_progress The current calibration progress for this axis, 0x64=100%
* @param calibration_status The status of the running calibration
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_axis_calibration_progress_send(mavlink_channel_t chan, uint8_t calibration_axis, uint8_t calibration_progress, uint8_t calibration_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, calibration_axis);
_mav_put_uint8_t(buf, 1, calibration_progress);
_mav_put_uint8_t(buf, 2, calibration_status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
#else
mavlink_gimbal_axis_calibration_progress_t packet;
packet.calibration_axis = calibration_axis;
packet.calibration_progress = calibration_progress;
packet.calibration_status = calibration_status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gimbal_axis_calibration_progress_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t calibration_axis, uint8_t calibration_progress, uint8_t calibration_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, calibration_axis);
_mav_put_uint8_t(buf, 1, calibration_progress);
_mav_put_uint8_t(buf, 2, calibration_status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
#else
mavlink_gimbal_axis_calibration_progress_t *packet = (mavlink_gimbal_axis_calibration_progress_t *)msgbuf;
packet->calibration_axis = calibration_axis;
packet->calibration_progress = calibration_progress;
packet->calibration_status = calibration_status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_AXIS_CALIBRATION_PROGRESS UNPACKING
/**
* @brief Get field calibration_axis from gimbal_axis_calibration_progress message
*
* @return Which gimbal axis we're reporting calibration progress for
*/
static inline uint8_t mavlink_msg_gimbal_axis_calibration_progress_get_calibration_axis(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field calibration_progress from gimbal_axis_calibration_progress message
*
* @return The current calibration progress for this axis, 0x64=100%
*/
static inline uint8_t mavlink_msg_gimbal_axis_calibration_progress_get_calibration_progress(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field calibration_status from gimbal_axis_calibration_progress message
*
* @return The status of the running calibration
*/
static inline uint8_t mavlink_msg_gimbal_axis_calibration_progress_get_calibration_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Decode a gimbal_axis_calibration_progress message into a struct
*
* @param msg The message to decode
* @param gimbal_axis_calibration_progress C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_axis_calibration_progress_decode(const mavlink_message_t* msg, mavlink_gimbal_axis_calibration_progress_t* gimbal_axis_calibration_progress)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_axis_calibration_progress->calibration_axis = mavlink_msg_gimbal_axis_calibration_progress_get_calibration_axis(msg);
gimbal_axis_calibration_progress->calibration_progress = mavlink_msg_gimbal_axis_calibration_progress_get_calibration_progress(msg);
gimbal_axis_calibration_progress->calibration_status = mavlink_msg_gimbal_axis_calibration_progress_get_calibration_status(msg);
#else
memcpy(gimbal_axis_calibration_progress, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_AXIS_CALIBRATION_PROGRESS_LEN);
#endif
}
// MESSAGE GIMBAL_ERASE_FIRMWARE_AND_CONFIG PACKING
#define MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG 208
typedef struct __mavlink_gimbal_erase_firmware_and_config_t
{
uint32_t knock; /*< Knock value to confirm this is a valid request*/
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
} mavlink_gimbal_erase_firmware_and_config_t;
#define MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN 6
#define MAVLINK_MSG_ID_208_LEN 6
#define MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC 221
#define MAVLINK_MSG_ID_208_CRC 221
#define MAVLINK_MESSAGE_INFO_GIMBAL_ERASE_FIRMWARE_AND_CONFIG { \
"GIMBAL_ERASE_FIRMWARE_AND_CONFIG", \
3, \
{ { "knock", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gimbal_erase_firmware_and_config_t, knock) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_gimbal_erase_firmware_and_config_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_gimbal_erase_firmware_and_config_t, target_component) }, \
} \
}
/**
* @brief Pack a gimbal_erase_firmware_and_config message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param knock Knock value to confirm this is a valid request
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_erase_firmware_and_config_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint32_t knock)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN];
_mav_put_uint32_t(buf, 0, knock);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#else
mavlink_gimbal_erase_firmware_and_config_t packet;
packet.knock = knock;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
}
/**
* @brief Pack a gimbal_erase_firmware_and_config message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param knock Knock value to confirm this is a valid request
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_erase_firmware_and_config_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint32_t knock)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN];
_mav_put_uint32_t(buf, 0, knock);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#else
mavlink_gimbal_erase_firmware_and_config_t packet;
packet.knock = knock;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
}
/**
* @brief Encode a gimbal_erase_firmware_and_config struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gimbal_erase_firmware_and_config C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_erase_firmware_and_config_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_erase_firmware_and_config_t* gimbal_erase_firmware_and_config)
{
return mavlink_msg_gimbal_erase_firmware_and_config_pack(system_id, component_id, msg, gimbal_erase_firmware_and_config->target_system, gimbal_erase_firmware_and_config->target_component, gimbal_erase_firmware_and_config->knock);
}
/**
* @brief Encode a gimbal_erase_firmware_and_config struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gimbal_erase_firmware_and_config C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_erase_firmware_and_config_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_erase_firmware_and_config_t* gimbal_erase_firmware_and_config)
{
return mavlink_msg_gimbal_erase_firmware_and_config_pack_chan(system_id, component_id, chan, msg, gimbal_erase_firmware_and_config->target_system, gimbal_erase_firmware_and_config->target_component, gimbal_erase_firmware_and_config->knock);
}
/**
* @brief Send a gimbal_erase_firmware_and_config message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param knock Knock value to confirm this is a valid request
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_erase_firmware_and_config_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t knock)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN];
_mav_put_uint32_t(buf, 0, knock);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
#else
mavlink_gimbal_erase_firmware_and_config_t packet;
packet.knock = knock;
packet.target_system = target_system;
packet.target_component = target_component;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gimbal_erase_firmware_and_config_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t knock)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, knock);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, buf, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
#else
mavlink_gimbal_erase_firmware_and_config_t *packet = (mavlink_gimbal_erase_firmware_and_config_t *)msgbuf;
packet->knock = knock;
packet->target_system = target_system;
packet->target_component = target_component;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_ERASE_FIRMWARE_AND_CONFIG UNPACKING
/**
* @brief Get field target_system from gimbal_erase_firmware_and_config message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_erase_firmware_and_config_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Get field target_component from gimbal_erase_firmware_and_config message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_erase_firmware_and_config_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
/**
* @brief Get field knock from gimbal_erase_firmware_and_config message
*
* @return Knock value to confirm this is a valid request
*/
static inline uint32_t mavlink_msg_gimbal_erase_firmware_and_config_get_knock(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Decode a gimbal_erase_firmware_and_config message into a struct
*
* @param msg The message to decode
* @param gimbal_erase_firmware_and_config C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_erase_firmware_and_config_decode(const mavlink_message_t* msg, mavlink_gimbal_erase_firmware_and_config_t* gimbal_erase_firmware_and_config)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_erase_firmware_and_config->knock = mavlink_msg_gimbal_erase_firmware_and_config_get_knock(msg);
gimbal_erase_firmware_and_config->target_system = mavlink_msg_gimbal_erase_firmware_and_config_get_target_system(msg);
gimbal_erase_firmware_and_config->target_component = mavlink_msg_gimbal_erase_firmware_and_config_get_target_component(msg);
#else
memcpy(gimbal_erase_firmware_and_config, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_ERASE_FIRMWARE_AND_CONFIG_LEN);
#endif
}
// MESSAGE GIMBAL_FACTORY_PARAMETERS_LOADED PACKING
#define MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED 207
typedef struct __mavlink_gimbal_factory_parameters_loaded_t
{
uint8_t dummy; /*< Dummy field because mavgen doesn't allow messages with no fields*/
} mavlink_gimbal_factory_parameters_loaded_t;
#define MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN 1
#define MAVLINK_MSG_ID_207_LEN 1
#define MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC 201
#define MAVLINK_MSG_ID_207_CRC 201
#define MAVLINK_MESSAGE_INFO_GIMBAL_FACTORY_PARAMETERS_LOADED { \
"GIMBAL_FACTORY_PARAMETERS_LOADED", \
1, \
{ { "dummy", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_factory_parameters_loaded_t, dummy) }, \
} \
}
/**
* @brief Pack a gimbal_factory_parameters_loaded message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param dummy Dummy field because mavgen doesn't allow messages with no fields
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_factory_parameters_loaded_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t dummy)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN];
_mav_put_uint8_t(buf, 0, dummy);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#else
mavlink_gimbal_factory_parameters_loaded_t packet;
packet.dummy = dummy;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
}
/**
* @brief Pack a gimbal_factory_parameters_loaded message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param dummy Dummy field because mavgen doesn't allow messages with no fields
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_factory_parameters_loaded_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t dummy)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN];
_mav_put_uint8_t(buf, 0, dummy);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#else
mavlink_gimbal_factory_parameters_loaded_t packet;
packet.dummy = dummy;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
}
/**
* @brief Encode a gimbal_factory_parameters_loaded struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gimbal_factory_parameters_loaded C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_factory_parameters_loaded_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_factory_parameters_loaded_t* gimbal_factory_parameters_loaded)
{
return mavlink_msg_gimbal_factory_parameters_loaded_pack(system_id, component_id, msg, gimbal_factory_parameters_loaded->dummy);
}
/**
* @brief Encode a gimbal_factory_parameters_loaded struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gimbal_factory_parameters_loaded C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_factory_parameters_loaded_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_factory_parameters_loaded_t* gimbal_factory_parameters_loaded)
{
return mavlink_msg_gimbal_factory_parameters_loaded_pack_chan(system_id, component_id, chan, msg, gimbal_factory_parameters_loaded->dummy);
}
/**
* @brief Send a gimbal_factory_parameters_loaded message
* @param chan MAVLink channel to send the message
*
* @param dummy Dummy field because mavgen doesn't allow messages with no fields
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_factory_parameters_loaded_send(mavlink_channel_t chan, uint8_t dummy)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN];
_mav_put_uint8_t(buf, 0, dummy);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
#else
mavlink_gimbal_factory_parameters_loaded_t packet;
packet.dummy = dummy;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gimbal_factory_parameters_loaded_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t dummy)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, dummy);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, buf, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
#else
mavlink_gimbal_factory_parameters_loaded_t *packet = (mavlink_gimbal_factory_parameters_loaded_t *)msgbuf;
packet->dummy = dummy;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_FACTORY_PARAMETERS_LOADED UNPACKING
/**
* @brief Get field dummy from gimbal_factory_parameters_loaded message
*
* @return Dummy field because mavgen doesn't allow messages with no fields
*/
static inline uint8_t mavlink_msg_gimbal_factory_parameters_loaded_get_dummy(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Decode a gimbal_factory_parameters_loaded message into a struct
*
* @param msg The message to decode
* @param gimbal_factory_parameters_loaded C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_factory_parameters_loaded_decode(const mavlink_message_t* msg, mavlink_gimbal_factory_parameters_loaded_t* gimbal_factory_parameters_loaded)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_factory_parameters_loaded->dummy = mavlink_msg_gimbal_factory_parameters_loaded_get_dummy(msg);
#else
memcpy(gimbal_factory_parameters_loaded, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_FACTORY_PARAMETERS_LOADED_LEN);
#endif
}
// MESSAGE GIMBAL_HOME_OFFSET_CALIBRATION_RESULT PACKING
#define MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT 205
typedef struct __mavlink_gimbal_home_offset_calibration_result_t
{
uint8_t calibration_result; /*< The result of the home offset calibration*/
} mavlink_gimbal_home_offset_calibration_result_t;
#define MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN 1
#define MAVLINK_MSG_ID_205_LEN 1
#define MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC 63
#define MAVLINK_MSG_ID_205_CRC 63
#define MAVLINK_MESSAGE_INFO_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT { \
"GIMBAL_HOME_OFFSET_CALIBRATION_RESULT", \
1, \
{ { "calibration_result", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_home_offset_calibration_result_t, calibration_result) }, \
} \
}
/**
* @brief Pack a gimbal_home_offset_calibration_result message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param calibration_result The result of the home offset calibration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t calibration_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN];
_mav_put_uint8_t(buf, 0, calibration_result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#else
mavlink_gimbal_home_offset_calibration_result_t packet;
packet.calibration_result = calibration_result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
}
/**
* @brief Pack a gimbal_home_offset_calibration_result message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param calibration_result The result of the home offset calibration
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t calibration_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN];
_mav_put_uint8_t(buf, 0, calibration_result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#else
mavlink_gimbal_home_offset_calibration_result_t packet;
packet.calibration_result = calibration_result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
}
/**
* @brief Encode a gimbal_home_offset_calibration_result struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gimbal_home_offset_calibration_result C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_home_offset_calibration_result_t* gimbal_home_offset_calibration_result)
{
return mavlink_msg_gimbal_home_offset_calibration_result_pack(system_id, component_id, msg, gimbal_home_offset_calibration_result->calibration_result);
}
/**
* @brief Encode a gimbal_home_offset_calibration_result struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gimbal_home_offset_calibration_result C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_home_offset_calibration_result_t* gimbal_home_offset_calibration_result)
{
return mavlink_msg_gimbal_home_offset_calibration_result_pack_chan(system_id, component_id, chan, msg, gimbal_home_offset_calibration_result->calibration_result);
}
/**
* @brief Send a gimbal_home_offset_calibration_result message
* @param chan MAVLink channel to send the message
*
* @param calibration_result The result of the home offset calibration
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_home_offset_calibration_result_send(mavlink_channel_t chan, uint8_t calibration_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN];
_mav_put_uint8_t(buf, 0, calibration_result);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
#else
mavlink_gimbal_home_offset_calibration_result_t packet;
packet.calibration_result = calibration_result;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gimbal_home_offset_calibration_result_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t calibration_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, calibration_result);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, buf, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
#else
mavlink_gimbal_home_offset_calibration_result_t *packet = (mavlink_gimbal_home_offset_calibration_result_t *)msgbuf;
packet->calibration_result = calibration_result;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_HOME_OFFSET_CALIBRATION_RESULT UNPACKING
/**
* @brief Get field calibration_result from gimbal_home_offset_calibration_result message
*
* @return The result of the home offset calibration
*/
static inline uint8_t mavlink_msg_gimbal_home_offset_calibration_result_get_calibration_result(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Decode a gimbal_home_offset_calibration_result message into a struct
*
* @param msg The message to decode
* @param gimbal_home_offset_calibration_result C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_home_offset_calibration_result_decode(const mavlink_message_t* msg, mavlink_gimbal_home_offset_calibration_result_t* gimbal_home_offset_calibration_result)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_home_offset_calibration_result->calibration_result = mavlink_msg_gimbal_home_offset_calibration_result_get_calibration_result(msg);
#else
memcpy(gimbal_home_offset_calibration_result, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
#endif
}
......@@ -11,9 +11,9 @@ typedef struct __mavlink_gimbal_report_t
float delta_velocity_x; /*< Delta velocity X (m/s)*/
float delta_velocity_y; /*< Delta velocity Y (m/s)*/
float delta_velocity_z; /*< Delta velocity Z (m/s)*/
float joint_roll; /*< Joint ROLL (radians)*/
float joint_el; /*< Joint EL (radians)*/
float joint_az; /*< Joint AZ (radians)*/
float joint_roll; /*< Joint ROLL (radians)*/
float joint_el; /*< Joint EL (radians)*/
float joint_az; /*< Joint AZ (radians)*/
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
} mavlink_gimbal_report_t;
......@@ -60,9 +60,9 @@ typedef struct __mavlink_gimbal_report_t
* @param delta_velocity_x Delta velocity X (m/s)
* @param delta_velocity_y Delta velocity Y (m/s)
* @param delta_velocity_z Delta velocity Z (m/s)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_report_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
......@@ -125,9 +125,9 @@ static inline uint16_t mavlink_msg_gimbal_report_pack(uint8_t system_id, uint8_t
* @param delta_velocity_x Delta velocity X (m/s)
* @param delta_velocity_y Delta velocity Y (m/s)
* @param delta_velocity_z Delta velocity Z (m/s)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_report_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
......@@ -216,9 +216,9 @@ static inline uint16_t mavlink_msg_gimbal_report_encode_chan(uint8_t system_id,
* @param delta_velocity_x Delta velocity X (m/s)
* @param delta_velocity_y Delta velocity Y (m/s)
* @param delta_velocity_z Delta velocity Z (m/s)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
* @param joint_roll Joint ROLL (radians)
* @param joint_el Joint EL (radians)
* @param joint_az Joint AZ (radians)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
......@@ -419,7 +419,7 @@ static inline float mavlink_msg_gimbal_report_get_delta_velocity_z(const mavlink
/**
* @brief Get field joint_roll from gimbal_report message
*
* @return Joint ROLL (radians)
* @return Joint ROLL (radians)
*/
static inline float mavlink_msg_gimbal_report_get_joint_roll(const mavlink_message_t* msg)
{
......@@ -429,7 +429,7 @@ static inline float mavlink_msg_gimbal_report_get_joint_roll(const mavlink_messa
/**
* @brief Get field joint_el from gimbal_report message
*
* @return Joint EL (radians)
* @return Joint EL (radians)
*/
static inline float mavlink_msg_gimbal_report_get_joint_el(const mavlink_message_t* msg)
{
......@@ -439,7 +439,7 @@ static inline float mavlink_msg_gimbal_report_get_joint_el(const mavlink_message
/**
* @brief Get field joint_az from gimbal_report message
*
* @return Joint AZ (radians)
* @return Joint AZ (radians)
*/
static inline float mavlink_msg_gimbal_report_get_joint_az(const mavlink_message_t* msg)
{
......
// MESSAGE GIMBAL_REPORT_FACTORY_TESTS_PROGRESS PACKING
#define MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS 210
typedef struct __mavlink_gimbal_report_factory_tests_progress_t
{
uint8_t test; /*< Which factory test is currently running*/
uint8_t test_section; /*< Which section of the test is currently running. The meaning of this is test-dependent*/
uint8_t test_section_progress; /*< The progress of the current test section, 0x64=100%*/
uint8_t test_status; /*< The status of the currently executing test section. The meaning of this is test and section-dependent*/
} mavlink_gimbal_report_factory_tests_progress_t;
#define MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN 4
#define MAVLINK_MSG_ID_210_LEN 4
#define MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC 238
#define MAVLINK_MSG_ID_210_CRC 238
#define MAVLINK_MESSAGE_INFO_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS { \
"GIMBAL_REPORT_FACTORY_TESTS_PROGRESS", \
4, \
{ { "test", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test) }, \
{ "test_section", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test_section) }, \
{ "test_section_progress", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test_section_progress) }, \
{ "test_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_gimbal_report_factory_tests_progress_t, test_status) }, \
} \
}
/**
* @brief Pack a gimbal_report_factory_tests_progress message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param test Which factory test is currently running
* @param test_section Which section of the test is currently running. The meaning of this is test-dependent
* @param test_section_progress The progress of the current test section, 0x64=100%
* @param test_status The status of the currently executing test section. The meaning of this is test and section-dependent
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t test, uint8_t test_section, uint8_t test_section_progress, uint8_t test_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, test);
_mav_put_uint8_t(buf, 1, test_section);
_mav_put_uint8_t(buf, 2, test_section_progress);
_mav_put_uint8_t(buf, 3, test_status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#else
mavlink_gimbal_report_factory_tests_progress_t packet;
packet.test = test;
packet.test_section = test_section;
packet.test_section_progress = test_section_progress;
packet.test_status = test_status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
}
/**
* @brief Pack a gimbal_report_factory_tests_progress message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param test Which factory test is currently running
* @param test_section Which section of the test is currently running. The meaning of this is test-dependent
* @param test_section_progress The progress of the current test section, 0x64=100%
* @param test_status The status of the currently executing test section. The meaning of this is test and section-dependent
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t test,uint8_t test_section,uint8_t test_section_progress,uint8_t test_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, test);
_mav_put_uint8_t(buf, 1, test_section);
_mav_put_uint8_t(buf, 2, test_section_progress);
_mav_put_uint8_t(buf, 3, test_status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#else
mavlink_gimbal_report_factory_tests_progress_t packet;
packet.test = test;
packet.test_section = test_section;
packet.test_section_progress = test_section_progress;
packet.test_status = test_status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
}
/**
* @brief Encode a gimbal_report_factory_tests_progress struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gimbal_report_factory_tests_progress C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_report_factory_tests_progress_t* gimbal_report_factory_tests_progress)
{
return mavlink_msg_gimbal_report_factory_tests_progress_pack(system_id, component_id, msg, gimbal_report_factory_tests_progress->test, gimbal_report_factory_tests_progress->test_section, gimbal_report_factory_tests_progress->test_section_progress, gimbal_report_factory_tests_progress->test_status);
}
/**
* @brief Encode a gimbal_report_factory_tests_progress struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gimbal_report_factory_tests_progress C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_report_factory_tests_progress_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_report_factory_tests_progress_t* gimbal_report_factory_tests_progress)
{
return mavlink_msg_gimbal_report_factory_tests_progress_pack_chan(system_id, component_id, chan, msg, gimbal_report_factory_tests_progress->test, gimbal_report_factory_tests_progress->test_section, gimbal_report_factory_tests_progress->test_section_progress, gimbal_report_factory_tests_progress->test_status);
}
/**
* @brief Send a gimbal_report_factory_tests_progress message
* @param chan MAVLink channel to send the message
*
* @param test Which factory test is currently running
* @param test_section Which section of the test is currently running. The meaning of this is test-dependent
* @param test_section_progress The progress of the current test section, 0x64=100%
* @param test_status The status of the currently executing test section. The meaning of this is test and section-dependent
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_report_factory_tests_progress_send(mavlink_channel_t chan, uint8_t test, uint8_t test_section, uint8_t test_section_progress, uint8_t test_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN];
_mav_put_uint8_t(buf, 0, test);
_mav_put_uint8_t(buf, 1, test_section);
_mav_put_uint8_t(buf, 2, test_section_progress);
_mav_put_uint8_t(buf, 3, test_status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
#else
mavlink_gimbal_report_factory_tests_progress_t packet;
packet.test = test;
packet.test_section = test_section;
packet.test_section_progress = test_section_progress;
packet.test_status = test_status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gimbal_report_factory_tests_progress_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t test, uint8_t test_section, uint8_t test_section_progress, uint8_t test_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, test);
_mav_put_uint8_t(buf, 1, test_section);
_mav_put_uint8_t(buf, 2, test_section_progress);
_mav_put_uint8_t(buf, 3, test_status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
#else
mavlink_gimbal_report_factory_tests_progress_t *packet = (mavlink_gimbal_report_factory_tests_progress_t *)msgbuf;
packet->test = test;
packet->test_section = test_section;
packet->test_section_progress = test_section_progress;
packet->test_status = test_status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_REPORT_FACTORY_TESTS_PROGRESS UNPACKING
/**
* @brief Get field test from gimbal_report_factory_tests_progress message
*
* @return Which factory test is currently running
*/
static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field test_section from gimbal_report_factory_tests_progress message
*
* @return Which section of the test is currently running. The meaning of this is test-dependent
*/
static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test_section(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field test_section_progress from gimbal_report_factory_tests_progress message
*
* @return The progress of the current test section, 0x64=100%
*/
static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test_section_progress(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field test_status from gimbal_report_factory_tests_progress message
*
* @return The status of the currently executing test section. The meaning of this is test and section-dependent
*/
static inline uint8_t mavlink_msg_gimbal_report_factory_tests_progress_get_test_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Decode a gimbal_report_factory_tests_progress message into a struct
*
* @param msg The message to decode
* @param gimbal_report_factory_tests_progress C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_report_factory_tests_progress_decode(const mavlink_message_t* msg, mavlink_gimbal_report_factory_tests_progress_t* gimbal_report_factory_tests_progress)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_report_factory_tests_progress->test = mavlink_msg_gimbal_report_factory_tests_progress_get_test(msg);
gimbal_report_factory_tests_progress->test_section = mavlink_msg_gimbal_report_factory_tests_progress_get_test_section(msg);
gimbal_report_factory_tests_progress->test_section_progress = mavlink_msg_gimbal_report_factory_tests_progress_get_test_section_progress(msg);
gimbal_report_factory_tests_progress->test_status = mavlink_msg_gimbal_report_factory_tests_progress_get_test_status(msg);
#else
memcpy(gimbal_report_factory_tests_progress, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS_LEN);
#endif
}
// MESSAGE GIMBAL_SET_FACTORY_PARAMETERS PACKING
#define MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS 206
typedef struct __mavlink_gimbal_set_factory_parameters_t
{
uint32_t magic_1; /*< Magic number 1 for validation*/
uint32_t magic_2; /*< Magic number 2 for validation*/
uint32_t magic_3; /*< Magic number 3 for validation*/
uint32_t serial_number_pt_1; /*< Unit Serial Number Part 1 (part code, design, language/country)*/
uint32_t serial_number_pt_2; /*< Unit Serial Number Part 2 (option, year, month)*/
uint32_t serial_number_pt_3; /*< Unit Serial Number Part 3 (incrementing serial number per month)*/
uint16_t assembly_year; /*< Assembly Date Year*/
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
uint8_t assembly_month; /*< Assembly Date Month*/
uint8_t assembly_day; /*< Assembly Date Day*/
uint8_t assembly_hour; /*< Assembly Time Hour*/
uint8_t assembly_minute; /*< Assembly Time Minute*/
uint8_t assembly_second; /*< Assembly Time Second*/
} mavlink_gimbal_set_factory_parameters_t;
#define MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN 33
#define MAVLINK_MSG_ID_206_LEN 33
#define MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC 112
#define MAVLINK_MSG_ID_206_CRC 112
#define MAVLINK_MESSAGE_INFO_GIMBAL_SET_FACTORY_PARAMETERS { \
"GIMBAL_SET_FACTORY_PARAMETERS", \
14, \
{ { "magic_1", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gimbal_set_factory_parameters_t, magic_1) }, \
{ "magic_2", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_gimbal_set_factory_parameters_t, magic_2) }, \
{ "magic_3", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_gimbal_set_factory_parameters_t, magic_3) }, \
{ "serial_number_pt_1", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_gimbal_set_factory_parameters_t, serial_number_pt_1) }, \
{ "serial_number_pt_2", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_gimbal_set_factory_parameters_t, serial_number_pt_2) }, \
{ "serial_number_pt_3", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_gimbal_set_factory_parameters_t, serial_number_pt_3) }, \
{ "assembly_year", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_year) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_gimbal_set_factory_parameters_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 27, offsetof(mavlink_gimbal_set_factory_parameters_t, target_component) }, \
{ "assembly_month", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_month) }, \
{ "assembly_day", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_day) }, \
{ "assembly_hour", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_hour) }, \
{ "assembly_minute", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_minute) }, \
{ "assembly_second", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gimbal_set_factory_parameters_t, assembly_second) }, \
} \
}
/**
* @brief Pack a gimbal_set_factory_parameters message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param magic_1 Magic number 1 for validation
* @param magic_2 Magic number 2 for validation
* @param magic_3 Magic number 3 for validation
* @param assembly_year Assembly Date Year
* @param assembly_month Assembly Date Month
* @param assembly_day Assembly Date Day
* @param assembly_hour Assembly Time Hour
* @param assembly_minute Assembly Time Minute
* @param assembly_second Assembly Time Second
* @param serial_number_pt_1 Unit Serial Number Part 1 (part code, design, language/country)
* @param serial_number_pt_2 Unit Serial Number Part 2 (option, year, month)
* @param serial_number_pt_3 Unit Serial Number Part 3 (incrementing serial number per month)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_set_factory_parameters_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint32_t magic_1, uint32_t magic_2, uint32_t magic_3, uint16_t assembly_year, uint8_t assembly_month, uint8_t assembly_day, uint8_t assembly_hour, uint8_t assembly_minute, uint8_t assembly_second, uint32_t serial_number_pt_1, uint32_t serial_number_pt_2, uint32_t serial_number_pt_3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN];
_mav_put_uint32_t(buf, 0, magic_1);
_mav_put_uint32_t(buf, 4, magic_2);
_mav_put_uint32_t(buf, 8, magic_3);
_mav_put_uint32_t(buf, 12, serial_number_pt_1);
_mav_put_uint32_t(buf, 16, serial_number_pt_2);
_mav_put_uint32_t(buf, 20, serial_number_pt_3);
_mav_put_uint16_t(buf, 24, assembly_year);
_mav_put_uint8_t(buf, 26, target_system);
_mav_put_uint8_t(buf, 27, target_component);
_mav_put_uint8_t(buf, 28, assembly_month);
_mav_put_uint8_t(buf, 29, assembly_day);
_mav_put_uint8_t(buf, 30, assembly_hour);
_mav_put_uint8_t(buf, 31, assembly_minute);
_mav_put_uint8_t(buf, 32, assembly_second);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#else
mavlink_gimbal_set_factory_parameters_t packet;
packet.magic_1 = magic_1;
packet.magic_2 = magic_2;
packet.magic_3 = magic_3;
packet.serial_number_pt_1 = serial_number_pt_1;
packet.serial_number_pt_2 = serial_number_pt_2;
packet.serial_number_pt_3 = serial_number_pt_3;
packet.assembly_year = assembly_year;
packet.target_system = target_system;
packet.target_component = target_component;
packet.assembly_month = assembly_month;
packet.assembly_day = assembly_day;
packet.assembly_hour = assembly_hour;
packet.assembly_minute = assembly_minute;
packet.assembly_second = assembly_second;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
}
/**
* @brief Pack a gimbal_set_factory_parameters message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param magic_1 Magic number 1 for validation
* @param magic_2 Magic number 2 for validation
* @param magic_3 Magic number 3 for validation
* @param assembly_year Assembly Date Year
* @param assembly_month Assembly Date Month
* @param assembly_day Assembly Date Day
* @param assembly_hour Assembly Time Hour
* @param assembly_minute Assembly Time Minute
* @param assembly_second Assembly Time Second
* @param serial_number_pt_1 Unit Serial Number Part 1 (part code, design, language/country)
* @param serial_number_pt_2 Unit Serial Number Part 2 (option, year, month)
* @param serial_number_pt_3 Unit Serial Number Part 3 (incrementing serial number per month)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_set_factory_parameters_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint32_t magic_1,uint32_t magic_2,uint32_t magic_3,uint16_t assembly_year,uint8_t assembly_month,uint8_t assembly_day,uint8_t assembly_hour,uint8_t assembly_minute,uint8_t assembly_second,uint32_t serial_number_pt_1,uint32_t serial_number_pt_2,uint32_t serial_number_pt_3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN];
_mav_put_uint32_t(buf, 0, magic_1);
_mav_put_uint32_t(buf, 4, magic_2);
_mav_put_uint32_t(buf, 8, magic_3);
_mav_put_uint32_t(buf, 12, serial_number_pt_1);
_mav_put_uint32_t(buf, 16, serial_number_pt_2);
_mav_put_uint32_t(buf, 20, serial_number_pt_3);
_mav_put_uint16_t(buf, 24, assembly_year);
_mav_put_uint8_t(buf, 26, target_system);
_mav_put_uint8_t(buf, 27, target_component);
_mav_put_uint8_t(buf, 28, assembly_month);
_mav_put_uint8_t(buf, 29, assembly_day);
_mav_put_uint8_t(buf, 30, assembly_hour);
_mav_put_uint8_t(buf, 31, assembly_minute);
_mav_put_uint8_t(buf, 32, assembly_second);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#else
mavlink_gimbal_set_factory_parameters_t packet;
packet.magic_1 = magic_1;
packet.magic_2 = magic_2;
packet.magic_3 = magic_3;
packet.serial_number_pt_1 = serial_number_pt_1;
packet.serial_number_pt_2 = serial_number_pt_2;
packet.serial_number_pt_3 = serial_number_pt_3;
packet.assembly_year = assembly_year;
packet.target_system = target_system;
packet.target_component = target_component;
packet.assembly_month = assembly_month;
packet.assembly_day = assembly_day;
packet.assembly_hour = assembly_hour;
packet.assembly_minute = assembly_minute;
packet.assembly_second = assembly_second;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
}
/**
* @brief Encode a gimbal_set_factory_parameters struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gimbal_set_factory_parameters C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_set_factory_parameters_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_set_factory_parameters_t* gimbal_set_factory_parameters)
{
return mavlink_msg_gimbal_set_factory_parameters_pack(system_id, component_id, msg, gimbal_set_factory_parameters->target_system, gimbal_set_factory_parameters->target_component, gimbal_set_factory_parameters->magic_1, gimbal_set_factory_parameters->magic_2, gimbal_set_factory_parameters->magic_3, gimbal_set_factory_parameters->assembly_year, gimbal_set_factory_parameters->assembly_month, gimbal_set_factory_parameters->assembly_day, gimbal_set_factory_parameters->assembly_hour, gimbal_set_factory_parameters->assembly_minute, gimbal_set_factory_parameters->assembly_second, gimbal_set_factory_parameters->serial_number_pt_1, gimbal_set_factory_parameters->serial_number_pt_2, gimbal_set_factory_parameters->serial_number_pt_3);
}
/**
* @brief Encode a gimbal_set_factory_parameters struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gimbal_set_factory_parameters C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_set_factory_parameters_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_set_factory_parameters_t* gimbal_set_factory_parameters)
{
return mavlink_msg_gimbal_set_factory_parameters_pack_chan(system_id, component_id, chan, msg, gimbal_set_factory_parameters->target_system, gimbal_set_factory_parameters->target_component, gimbal_set_factory_parameters->magic_1, gimbal_set_factory_parameters->magic_2, gimbal_set_factory_parameters->magic_3, gimbal_set_factory_parameters->assembly_year, gimbal_set_factory_parameters->assembly_month, gimbal_set_factory_parameters->assembly_day, gimbal_set_factory_parameters->assembly_hour, gimbal_set_factory_parameters->assembly_minute, gimbal_set_factory_parameters->assembly_second, gimbal_set_factory_parameters->serial_number_pt_1, gimbal_set_factory_parameters->serial_number_pt_2, gimbal_set_factory_parameters->serial_number_pt_3);
}
/**
* @brief Send a gimbal_set_factory_parameters message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param magic_1 Magic number 1 for validation
* @param magic_2 Magic number 2 for validation
* @param magic_3 Magic number 3 for validation
* @param assembly_year Assembly Date Year
* @param assembly_month Assembly Date Month
* @param assembly_day Assembly Date Day
* @param assembly_hour Assembly Time Hour
* @param assembly_minute Assembly Time Minute
* @param assembly_second Assembly Time Second
* @param serial_number_pt_1 Unit Serial Number Part 1 (part code, design, language/country)
* @param serial_number_pt_2 Unit Serial Number Part 2 (option, year, month)
* @param serial_number_pt_3 Unit Serial Number Part 3 (incrementing serial number per month)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_set_factory_parameters_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t magic_1, uint32_t magic_2, uint32_t magic_3, uint16_t assembly_year, uint8_t assembly_month, uint8_t assembly_day, uint8_t assembly_hour, uint8_t assembly_minute, uint8_t assembly_second, uint32_t serial_number_pt_1, uint32_t serial_number_pt_2, uint32_t serial_number_pt_3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN];
_mav_put_uint32_t(buf, 0, magic_1);
_mav_put_uint32_t(buf, 4, magic_2);
_mav_put_uint32_t(buf, 8, magic_3);
_mav_put_uint32_t(buf, 12, serial_number_pt_1);
_mav_put_uint32_t(buf, 16, serial_number_pt_2);
_mav_put_uint32_t(buf, 20, serial_number_pt_3);
_mav_put_uint16_t(buf, 24, assembly_year);
_mav_put_uint8_t(buf, 26, target_system);
_mav_put_uint8_t(buf, 27, target_component);
_mav_put_uint8_t(buf, 28, assembly_month);
_mav_put_uint8_t(buf, 29, assembly_day);
_mav_put_uint8_t(buf, 30, assembly_hour);
_mav_put_uint8_t(buf, 31, assembly_minute);
_mav_put_uint8_t(buf, 32, assembly_second);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
#else
mavlink_gimbal_set_factory_parameters_t packet;
packet.magic_1 = magic_1;
packet.magic_2 = magic_2;
packet.magic_3 = magic_3;
packet.serial_number_pt_1 = serial_number_pt_1;
packet.serial_number_pt_2 = serial_number_pt_2;
packet.serial_number_pt_3 = serial_number_pt_3;
packet.assembly_year = assembly_year;
packet.target_system = target_system;
packet.target_component = target_component;
packet.assembly_month = assembly_month;
packet.assembly_day = assembly_day;
packet.assembly_hour = assembly_hour;
packet.assembly_minute = assembly_minute;
packet.assembly_second = assembly_second;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gimbal_set_factory_parameters_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t magic_1, uint32_t magic_2, uint32_t magic_3, uint16_t assembly_year, uint8_t assembly_month, uint8_t assembly_day, uint8_t assembly_hour, uint8_t assembly_minute, uint8_t assembly_second, uint32_t serial_number_pt_1, uint32_t serial_number_pt_2, uint32_t serial_number_pt_3)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, magic_1);
_mav_put_uint32_t(buf, 4, magic_2);
_mav_put_uint32_t(buf, 8, magic_3);
_mav_put_uint32_t(buf, 12, serial_number_pt_1);
_mav_put_uint32_t(buf, 16, serial_number_pt_2);
_mav_put_uint32_t(buf, 20, serial_number_pt_3);
_mav_put_uint16_t(buf, 24, assembly_year);
_mav_put_uint8_t(buf, 26, target_system);
_mav_put_uint8_t(buf, 27, target_component);
_mav_put_uint8_t(buf, 28, assembly_month);
_mav_put_uint8_t(buf, 29, assembly_day);
_mav_put_uint8_t(buf, 30, assembly_hour);
_mav_put_uint8_t(buf, 31, assembly_minute);
_mav_put_uint8_t(buf, 32, assembly_second);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, buf, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
#else
mavlink_gimbal_set_factory_parameters_t *packet = (mavlink_gimbal_set_factory_parameters_t *)msgbuf;
packet->magic_1 = magic_1;
packet->magic_2 = magic_2;
packet->magic_3 = magic_3;
packet->serial_number_pt_1 = serial_number_pt_1;
packet->serial_number_pt_2 = serial_number_pt_2;
packet->serial_number_pt_3 = serial_number_pt_3;
packet->assembly_year = assembly_year;
packet->target_system = target_system;
packet->target_component = target_component;
packet->assembly_month = assembly_month;
packet->assembly_day = assembly_day;
packet->assembly_hour = assembly_hour;
packet->assembly_minute = assembly_minute;
packet->assembly_second = assembly_second;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_SET_FACTORY_PARAMETERS UNPACKING
/**
* @brief Get field target_system from gimbal_set_factory_parameters message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 26);
}
/**
* @brief Get field target_component from gimbal_set_factory_parameters message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 27);
}
/**
* @brief Get field magic_1 from gimbal_set_factory_parameters message
*
* @return Magic number 1 for validation
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_magic_1(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field magic_2 from gimbal_set_factory_parameters message
*
* @return Magic number 2 for validation
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_magic_2(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 4);
}
/**
* @brief Get field magic_3 from gimbal_set_factory_parameters message
*
* @return Magic number 3 for validation
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_magic_3(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 8);
}
/**
* @brief Get field assembly_year from gimbal_set_factory_parameters message
*
* @return Assembly Date Year
*/
static inline uint16_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_year(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 24);
}
/**
* @brief Get field assembly_month from gimbal_set_factory_parameters message
*
* @return Assembly Date Month
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_month(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 28);
}
/**
* @brief Get field assembly_day from gimbal_set_factory_parameters message
*
* @return Assembly Date Day
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_day(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 29);
}
/**
* @brief Get field assembly_hour from gimbal_set_factory_parameters message
*
* @return Assembly Time Hour
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_hour(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 30);
}
/**
* @brief Get field assembly_minute from gimbal_set_factory_parameters message
*
* @return Assembly Time Minute
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_minute(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 31);
}
/**
* @brief Get field assembly_second from gimbal_set_factory_parameters message
*
* @return Assembly Time Second
*/
static inline uint8_t mavlink_msg_gimbal_set_factory_parameters_get_assembly_second(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
/**
* @brief Get field serial_number_pt_1 from gimbal_set_factory_parameters message
*
* @return Unit Serial Number Part 1 (part code, design, language/country)
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_1(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 12);
}
/**
* @brief Get field serial_number_pt_2 from gimbal_set_factory_parameters message
*
* @return Unit Serial Number Part 2 (option, year, month)
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_2(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 16);
}
/**
* @brief Get field serial_number_pt_3 from gimbal_set_factory_parameters message
*
* @return Unit Serial Number Part 3 (incrementing serial number per month)
*/
static inline uint32_t mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_3(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 20);
}
/**
* @brief Decode a gimbal_set_factory_parameters message into a struct
*
* @param msg The message to decode
* @param gimbal_set_factory_parameters C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_set_factory_parameters_decode(const mavlink_message_t* msg, mavlink_gimbal_set_factory_parameters_t* gimbal_set_factory_parameters)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_set_factory_parameters->magic_1 = mavlink_msg_gimbal_set_factory_parameters_get_magic_1(msg);
gimbal_set_factory_parameters->magic_2 = mavlink_msg_gimbal_set_factory_parameters_get_magic_2(msg);
gimbal_set_factory_parameters->magic_3 = mavlink_msg_gimbal_set_factory_parameters_get_magic_3(msg);
gimbal_set_factory_parameters->serial_number_pt_1 = mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_1(msg);
gimbal_set_factory_parameters->serial_number_pt_2 = mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_2(msg);
gimbal_set_factory_parameters->serial_number_pt_3 = mavlink_msg_gimbal_set_factory_parameters_get_serial_number_pt_3(msg);
gimbal_set_factory_parameters->assembly_year = mavlink_msg_gimbal_set_factory_parameters_get_assembly_year(msg);
gimbal_set_factory_parameters->target_system = mavlink_msg_gimbal_set_factory_parameters_get_target_system(msg);
gimbal_set_factory_parameters->target_component = mavlink_msg_gimbal_set_factory_parameters_get_target_component(msg);
gimbal_set_factory_parameters->assembly_month = mavlink_msg_gimbal_set_factory_parameters_get_assembly_month(msg);
gimbal_set_factory_parameters->assembly_day = mavlink_msg_gimbal_set_factory_parameters_get_assembly_day(msg);
gimbal_set_factory_parameters->assembly_hour = mavlink_msg_gimbal_set_factory_parameters_get_assembly_hour(msg);
gimbal_set_factory_parameters->assembly_minute = mavlink_msg_gimbal_set_factory_parameters_get_assembly_minute(msg);
gimbal_set_factory_parameters->assembly_second = mavlink_msg_gimbal_set_factory_parameters_get_assembly_second(msg);
#else
memcpy(gimbal_set_factory_parameters, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_SET_FACTORY_PARAMETERS_LEN);
#endif
}
// MESSAGE GIMBAL_SET_HOME_OFFSETS PACKING
#define MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS 204
typedef struct __mavlink_gimbal_set_home_offsets_t
{
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
} mavlink_gimbal_set_home_offsets_t;
#define MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN 2
#define MAVLINK_MSG_ID_204_LEN 2
#define MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC 54
#define MAVLINK_MSG_ID_204_CRC 54
#define MAVLINK_MESSAGE_INFO_GIMBAL_SET_HOME_OFFSETS { \
"GIMBAL_SET_HOME_OFFSETS", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_set_home_offsets_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_set_home_offsets_t, target_component) }, \
} \
}
/**
* @brief Pack a gimbal_set_home_offsets message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_set_home_offsets_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#else
mavlink_gimbal_set_home_offsets_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
}
/**
* @brief Pack a gimbal_set_home_offsets message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_set_home_offsets_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#else
mavlink_gimbal_set_home_offsets_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
}
/**
* @brief Encode a gimbal_set_home_offsets struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gimbal_set_home_offsets C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_set_home_offsets_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_set_home_offsets_t* gimbal_set_home_offsets)
{
return mavlink_msg_gimbal_set_home_offsets_pack(system_id, component_id, msg, gimbal_set_home_offsets->target_system, gimbal_set_home_offsets->target_component);
}
/**
* @brief Encode a gimbal_set_home_offsets struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gimbal_set_home_offsets C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_set_home_offsets_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_set_home_offsets_t* gimbal_set_home_offsets)
{
return mavlink_msg_gimbal_set_home_offsets_pack_chan(system_id, component_id, chan, msg, gimbal_set_home_offsets->target_system, gimbal_set_home_offsets->target_component);
}
/**
* @brief Send a gimbal_set_home_offsets message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_set_home_offsets_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
#else
mavlink_gimbal_set_home_offsets_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gimbal_set_home_offsets_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, buf, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
#else
mavlink_gimbal_set_home_offsets_t *packet = (mavlink_gimbal_set_home_offsets_t *)msgbuf;
packet->target_system = target_system;
packet->target_component = target_component;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_SET_HOME_OFFSETS UNPACKING
/**
* @brief Get field target_system from gimbal_set_home_offsets message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_set_home_offsets_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gimbal_set_home_offsets message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_set_home_offsets_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gimbal_set_home_offsets message into a struct
*
* @param msg The message to decode
* @param gimbal_set_home_offsets C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_set_home_offsets_decode(const mavlink_message_t* msg, mavlink_gimbal_set_home_offsets_t* gimbal_set_home_offsets)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_set_home_offsets->target_system = mavlink_msg_gimbal_set_home_offsets_get_target_system(msg);
gimbal_set_home_offsets->target_component = mavlink_msg_gimbal_set_home_offsets_get_target_component(msg);
#else
memcpy(gimbal_set_home_offsets, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_SET_HOME_OFFSETS_LEN);
#endif
}
// MESSAGE GIMBAL_TORQUE_CMD_REPORT PACKING
#define MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT 214
typedef struct __mavlink_gimbal_torque_cmd_report_t
{
int16_t rl_torque_cmd; /*< Roll Torque Command*/
int16_t el_torque_cmd; /*< Elevation Torque Command*/
int16_t az_torque_cmd; /*< Azimuth Torque Command*/
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
} mavlink_gimbal_torque_cmd_report_t;
#define MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN 8
#define MAVLINK_MSG_ID_214_LEN 8
#define MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC 69
#define MAVLINK_MSG_ID_214_CRC 69
#define MAVLINK_MESSAGE_INFO_GIMBAL_TORQUE_CMD_REPORT { \
"GIMBAL_TORQUE_CMD_REPORT", \
5, \
{ { "rl_torque_cmd", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_gimbal_torque_cmd_report_t, rl_torque_cmd) }, \
{ "el_torque_cmd", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_gimbal_torque_cmd_report_t, el_torque_cmd) }, \
{ "az_torque_cmd", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_gimbal_torque_cmd_report_t, az_torque_cmd) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_gimbal_torque_cmd_report_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_gimbal_torque_cmd_report_t, target_component) }, \
} \
}
/**
* @brief Pack a gimbal_torque_cmd_report message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param rl_torque_cmd Roll Torque Command
* @param el_torque_cmd Elevation Torque Command
* @param az_torque_cmd Azimuth Torque Command
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, int16_t rl_torque_cmd, int16_t el_torque_cmd, int16_t az_torque_cmd)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN];
_mav_put_int16_t(buf, 0, rl_torque_cmd);
_mav_put_int16_t(buf, 2, el_torque_cmd);
_mav_put_int16_t(buf, 4, az_torque_cmd);
_mav_put_uint8_t(buf, 6, target_system);
_mav_put_uint8_t(buf, 7, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#else
mavlink_gimbal_torque_cmd_report_t packet;
packet.rl_torque_cmd = rl_torque_cmd;
packet.el_torque_cmd = el_torque_cmd;
packet.az_torque_cmd = az_torque_cmd;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#endif
}
/**
* @brief Pack a gimbal_torque_cmd_report message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param rl_torque_cmd Roll Torque Command
* @param el_torque_cmd Elevation Torque Command
* @param az_torque_cmd Azimuth Torque Command
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,int16_t rl_torque_cmd,int16_t el_torque_cmd,int16_t az_torque_cmd)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN];
_mav_put_int16_t(buf, 0, rl_torque_cmd);
_mav_put_int16_t(buf, 2, el_torque_cmd);
_mav_put_int16_t(buf, 4, az_torque_cmd);
_mav_put_uint8_t(buf, 6, target_system);
_mav_put_uint8_t(buf, 7, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#else
mavlink_gimbal_torque_cmd_report_t packet;
packet.rl_torque_cmd = rl_torque_cmd;
packet.el_torque_cmd = el_torque_cmd;
packet.az_torque_cmd = az_torque_cmd;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#endif
}
/**
* @brief Encode a gimbal_torque_cmd_report struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gimbal_torque_cmd_report C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_torque_cmd_report_t* gimbal_torque_cmd_report)
{
return mavlink_msg_gimbal_torque_cmd_report_pack(system_id, component_id, msg, gimbal_torque_cmd_report->target_system, gimbal_torque_cmd_report->target_component, gimbal_torque_cmd_report->rl_torque_cmd, gimbal_torque_cmd_report->el_torque_cmd, gimbal_torque_cmd_report->az_torque_cmd);
}
/**
* @brief Encode a gimbal_torque_cmd_report struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gimbal_torque_cmd_report C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_torque_cmd_report_t* gimbal_torque_cmd_report)
{
return mavlink_msg_gimbal_torque_cmd_report_pack_chan(system_id, component_id, chan, msg, gimbal_torque_cmd_report->target_system, gimbal_torque_cmd_report->target_component, gimbal_torque_cmd_report->rl_torque_cmd, gimbal_torque_cmd_report->el_torque_cmd, gimbal_torque_cmd_report->az_torque_cmd);
}
/**
* @brief Send a gimbal_torque_cmd_report message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param rl_torque_cmd Roll Torque Command
* @param el_torque_cmd Elevation Torque Command
* @param az_torque_cmd Azimuth Torque Command
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_torque_cmd_report_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t rl_torque_cmd, int16_t el_torque_cmd, int16_t az_torque_cmd)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN];
_mav_put_int16_t(buf, 0, rl_torque_cmd);
_mav_put_int16_t(buf, 2, el_torque_cmd);
_mav_put_int16_t(buf, 4, az_torque_cmd);
_mav_put_uint8_t(buf, 6, target_system);
_mav_put_uint8_t(buf, 7, target_component);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#endif
#else
mavlink_gimbal_torque_cmd_report_t packet;
packet.rl_torque_cmd = rl_torque_cmd;
packet.el_torque_cmd = el_torque_cmd;
packet.az_torque_cmd = az_torque_cmd;
packet.target_system = target_system;
packet.target_component = target_component;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gimbal_torque_cmd_report_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t rl_torque_cmd, int16_t el_torque_cmd, int16_t az_torque_cmd)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_int16_t(buf, 0, rl_torque_cmd);
_mav_put_int16_t(buf, 2, el_torque_cmd);
_mav_put_int16_t(buf, 4, az_torque_cmd);
_mav_put_uint8_t(buf, 6, target_system);
_mav_put_uint8_t(buf, 7, target_component);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#endif
#else
mavlink_gimbal_torque_cmd_report_t *packet = (mavlink_gimbal_torque_cmd_report_t *)msgbuf;
packet->rl_torque_cmd = rl_torque_cmd;
packet->el_torque_cmd = el_torque_cmd;
packet->az_torque_cmd = az_torque_cmd;
packet->target_system = target_system;
packet->target_component = target_component;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GIMBAL_TORQUE_CMD_REPORT UNPACKING
/**
* @brief Get field target_system from gimbal_torque_cmd_report message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_torque_cmd_report_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 6);
}
/**
* @brief Get field target_component from gimbal_torque_cmd_report message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_torque_cmd_report_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 7);
}
/**
* @brief Get field rl_torque_cmd from gimbal_torque_cmd_report message
*
* @return Roll Torque Command
*/
static inline int16_t mavlink_msg_gimbal_torque_cmd_report_get_rl_torque_cmd(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 0);
}
/**
* @brief Get field el_torque_cmd from gimbal_torque_cmd_report message
*
* @return Elevation Torque Command
*/
static inline int16_t mavlink_msg_gimbal_torque_cmd_report_get_el_torque_cmd(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 2);
}
/**
* @brief Get field az_torque_cmd from gimbal_torque_cmd_report message
*
* @return Azimuth Torque Command
*/
static inline int16_t mavlink_msg_gimbal_torque_cmd_report_get_az_torque_cmd(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 4);
}
/**
* @brief Decode a gimbal_torque_cmd_report message into a struct
*
* @param msg The message to decode
* @param gimbal_torque_cmd_report C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_torque_cmd_report_decode(const mavlink_message_t* msg, mavlink_gimbal_torque_cmd_report_t* gimbal_torque_cmd_report)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_torque_cmd_report->rl_torque_cmd = mavlink_msg_gimbal_torque_cmd_report_get_rl_torque_cmd(msg);
gimbal_torque_cmd_report->el_torque_cmd = mavlink_msg_gimbal_torque_cmd_report_get_el_torque_cmd(msg);
gimbal_torque_cmd_report->az_torque_cmd = mavlink_msg_gimbal_torque_cmd_report_get_az_torque_cmd(msg);
gimbal_torque_cmd_report->target_system = mavlink_msg_gimbal_torque_cmd_report_get_target_system(msg);
gimbal_torque_cmd_report->target_component = mavlink_msg_gimbal_torque_cmd_report_get_target_component(msg);
#else
memcpy(gimbal_torque_cmd_report, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
#endif
}
// MESSAGE GOPRO_COMMAND PACKING
#define MAVLINK_MSG_ID_GOPRO_COMMAND 217
typedef struct __mavlink_gopro_command_t
{
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
uint8_t gp_cmd_name_1; /*< First character of the 2 character GoPro command*/
uint8_t gp_cmd_name_2; /*< Second character of the 2 character GoPro command*/
uint8_t gp_cmd_parm; /*< Parameter for the command*/
} mavlink_gopro_command_t;
#define MAVLINK_MSG_ID_GOPRO_COMMAND_LEN 5
#define MAVLINK_MSG_ID_217_LEN 5
#define MAVLINK_MSG_ID_GOPRO_COMMAND_CRC 43
#define MAVLINK_MSG_ID_217_CRC 43
#define MAVLINK_MESSAGE_INFO_GOPRO_COMMAND { \
"GOPRO_COMMAND", \
5, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_command_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_command_t, target_component) }, \
{ "gp_cmd_name_1", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gopro_command_t, gp_cmd_name_1) }, \
{ "gp_cmd_name_2", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_gopro_command_t, gp_cmd_name_2) }, \
{ "gp_cmd_parm", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_gopro_command_t, gp_cmd_parm) }, \
} \
}
/**
* @brief Pack a gopro_command message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param gp_cmd_name_1 First character of the 2 character GoPro command
* @param gp_cmd_name_2 Second character of the 2 character GoPro command
* @param gp_cmd_parm Parameter for the command
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_command_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint8_t gp_cmd_name_1, uint8_t gp_cmd_name_2, uint8_t gp_cmd_parm)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_COMMAND_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, gp_cmd_name_1);
_mav_put_uint8_t(buf, 3, gp_cmd_name_2);
_mav_put_uint8_t(buf, 4, gp_cmd_parm);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#else
mavlink_gopro_command_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.gp_cmd_name_1 = gp_cmd_name_1;
packet.gp_cmd_name_2 = gp_cmd_name_2;
packet.gp_cmd_parm = gp_cmd_parm;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_COMMAND;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN, MAVLINK_MSG_ID_GOPRO_COMMAND_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#endif
}
/**
* @brief Pack a gopro_command message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param gp_cmd_name_1 First character of the 2 character GoPro command
* @param gp_cmd_name_2 Second character of the 2 character GoPro command
* @param gp_cmd_parm Parameter for the command
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_command_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint8_t gp_cmd_name_1,uint8_t gp_cmd_name_2,uint8_t gp_cmd_parm)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_COMMAND_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, gp_cmd_name_1);
_mav_put_uint8_t(buf, 3, gp_cmd_name_2);
_mav_put_uint8_t(buf, 4, gp_cmd_parm);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#else
mavlink_gopro_command_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.gp_cmd_name_1 = gp_cmd_name_1;
packet.gp_cmd_name_2 = gp_cmd_name_2;
packet.gp_cmd_parm = gp_cmd_parm;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_COMMAND;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN, MAVLINK_MSG_ID_GOPRO_COMMAND_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#endif
}
/**
* @brief Encode a gopro_command struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gopro_command C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_command_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_command_t* gopro_command)
{
return mavlink_msg_gopro_command_pack(system_id, component_id, msg, gopro_command->target_system, gopro_command->target_component, gopro_command->gp_cmd_name_1, gopro_command->gp_cmd_name_2, gopro_command->gp_cmd_parm);
}
/**
* @brief Encode a gopro_command struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gopro_command C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_command_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_command_t* gopro_command)
{
return mavlink_msg_gopro_command_pack_chan(system_id, component_id, chan, msg, gopro_command->target_system, gopro_command->target_component, gopro_command->gp_cmd_name_1, gopro_command->gp_cmd_name_2, gopro_command->gp_cmd_parm);
}
/**
* @brief Send a gopro_command message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param gp_cmd_name_1 First character of the 2 character GoPro command
* @param gp_cmd_name_2 Second character of the 2 character GoPro command
* @param gp_cmd_parm Parameter for the command
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gopro_command_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t gp_cmd_name_1, uint8_t gp_cmd_name_2, uint8_t gp_cmd_parm)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_COMMAND_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, gp_cmd_name_1);
_mav_put_uint8_t(buf, 3, gp_cmd_name_2);
_mav_put_uint8_t(buf, 4, gp_cmd_parm);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_COMMAND, buf, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN, MAVLINK_MSG_ID_GOPRO_COMMAND_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_COMMAND, buf, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#endif
#else
mavlink_gopro_command_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.gp_cmd_name_1 = gp_cmd_name_1;
packet.gp_cmd_name_2 = gp_cmd_name_2;
packet.gp_cmd_parm = gp_cmd_parm;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_COMMAND, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN, MAVLINK_MSG_ID_GOPRO_COMMAND_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_COMMAND, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GOPRO_COMMAND_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gopro_command_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t gp_cmd_name_1, uint8_t gp_cmd_name_2, uint8_t gp_cmd_parm)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, gp_cmd_name_1);
_mav_put_uint8_t(buf, 3, gp_cmd_name_2);
_mav_put_uint8_t(buf, 4, gp_cmd_parm);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_COMMAND, buf, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN, MAVLINK_MSG_ID_GOPRO_COMMAND_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_COMMAND, buf, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#endif
#else
mavlink_gopro_command_t *packet = (mavlink_gopro_command_t *)msgbuf;
packet->target_system = target_system;
packet->target_component = target_component;
packet->gp_cmd_name_1 = gp_cmd_name_1;
packet->gp_cmd_name_2 = gp_cmd_name_2;
packet->gp_cmd_parm = gp_cmd_parm;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_COMMAND, (const char *)packet, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN, MAVLINK_MSG_ID_GOPRO_COMMAND_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_COMMAND, (const char *)packet, MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GOPRO_COMMAND UNPACKING
/**
* @brief Get field target_system from gopro_command message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gopro_command_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gopro_command message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gopro_command_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field gp_cmd_name_1 from gopro_command message
*
* @return First character of the 2 character GoPro command
*/
static inline uint8_t mavlink_msg_gopro_command_get_gp_cmd_name_1(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field gp_cmd_name_2 from gopro_command message
*
* @return Second character of the 2 character GoPro command
*/
static inline uint8_t mavlink_msg_gopro_command_get_gp_cmd_name_2(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Get field gp_cmd_parm from gopro_command message
*
* @return Parameter for the command
*/
static inline uint8_t mavlink_msg_gopro_command_get_gp_cmd_parm(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Decode a gopro_command message into a struct
*
* @param msg The message to decode
* @param gopro_command C-struct to decode the message contents into
*/
static inline void mavlink_msg_gopro_command_decode(const mavlink_message_t* msg, mavlink_gopro_command_t* gopro_command)
{
#if MAVLINK_NEED_BYTE_SWAP
gopro_command->target_system = mavlink_msg_gopro_command_get_target_system(msg);
gopro_command->target_component = mavlink_msg_gopro_command_get_target_component(msg);
gopro_command->gp_cmd_name_1 = mavlink_msg_gopro_command_get_gp_cmd_name_1(msg);
gopro_command->gp_cmd_name_2 = mavlink_msg_gopro_command_get_gp_cmd_name_2(msg);
gopro_command->gp_cmd_parm = mavlink_msg_gopro_command_get_gp_cmd_parm(msg);
#else
memcpy(gopro_command, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_COMMAND_LEN);
#endif
}
// MESSAGE GOPRO_POWER_ON PACKING
// MESSAGE GOPRO_GET_REQUEST PACKING
#define MAVLINK_MSG_ID_GOPRO_POWER_ON 215
#define MAVLINK_MSG_ID_GOPRO_GET_REQUEST 216
typedef struct __mavlink_gopro_power_on_t
typedef struct __mavlink_gopro_get_request_t
{
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
} mavlink_gopro_power_on_t;
uint8_t cmd_id; /*< Command ID*/
} mavlink_gopro_get_request_t;
#define MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN 2
#define MAVLINK_MSG_ID_215_LEN 2
#define MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN 3
#define MAVLINK_MSG_ID_216_LEN 3
#define MAVLINK_MSG_ID_GOPRO_POWER_ON_CRC 241
#define MAVLINK_MSG_ID_215_CRC 241
#define MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC 50
#define MAVLINK_MSG_ID_216_CRC 50
#define MAVLINK_MESSAGE_INFO_GOPRO_POWER_ON { \
"GOPRO_POWER_ON", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_power_on_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_power_on_t, target_component) }, \
#define MAVLINK_MESSAGE_INFO_GOPRO_GET_REQUEST { \
"GOPRO_GET_REQUEST", \
3, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_get_request_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_get_request_t, target_component) }, \
{ "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gopro_get_request_t, cmd_id) }, \
} \
}
/**
* @brief Pack a gopro_power_on message
* @brief Pack a gopro_get_request message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_power_on_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component)
static inline uint16_t mavlink_msg_gopro_get_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint8_t cmd_id)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN];
char buf[MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#else
mavlink_gopro_power_on_t packet;
mavlink_gopro_get_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.cmd_id = cmd_id;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_POWER_ON;
msg->msgid = MAVLINK_MSG_ID_GOPRO_GET_REQUEST;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN, MAVLINK_MSG_ID_GOPRO_POWER_ON_CRC);
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
}
/**
* @brief Pack a gopro_power_on message on a channel
* @brief Pack a gopro_get_request message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_power_on_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
static inline uint16_t mavlink_msg_gopro_get_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component)
uint8_t target_system,uint8_t target_component,uint8_t cmd_id)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN];
char buf[MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#else
mavlink_gopro_power_on_t packet;
mavlink_gopro_get_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.cmd_id = cmd_id;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_POWER_ON;
msg->msgid = MAVLINK_MSG_ID_GOPRO_GET_REQUEST;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN, MAVLINK_MSG_ID_GOPRO_POWER_ON_CRC);
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
}
/**
* @brief Encode a gopro_power_on struct
* @brief Encode a gopro_get_request struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gopro_power_on C-struct to read the message contents from
* @param gopro_get_request C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_power_on_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_power_on_t* gopro_power_on)
static inline uint16_t mavlink_msg_gopro_get_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_get_request_t* gopro_get_request)
{
return mavlink_msg_gopro_power_on_pack(system_id, component_id, msg, gopro_power_on->target_system, gopro_power_on->target_component);
return mavlink_msg_gopro_get_request_pack(system_id, component_id, msg, gopro_get_request->target_system, gopro_get_request->target_component, gopro_get_request->cmd_id);
}
/**
* @brief Encode a gopro_power_on struct on a channel
* @brief Encode a gopro_get_request struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gopro_power_on C-struct to read the message contents from
* @param gopro_get_request C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_power_on_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_power_on_t* gopro_power_on)
static inline uint16_t mavlink_msg_gopro_get_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_get_request_t* gopro_get_request)
{
return mavlink_msg_gopro_power_on_pack_chan(system_id, component_id, chan, msg, gopro_power_on->target_system, gopro_power_on->target_component);
return mavlink_msg_gopro_get_request_pack_chan(system_id, component_id, chan, msg, gopro_get_request->target_system, gopro_get_request->target_component, gopro_get_request->cmd_id);
}
/**
* @brief Send a gopro_power_on message
* @brief Send a gopro_get_request message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gopro_power_on_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
static inline void mavlink_msg_gopro_get_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN];
char buf[MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_ON, buf, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN, MAVLINK_MSG_ID_GOPRO_POWER_ON_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_ON, buf, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
#else
mavlink_gopro_power_on_t packet;
mavlink_gopro_get_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.cmd_id = cmd_id;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_ON, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN, MAVLINK_MSG_ID_GOPRO_POWER_ON_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_ON, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN <= MAVLINK_MAX_PAYLOAD_LEN
#if MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
......@@ -165,27 +176,29 @@ static inline void mavlink_msg_gopro_power_on_send(mavlink_channel_t chan, uint8
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gopro_power_on_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
static inline void mavlink_msg_gopro_get_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_ON, buf, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN, MAVLINK_MSG_ID_GOPRO_POWER_ON_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_ON, buf, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
#else
mavlink_gopro_power_on_t *packet = (mavlink_gopro_power_on_t *)msgbuf;
mavlink_gopro_get_request_t *packet = (mavlink_gopro_get_request_t *)msgbuf;
packet->target_system = target_system;
packet->target_component = target_component;
packet->cmd_id = cmd_id;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_ON, (const char *)packet, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN, MAVLINK_MSG_ID_GOPRO_POWER_ON_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, (const char *)packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_ON, (const char *)packet, MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_REQUEST, (const char *)packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
#endif
}
......@@ -193,41 +206,52 @@ static inline void mavlink_msg_gopro_power_on_send_buf(mavlink_message_t *msgbuf
#endif
// MESSAGE GOPRO_POWER_ON UNPACKING
// MESSAGE GOPRO_GET_REQUEST UNPACKING
/**
* @brief Get field target_system from gopro_power_on message
* @brief Get field target_system from gopro_get_request message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gopro_power_on_get_target_system(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_gopro_get_request_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gopro_power_on message
* @brief Get field target_component from gopro_get_request message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gopro_power_on_get_target_component(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_gopro_get_request_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gopro_power_on message into a struct
* @brief Get field cmd_id from gopro_get_request message
*
* @return Command ID
*/
static inline uint8_t mavlink_msg_gopro_get_request_get_cmd_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Decode a gopro_get_request message into a struct
*
* @param msg The message to decode
* @param gopro_power_on C-struct to decode the message contents into
* @param gopro_get_request C-struct to decode the message contents into
*/
static inline void mavlink_msg_gopro_power_on_decode(const mavlink_message_t* msg, mavlink_gopro_power_on_t* gopro_power_on)
static inline void mavlink_msg_gopro_get_request_decode(const mavlink_message_t* msg, mavlink_gopro_get_request_t* gopro_get_request)
{
#if MAVLINK_NEED_BYTE_SWAP
gopro_power_on->target_system = mavlink_msg_gopro_power_on_get_target_system(msg);
gopro_power_on->target_component = mavlink_msg_gopro_power_on_get_target_component(msg);
gopro_get_request->target_system = mavlink_msg_gopro_get_request_get_target_system(msg);
gopro_get_request->target_component = mavlink_msg_gopro_get_request_get_target_component(msg);
gopro_get_request->cmd_id = mavlink_msg_gopro_get_request_get_cmd_id(msg);
#else
memcpy(gopro_power_on, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_POWER_ON_LEN);
memcpy(gopro_get_request, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
#endif
}
// MESSAGE GOPRO_GET_RESPONSE PACKING
#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE 217
typedef struct __mavlink_gopro_get_response_t
{
uint8_t cmd_id; /*< Command ID*/
uint8_t status; /*< Status*/
uint8_t value[4]; /*< Value*/
} mavlink_gopro_get_response_t;
#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN 6
#define MAVLINK_MSG_ID_217_LEN 6
#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC 202
#define MAVLINK_MSG_ID_217_CRC 202
#define MAVLINK_MSG_GOPRO_GET_RESPONSE_FIELD_VALUE_LEN 4
#define MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE { \
"GOPRO_GET_RESPONSE", \
3, \
{ { "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_get_response_t, cmd_id) }, \
{ "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_get_response_t, status) }, \
{ "value", NULL, MAVLINK_TYPE_UINT8_T, 4, 2, offsetof(mavlink_gopro_get_response_t, value) }, \
} \
}
/**
* @brief Pack a gopro_get_response message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param cmd_id Command ID
* @param status Status
* @param value Value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_get_response_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t cmd_id, uint8_t status, const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
_mav_put_uint8_t_array(buf, 2, value, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#else
mavlink_gopro_get_response_t packet;
packet.cmd_id = cmd_id;
packet.status = status;
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_GET_RESPONSE;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
}
/**
* @brief Pack a gopro_get_response message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param cmd_id Command ID
* @param status Status
* @param value Value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_get_response_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t cmd_id,uint8_t status,const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
_mav_put_uint8_t_array(buf, 2, value, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#else
mavlink_gopro_get_response_t packet;
packet.cmd_id = cmd_id;
packet.status = status;
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_GET_RESPONSE;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
}
/**
* @brief Encode a gopro_get_response struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gopro_get_response C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_get_response_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_get_response_t* gopro_get_response)
{
return mavlink_msg_gopro_get_response_pack(system_id, component_id, msg, gopro_get_response->cmd_id, gopro_get_response->status, gopro_get_response->value);
}
/**
* @brief Encode a gopro_get_response struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gopro_get_response C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_get_response_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_get_response_t* gopro_get_response)
{
return mavlink_msg_gopro_get_response_pack_chan(system_id, component_id, chan, msg, gopro_get_response->cmd_id, gopro_get_response->status, gopro_get_response->value);
}
/**
* @brief Send a gopro_get_response message
* @param chan MAVLink channel to send the message
*
* @param cmd_id Command ID
* @param status Status
* @param value Value
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gopro_get_response_send(mavlink_channel_t chan, uint8_t cmd_id, uint8_t status, const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
_mav_put_uint8_t_array(buf, 2, value, 4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
#else
mavlink_gopro_get_response_t packet;
packet.cmd_id = cmd_id;
packet.status = status;
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gopro_get_response_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t cmd_id, uint8_t status, const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
_mav_put_uint8_t_array(buf, 2, value, 4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
#else
mavlink_gopro_get_response_t *packet = (mavlink_gopro_get_response_t *)msgbuf;
packet->cmd_id = cmd_id;
packet->status = status;
mav_array_memcpy(packet->value, value, sizeof(uint8_t)*4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GOPRO_GET_RESPONSE UNPACKING
/**
* @brief Get field cmd_id from gopro_get_response message
*
* @return Command ID
*/
static inline uint8_t mavlink_msg_gopro_get_response_get_cmd_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field status from gopro_get_response message
*
* @return Status
*/
static inline uint8_t mavlink_msg_gopro_get_response_get_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Get field value from gopro_get_response message
*
* @return Value
*/
static inline uint16_t mavlink_msg_gopro_get_response_get_value(const mavlink_message_t* msg, uint8_t *value)
{
return _MAV_RETURN_uint8_t_array(msg, value, 4, 2);
}
/**
* @brief Decode a gopro_get_response message into a struct
*
* @param msg The message to decode
* @param gopro_get_response C-struct to decode the message contents into
*/
static inline void mavlink_msg_gopro_get_response_decode(const mavlink_message_t* msg, mavlink_gopro_get_response_t* gopro_get_response)
{
#if MAVLINK_NEED_BYTE_SWAP
gopro_get_response->cmd_id = mavlink_msg_gopro_get_response_get_cmd_id(msg);
gopro_get_response->status = mavlink_msg_gopro_get_response_get_status(msg);
mavlink_msg_gopro_get_response_get_value(msg, gopro_get_response->value);
#else
memcpy(gopro_get_response, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
#endif
}
// MESSAGE GOPRO_POWER_OFF PACKING
// MESSAGE GOPRO_HEARTBEAT PACKING
#define MAVLINK_MSG_ID_GOPRO_POWER_OFF 216
#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT 215
typedef struct __mavlink_gopro_power_off_t
typedef struct __mavlink_gopro_heartbeat_t
{
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
} mavlink_gopro_power_off_t;
uint8_t status; /*< Status*/
uint8_t capture_mode; /*< Current capture mode*/
uint8_t flags; /*< additional status bits*/
} mavlink_gopro_heartbeat_t;
#define MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN 2
#define MAVLINK_MSG_ID_216_LEN 2
#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN 3
#define MAVLINK_MSG_ID_215_LEN 3
#define MAVLINK_MSG_ID_GOPRO_POWER_OFF_CRC 155
#define MAVLINK_MSG_ID_216_CRC 155
#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC 101
#define MAVLINK_MSG_ID_215_CRC 101
#define MAVLINK_MESSAGE_INFO_GOPRO_POWER_OFF { \
"GOPRO_POWER_OFF", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_power_off_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_power_off_t, target_component) }, \
#define MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT { \
"GOPRO_HEARTBEAT", \
3, \
{ { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_heartbeat_t, status) }, \
{ "capture_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_heartbeat_t, capture_mode) }, \
{ "flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gopro_heartbeat_t, flags) }, \
} \
}
/**
* @brief Pack a gopro_power_off message
* @brief Pack a gopro_heartbeat message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param status Status
* @param capture_mode Current capture mode
* @param flags additional status bits
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_power_off_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component)
static inline uint16_t mavlink_msg_gopro_heartbeat_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t status, uint8_t capture_mode, uint8_t flags)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN];
_mav_put_uint8_t(buf, 0, status);
_mav_put_uint8_t(buf, 1, capture_mode);
_mav_put_uint8_t(buf, 2, flags);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#else
mavlink_gopro_power_off_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
mavlink_gopro_heartbeat_t packet;
packet.status = status;
packet.capture_mode = capture_mode;
packet.flags = flags;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_POWER_OFF;
msg->msgid = MAVLINK_MSG_ID_GOPRO_HEARTBEAT;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN, MAVLINK_MSG_ID_GOPRO_POWER_OFF_CRC);
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
}
/**
* @brief Pack a gopro_power_off message on a channel
* @brief Pack a gopro_heartbeat message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param status Status
* @param capture_mode Current capture mode
* @param flags additional status bits
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_power_off_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
static inline uint16_t mavlink_msg_gopro_heartbeat_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component)
uint8_t status,uint8_t capture_mode,uint8_t flags)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN];
_mav_put_uint8_t(buf, 0, status);
_mav_put_uint8_t(buf, 1, capture_mode);
_mav_put_uint8_t(buf, 2, flags);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#else
mavlink_gopro_power_off_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
mavlink_gopro_heartbeat_t packet;
packet.status = status;
packet.capture_mode = capture_mode;
packet.flags = flags;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_POWER_OFF;
msg->msgid = MAVLINK_MSG_ID_GOPRO_HEARTBEAT;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN, MAVLINK_MSG_ID_GOPRO_POWER_OFF_CRC);
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
}
/**
* @brief Encode a gopro_power_off struct
* @brief Encode a gopro_heartbeat struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gopro_power_off C-struct to read the message contents from
* @param gopro_heartbeat C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_power_off_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_power_off_t* gopro_power_off)
static inline uint16_t mavlink_msg_gopro_heartbeat_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_heartbeat_t* gopro_heartbeat)
{
return mavlink_msg_gopro_power_off_pack(system_id, component_id, msg, gopro_power_off->target_system, gopro_power_off->target_component);
return mavlink_msg_gopro_heartbeat_pack(system_id, component_id, msg, gopro_heartbeat->status, gopro_heartbeat->capture_mode, gopro_heartbeat->flags);
}
/**
* @brief Encode a gopro_power_off struct on a channel
* @brief Encode a gopro_heartbeat struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gopro_power_off C-struct to read the message contents from
* @param gopro_heartbeat C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_power_off_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_power_off_t* gopro_power_off)
static inline uint16_t mavlink_msg_gopro_heartbeat_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_heartbeat_t* gopro_heartbeat)
{
return mavlink_msg_gopro_power_off_pack_chan(system_id, component_id, chan, msg, gopro_power_off->target_system, gopro_power_off->target_component);
return mavlink_msg_gopro_heartbeat_pack_chan(system_id, component_id, chan, msg, gopro_heartbeat->status, gopro_heartbeat->capture_mode, gopro_heartbeat->flags);
}
/**
* @brief Send a gopro_power_off message
* @brief Send a gopro_heartbeat message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param status Status
* @param capture_mode Current capture mode
* @param flags additional status bits
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gopro_power_off_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
static inline void mavlink_msg_gopro_heartbeat_send(mavlink_channel_t chan, uint8_t status, uint8_t capture_mode, uint8_t flags)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN];
_mav_put_uint8_t(buf, 0, status);
_mav_put_uint8_t(buf, 1, capture_mode);
_mav_put_uint8_t(buf, 2, flags);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_OFF, buf, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN, MAVLINK_MSG_ID_GOPRO_POWER_OFF_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_OFF, buf, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
#else
mavlink_gopro_power_off_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
mavlink_gopro_heartbeat_t packet;
packet.status = status;
packet.capture_mode = capture_mode;
packet.flags = flags;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_OFF, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN, MAVLINK_MSG_ID_GOPRO_POWER_OFF_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_OFF, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN <= MAVLINK_MAX_PAYLOAD_LEN
#if MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
......@@ -165,27 +176,29 @@ static inline void mavlink_msg_gopro_power_off_send(mavlink_channel_t chan, uint
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gopro_power_off_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
static inline void mavlink_msg_gopro_heartbeat_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t status, uint8_t capture_mode, uint8_t flags)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 0, status);
_mav_put_uint8_t(buf, 1, capture_mode);
_mav_put_uint8_t(buf, 2, flags);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_OFF, buf, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN, MAVLINK_MSG_ID_GOPRO_POWER_OFF_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_OFF, buf, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
#else
mavlink_gopro_power_off_t *packet = (mavlink_gopro_power_off_t *)msgbuf;
packet->target_system = target_system;
packet->target_component = target_component;
mavlink_gopro_heartbeat_t *packet = (mavlink_gopro_heartbeat_t *)msgbuf;
packet->status = status;
packet->capture_mode = capture_mode;
packet->flags = flags;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_OFF, (const char *)packet, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN, MAVLINK_MSG_ID_GOPRO_POWER_OFF_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, (const char *)packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_POWER_OFF, (const char *)packet, MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, (const char *)packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
#endif
}
......@@ -193,41 +206,52 @@ static inline void mavlink_msg_gopro_power_off_send_buf(mavlink_message_t *msgbu
#endif
// MESSAGE GOPRO_POWER_OFF UNPACKING
// MESSAGE GOPRO_HEARTBEAT UNPACKING
/**
* @brief Get field target_system from gopro_power_off message
* @brief Get field status from gopro_heartbeat message
*
* @return System ID
* @return Status
*/
static inline uint8_t mavlink_msg_gopro_power_off_get_target_system(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_gopro_heartbeat_get_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gopro_power_off message
* @brief Get field capture_mode from gopro_heartbeat message
*
* @return Component ID
* @return Current capture mode
*/
static inline uint8_t mavlink_msg_gopro_power_off_get_target_component(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_gopro_heartbeat_get_capture_mode(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gopro_power_off message into a struct
* @brief Get field flags from gopro_heartbeat message
*
* @return additional status bits
*/
static inline uint8_t mavlink_msg_gopro_heartbeat_get_flags(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Decode a gopro_heartbeat message into a struct
*
* @param msg The message to decode
* @param gopro_power_off C-struct to decode the message contents into
* @param gopro_heartbeat C-struct to decode the message contents into
*/
static inline void mavlink_msg_gopro_power_off_decode(const mavlink_message_t* msg, mavlink_gopro_power_off_t* gopro_power_off)
static inline void mavlink_msg_gopro_heartbeat_decode(const mavlink_message_t* msg, mavlink_gopro_heartbeat_t* gopro_heartbeat)
{
#if MAVLINK_NEED_BYTE_SWAP
gopro_power_off->target_system = mavlink_msg_gopro_power_off_get_target_system(msg);
gopro_power_off->target_component = mavlink_msg_gopro_power_off_get_target_component(msg);
gopro_heartbeat->status = mavlink_msg_gopro_heartbeat_get_status(msg);
gopro_heartbeat->capture_mode = mavlink_msg_gopro_heartbeat_get_capture_mode(msg);
gopro_heartbeat->flags = mavlink_msg_gopro_heartbeat_get_flags(msg);
#else
memcpy(gopro_power_off, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_POWER_OFF_LEN);
memcpy(gopro_heartbeat, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
#endif
}
// MESSAGE GOPRO_RESPONSE PACKING
#define MAVLINK_MSG_ID_GOPRO_RESPONSE 218
typedef struct __mavlink_gopro_response_t
{
uint16_t gp_cmd_result; /*< Result of the command attempt to the GoPro, as defined by GOPRO_CMD_RESULT enum.*/
uint8_t gp_cmd_name_1; /*< First character of the 2 character GoPro command that generated this response*/
uint8_t gp_cmd_name_2; /*< Second character of the 2 character GoPro command that generated this response*/
uint8_t gp_cmd_response_status; /*< Response byte from the GoPro's response to the command. 0 = Success, 1 = Failure*/
uint8_t gp_cmd_response_argument; /*< Response argument from the GoPro's response to the command*/
} mavlink_gopro_response_t;
#define MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN 6
#define MAVLINK_MSG_ID_218_LEN 6
#define MAVLINK_MSG_ID_GOPRO_RESPONSE_CRC 149
#define MAVLINK_MSG_ID_218_CRC 149
#define MAVLINK_MESSAGE_INFO_GOPRO_RESPONSE { \
"GOPRO_RESPONSE", \
5, \
{ { "gp_cmd_result", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_gopro_response_t, gp_cmd_result) }, \
{ "gp_cmd_name_1", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gopro_response_t, gp_cmd_name_1) }, \
{ "gp_cmd_name_2", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_gopro_response_t, gp_cmd_name_2) }, \
{ "gp_cmd_response_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_gopro_response_t, gp_cmd_response_status) }, \
{ "gp_cmd_response_argument", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_gopro_response_t, gp_cmd_response_argument) }, \
} \
}
/**
* @brief Pack a gopro_response message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param gp_cmd_name_1 First character of the 2 character GoPro command that generated this response
* @param gp_cmd_name_2 Second character of the 2 character GoPro command that generated this response
* @param gp_cmd_response_status Response byte from the GoPro's response to the command. 0 = Success, 1 = Failure
* @param gp_cmd_response_argument Response argument from the GoPro's response to the command
* @param gp_cmd_result Result of the command attempt to the GoPro, as defined by GOPRO_CMD_RESULT enum.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_response_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t gp_cmd_name_1, uint8_t gp_cmd_name_2, uint8_t gp_cmd_response_status, uint8_t gp_cmd_response_argument, uint16_t gp_cmd_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN];
_mav_put_uint16_t(buf, 0, gp_cmd_result);
_mav_put_uint8_t(buf, 2, gp_cmd_name_1);
_mav_put_uint8_t(buf, 3, gp_cmd_name_2);
_mav_put_uint8_t(buf, 4, gp_cmd_response_status);
_mav_put_uint8_t(buf, 5, gp_cmd_response_argument);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#else
mavlink_gopro_response_t packet;
packet.gp_cmd_result = gp_cmd_result;
packet.gp_cmd_name_1 = gp_cmd_name_1;
packet.gp_cmd_name_2 = gp_cmd_name_2;
packet.gp_cmd_response_status = gp_cmd_response_status;
packet.gp_cmd_response_argument = gp_cmd_response_argument;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_RESPONSE;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_RESPONSE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#endif
}
/**
* @brief Pack a gopro_response message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gp_cmd_name_1 First character of the 2 character GoPro command that generated this response
* @param gp_cmd_name_2 Second character of the 2 character GoPro command that generated this response
* @param gp_cmd_response_status Response byte from the GoPro's response to the command. 0 = Success, 1 = Failure
* @param gp_cmd_response_argument Response argument from the GoPro's response to the command
* @param gp_cmd_result Result of the command attempt to the GoPro, as defined by GOPRO_CMD_RESULT enum.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gopro_response_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t gp_cmd_name_1,uint8_t gp_cmd_name_2,uint8_t gp_cmd_response_status,uint8_t gp_cmd_response_argument,uint16_t gp_cmd_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN];
_mav_put_uint16_t(buf, 0, gp_cmd_result);
_mav_put_uint8_t(buf, 2, gp_cmd_name_1);
_mav_put_uint8_t(buf, 3, gp_cmd_name_2);
_mav_put_uint8_t(buf, 4, gp_cmd_response_status);
_mav_put_uint8_t(buf, 5, gp_cmd_response_argument);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#else
mavlink_gopro_response_t packet;
packet.gp_cmd_result = gp_cmd_result;
packet.gp_cmd_name_1 = gp_cmd_name_1;
packet.gp_cmd_name_2 = gp_cmd_name_2;
packet.gp_cmd_response_status = gp_cmd_response_status;
packet.gp_cmd_response_argument = gp_cmd_response_argument;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GOPRO_RESPONSE;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_RESPONSE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#endif
}
/**
* @brief Encode a gopro_response struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gopro_response C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_response_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_response_t* gopro_response)
{
return mavlink_msg_gopro_response_pack(system_id, component_id, msg, gopro_response->gp_cmd_name_1, gopro_response->gp_cmd_name_2, gopro_response->gp_cmd_response_status, gopro_response->gp_cmd_response_argument, gopro_response->gp_cmd_result);
}
/**
* @brief Encode a gopro_response struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gopro_response C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gopro_response_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_response_t* gopro_response)
{
return mavlink_msg_gopro_response_pack_chan(system_id, component_id, chan, msg, gopro_response->gp_cmd_name_1, gopro_response->gp_cmd_name_2, gopro_response->gp_cmd_response_status, gopro_response->gp_cmd_response_argument, gopro_response->gp_cmd_result);
}
/**
* @brief Send a gopro_response message
* @param chan MAVLink channel to send the message
*
* @param gp_cmd_name_1 First character of the 2 character GoPro command that generated this response
* @param gp_cmd_name_2 Second character of the 2 character GoPro command that generated this response
* @param gp_cmd_response_status Response byte from the GoPro's response to the command. 0 = Success, 1 = Failure
* @param gp_cmd_response_argument Response argument from the GoPro's response to the command
* @param gp_cmd_result Result of the command attempt to the GoPro, as defined by GOPRO_CMD_RESULT enum.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gopro_response_send(mavlink_channel_t chan, uint8_t gp_cmd_name_1, uint8_t gp_cmd_name_2, uint8_t gp_cmd_response_status, uint8_t gp_cmd_response_argument, uint16_t gp_cmd_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN];
_mav_put_uint16_t(buf, 0, gp_cmd_result);
_mav_put_uint8_t(buf, 2, gp_cmd_name_1);
_mav_put_uint8_t(buf, 3, gp_cmd_name_2);
_mav_put_uint8_t(buf, 4, gp_cmd_response_status);
_mav_put_uint8_t(buf, 5, gp_cmd_response_argument);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#endif
#else
mavlink_gopro_response_t packet;
packet.gp_cmd_result = gp_cmd_result;
packet.gp_cmd_name_1 = gp_cmd_name_1;
packet.gp_cmd_name_2 = gp_cmd_name_2;
packet.gp_cmd_response_status = gp_cmd_response_status;
packet.gp_cmd_response_argument = gp_cmd_response_argument;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gopro_response_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t gp_cmd_name_1, uint8_t gp_cmd_name_2, uint8_t gp_cmd_response_status, uint8_t gp_cmd_response_argument, uint16_t gp_cmd_result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint16_t(buf, 0, gp_cmd_result);
_mav_put_uint8_t(buf, 2, gp_cmd_name_1);
_mav_put_uint8_t(buf, 3, gp_cmd_name_2);
_mav_put_uint8_t(buf, 4, gp_cmd_response_status);
_mav_put_uint8_t(buf, 5, gp_cmd_response_argument);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#endif
#else
mavlink_gopro_response_t *packet = (mavlink_gopro_response_t *)msgbuf;
packet->gp_cmd_result = gp_cmd_result;
packet->gp_cmd_name_1 = gp_cmd_name_1;
packet->gp_cmd_name_2 = gp_cmd_name_2;
packet->gp_cmd_response_status = gp_cmd_response_status;
packet->gp_cmd_response_argument = gp_cmd_response_argument;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#endif
#endif
}
#endif
#endif
// MESSAGE GOPRO_RESPONSE UNPACKING
/**
* @brief Get field gp_cmd_name_1 from gopro_response message
*
* @return First character of the 2 character GoPro command that generated this response
*/
static inline uint8_t mavlink_msg_gopro_response_get_gp_cmd_name_1(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field gp_cmd_name_2 from gopro_response message
*
* @return Second character of the 2 character GoPro command that generated this response
*/
static inline uint8_t mavlink_msg_gopro_response_get_gp_cmd_name_2(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 3);
}
/**
* @brief Get field gp_cmd_response_status from gopro_response message
*
* @return Response byte from the GoPro's response to the command. 0 = Success, 1 = Failure
*/
static inline uint8_t mavlink_msg_gopro_response_get_gp_cmd_response_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Get field gp_cmd_response_argument from gopro_response message
*
* @return Response argument from the GoPro's response to the command
*/
static inline uint8_t mavlink_msg_gopro_response_get_gp_cmd_response_argument(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
/**
* @brief Get field gp_cmd_result from gopro_response message
*
* @return Result of the command attempt to the GoPro, as defined by GOPRO_CMD_RESULT enum.
*/
static inline uint16_t mavlink_msg_gopro_response_get_gp_cmd_result(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Decode a gopro_response message into a struct
*
* @param msg The message to decode
* @param gopro_response C-struct to decode the message contents into
*/
static inline void mavlink_msg_gopro_response_decode(const mavlink_message_t* msg, mavlink_gopro_response_t* gopro_response)
{
#if MAVLINK_NEED_BYTE_SWAP
gopro_response->gp_cmd_result = mavlink_msg_gopro_response_get_gp_cmd_result(msg);
gopro_response->gp_cmd_name_1 = mavlink_msg_gopro_response_get_gp_cmd_name_1(msg);
gopro_response->gp_cmd_name_2 = mavlink_msg_gopro_response_get_gp_cmd_name_2(msg);
gopro_response->gp_cmd_response_status = mavlink_msg_gopro_response_get_gp_cmd_response_status(msg);
gopro_response->gp_cmd_response_argument = mavlink_msg_gopro_response_get_gp_cmd_response_argument(msg);
#else
memcpy(gopro_response, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_RESPONSE_LEN);
#endif
}
// MESSAGE GIMBAL_PERFORM_FACTORY_TESTS PACKING
// MESSAGE GOPRO_SET_REQUEST PACKING
#define MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS 209
#define MAVLINK_MSG_ID_GOPRO_SET_REQUEST 218
typedef struct __mavlink_gimbal_perform_factory_tests_t
typedef struct __mavlink_gopro_set_request_t
{
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
} mavlink_gimbal_perform_factory_tests_t;
uint8_t cmd_id; /*< Command ID*/
uint8_t value[4]; /*< Value*/
} mavlink_gopro_set_request_t;
#define MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN 2
#define MAVLINK_MSG_ID_209_LEN 2
#define MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN 7
#define MAVLINK_MSG_ID_218_LEN 7
#define MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC 226
#define MAVLINK_MSG_ID_209_CRC 226
#define MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC 17
#define MAVLINK_MSG_ID_218_CRC 17
#define MAVLINK_MSG_GOPRO_SET_REQUEST_FIELD_VALUE_LEN 4
#define MAVLINK_MESSAGE_INFO_GIMBAL_PERFORM_FACTORY_TESTS { \
"GIMBAL_PERFORM_FACTORY_TESTS", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_perform_factory_tests_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_perform_factory_tests_t, target_component) }, \
#define MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST { \
"GOPRO_SET_REQUEST", \
4, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_set_request_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_set_request_t, target_component) }, \
{ "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gopro_set_request_t, cmd_id) }, \
{ "value", NULL, MAVLINK_TYPE_UINT8_T, 4, 3, offsetof(mavlink_gopro_set_request_t, value) }, \
} \
}
/**
* @brief Pack a gimbal_perform_factory_tests message
* @brief Pack a gopro_set_request message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @param value Value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_perform_factory_tests_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component)
static inline uint16_t mavlink_msg_gopro_set_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint8_t cmd_id, const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN];
char buf[MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
_mav_put_uint8_t(buf, 2, cmd_id);
_mav_put_uint8_t_array(buf, 3, value, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#else
mavlink_gimbal_perform_factory_tests_t packet;
mavlink_gopro_set_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
packet.cmd_id = cmd_id;
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS;
msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_REQUEST;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
}
/**
* @brief Pack a gimbal_perform_factory_tests message on a channel
* @brief Pack a gopro_set_request message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @param value Value
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_perform_factory_tests_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
static inline uint16_t mavlink_msg_gopro_set_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component)
uint8_t target_system,uint8_t target_component,uint8_t cmd_id,const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN];
char buf[MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
_mav_put_uint8_t(buf, 2, cmd_id);
_mav_put_uint8_t_array(buf, 3, value, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#else
mavlink_gimbal_perform_factory_tests_t packet;
mavlink_gopro_set_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
packet.cmd_id = cmd_id;
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS;
msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_REQUEST;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
}
/**
* @brief Encode a gimbal_perform_factory_tests struct
* @brief Encode a gopro_set_request struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gimbal_perform_factory_tests C-struct to read the message contents from
* @param gopro_set_request C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_perform_factory_tests_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_perform_factory_tests_t* gimbal_perform_factory_tests)
static inline uint16_t mavlink_msg_gopro_set_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_set_request_t* gopro_set_request)
{
return mavlink_msg_gimbal_perform_factory_tests_pack(system_id, component_id, msg, gimbal_perform_factory_tests->target_system, gimbal_perform_factory_tests->target_component);
return mavlink_msg_gopro_set_request_pack(system_id, component_id, msg, gopro_set_request->target_system, gopro_set_request->target_component, gopro_set_request->cmd_id, gopro_set_request->value);
}
/**
* @brief Encode a gimbal_perform_factory_tests struct on a channel
* @brief Encode a gopro_set_request struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gimbal_perform_factory_tests C-struct to read the message contents from
* @param gopro_set_request C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_perform_factory_tests_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_perform_factory_tests_t* gimbal_perform_factory_tests)
static inline uint16_t mavlink_msg_gopro_set_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_set_request_t* gopro_set_request)
{
return mavlink_msg_gimbal_perform_factory_tests_pack_chan(system_id, component_id, chan, msg, gimbal_perform_factory_tests->target_system, gimbal_perform_factory_tests->target_component);
return mavlink_msg_gopro_set_request_pack_chan(system_id, component_id, chan, msg, gopro_set_request->target_system, gopro_set_request->target_component, gopro_set_request->cmd_id, gopro_set_request->value);
}
/**
* @brief Send a gimbal_perform_factory_tests message
* @brief Send a gopro_set_request message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @param value Value
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_perform_factory_tests_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
static inline void mavlink_msg_gopro_set_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id, const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN];
char buf[MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
_mav_put_uint8_t_array(buf, 3, value, 4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
#else
mavlink_gimbal_perform_factory_tests_t packet;
mavlink_gopro_set_request_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.cmd_id = cmd_id;
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
#if MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
......@@ -165,27 +181,29 @@ static inline void mavlink_msg_gimbal_perform_factory_tests_send(mavlink_channel
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gimbal_perform_factory_tests_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
static inline void mavlink_msg_gopro_set_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id, const uint8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, cmd_id);
_mav_put_uint8_t_array(buf, 3, value, 4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
#else
mavlink_gimbal_perform_factory_tests_t *packet = (mavlink_gimbal_perform_factory_tests_t *)msgbuf;
mavlink_gopro_set_request_t *packet = (mavlink_gopro_set_request_t *)msgbuf;
packet->target_system = target_system;
packet->target_component = target_component;
packet->cmd_id = cmd_id;
mav_array_memcpy(packet->value, value, sizeof(uint8_t)*4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, (const char *)packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_REQUEST, (const char *)packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
#endif
}
......@@ -193,41 +211,63 @@ static inline void mavlink_msg_gimbal_perform_factory_tests_send_buf(mavlink_mes
#endif
// MESSAGE GIMBAL_PERFORM_FACTORY_TESTS UNPACKING
// MESSAGE GOPRO_SET_REQUEST UNPACKING
/**
* @brief Get field target_system from gimbal_perform_factory_tests message
* @brief Get field target_system from gopro_set_request message
*
* @return System ID
*/
static inline uint8_t mavlink_msg_gimbal_perform_factory_tests_get_target_system(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_gopro_set_request_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gimbal_perform_factory_tests message
* @brief Get field target_component from gopro_set_request message
*
* @return Component ID
*/
static inline uint8_t mavlink_msg_gimbal_perform_factory_tests_get_target_component(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_gopro_set_request_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gimbal_perform_factory_tests message into a struct
* @brief Get field cmd_id from gopro_set_request message
*
* @return Command ID
*/
static inline uint8_t mavlink_msg_gopro_set_request_get_cmd_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 2);
}
/**
* @brief Get field value from gopro_set_request message
*
* @return Value
*/
static inline uint16_t mavlink_msg_gopro_set_request_get_value(const mavlink_message_t* msg, uint8_t *value)
{
return _MAV_RETURN_uint8_t_array(msg, value, 4, 3);
}
/**
* @brief Decode a gopro_set_request message into a struct
*
* @param msg The message to decode
* @param gimbal_perform_factory_tests C-struct to decode the message contents into
* @param gopro_set_request C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_perform_factory_tests_decode(const mavlink_message_t* msg, mavlink_gimbal_perform_factory_tests_t* gimbal_perform_factory_tests)
static inline void mavlink_msg_gopro_set_request_decode(const mavlink_message_t* msg, mavlink_gopro_set_request_t* gopro_set_request)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_perform_factory_tests->target_system = mavlink_msg_gimbal_perform_factory_tests_get_target_system(msg);
gimbal_perform_factory_tests->target_component = mavlink_msg_gimbal_perform_factory_tests_get_target_component(msg);
gopro_set_request->target_system = mavlink_msg_gopro_set_request_get_target_system(msg);
gopro_set_request->target_component = mavlink_msg_gopro_set_request_get_target_component(msg);
gopro_set_request->cmd_id = mavlink_msg_gopro_set_request_get_cmd_id(msg);
mavlink_msg_gopro_set_request_get_value(msg, gopro_set_request->value);
#else
memcpy(gimbal_perform_factory_tests, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN);
memcpy(gopro_set_request, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
#endif
}
// MESSAGE GIMBAL_RESET PACKING
// MESSAGE GOPRO_SET_RESPONSE PACKING
#define MAVLINK_MSG_ID_GIMBAL_RESET 202
#define MAVLINK_MSG_ID_GOPRO_SET_RESPONSE 219
typedef struct __mavlink_gimbal_reset_t
typedef struct __mavlink_gopro_set_response_t
{
uint8_t target_system; /*< System ID*/
uint8_t target_component; /*< Component ID*/
} mavlink_gimbal_reset_t;
uint8_t cmd_id; /*< Command ID*/
uint8_t status; /*< Status*/
} mavlink_gopro_set_response_t;
#define MAVLINK_MSG_ID_GIMBAL_RESET_LEN 2
#define MAVLINK_MSG_ID_202_LEN 2
#define MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN 2
#define MAVLINK_MSG_ID_219_LEN 2
#define MAVLINK_MSG_ID_GIMBAL_RESET_CRC 94
#define MAVLINK_MSG_ID_202_CRC 94
#define MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC 162
#define MAVLINK_MSG_ID_219_CRC 162
#define MAVLINK_MESSAGE_INFO_GIMBAL_RESET { \
"GIMBAL_RESET", \
#define MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE { \
"GOPRO_SET_RESPONSE", \
2, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_reset_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_reset_t, target_component) }, \
{ { "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_set_response_t, cmd_id) }, \
{ "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_set_response_t, status) }, \
} \
}
/**
* @brief Pack a gimbal_reset message
* @brief Pack a gopro_set_response message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @param status Status
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_reset_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component)
static inline uint16_t mavlink_msg_gopro_set_response_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t cmd_id, uint8_t status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_RESET_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#else
mavlink_gimbal_reset_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
mavlink_gopro_set_response_t packet;
packet.cmd_id = cmd_id;
packet.status = status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_RESET;
msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_RESPONSE;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
}
/**
* @brief Pack a gimbal_reset message on a channel
* @brief Pack a gopro_set_response message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @param status Status
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gimbal_reset_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
static inline uint16_t mavlink_msg_gopro_set_response_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component)
uint8_t cmd_id,uint8_t status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_RESET_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#else
mavlink_gimbal_reset_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
mavlink_gopro_set_response_t packet;
packet.cmd_id = cmd_id;
packet.status = status;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GIMBAL_RESET;
msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_RESPONSE;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
}
/**
* @brief Encode a gimbal_reset struct
* @brief Encode a gopro_set_response struct
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param gimbal_reset C-struct to read the message contents from
* @param gopro_set_response C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_reset_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_reset_t* gimbal_reset)
static inline uint16_t mavlink_msg_gopro_set_response_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gopro_set_response_t* gopro_set_response)
{
return mavlink_msg_gimbal_reset_pack(system_id, component_id, msg, gimbal_reset->target_system, gimbal_reset->target_component);
return mavlink_msg_gopro_set_response_pack(system_id, component_id, msg, gopro_set_response->cmd_id, gopro_set_response->status);
}
/**
* @brief Encode a gimbal_reset struct on a channel
* @brief Encode a gopro_set_response struct on a channel
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message will be sent over
* @param msg The MAVLink message to compress the data into
* @param gimbal_reset C-struct to read the message contents from
* @param gopro_set_response C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_gimbal_reset_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_reset_t* gimbal_reset)
static inline uint16_t mavlink_msg_gopro_set_response_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gopro_set_response_t* gopro_set_response)
{
return mavlink_msg_gimbal_reset_pack_chan(system_id, component_id, chan, msg, gimbal_reset->target_system, gimbal_reset->target_component);
return mavlink_msg_gopro_set_response_pack_chan(system_id, component_id, chan, msg, gopro_set_response->cmd_id, gopro_set_response->status);
}
/**
* @brief Send a gimbal_reset message
* @brief Send a gopro_set_response message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param target_component Component ID
* @param cmd_id Command ID
* @param status Status
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gimbal_reset_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
static inline void mavlink_msg_gopro_set_response_send(mavlink_channel_t chan, uint8_t cmd_id, uint8_t status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_GIMBAL_RESET_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN];
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
#else
mavlink_gimbal_reset_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
mavlink_gopro_set_response_t packet;
packet.cmd_id = cmd_id;
packet.status = status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
#endif
}
#if MAVLINK_MSG_ID_GIMBAL_RESET_LEN <= MAVLINK_MAX_PAYLOAD_LEN
#if MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer. The caller provides a
......@@ -165,27 +165,27 @@ static inline void mavlink_msg_gimbal_reset_send(mavlink_channel_t chan, uint8_t
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_gimbal_reset_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
static inline void mavlink_msg_gopro_set_response_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t cmd_id, uint8_t status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 0, cmd_id);
_mav_put_uint8_t(buf, 1, status);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
#else
mavlink_gimbal_reset_t *packet = (mavlink_gimbal_reset_t *)msgbuf;
packet->target_system = target_system;
packet->target_component = target_component;
mavlink_gopro_set_response_t *packet = (mavlink_gopro_set_response_t *)msgbuf;
packet->cmd_id = cmd_id;
packet->status = status;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
#endif
}
......@@ -193,41 +193,41 @@ static inline void mavlink_msg_gimbal_reset_send_buf(mavlink_message_t *msgbuf,
#endif
// MESSAGE GIMBAL_RESET UNPACKING
// MESSAGE GOPRO_SET_RESPONSE UNPACKING
/**
* @brief Get field target_system from gimbal_reset message
* @brief Get field cmd_id from gopro_set_response message
*
* @return System ID
* @return Command ID
*/
static inline uint8_t mavlink_msg_gimbal_reset_get_target_system(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_gopro_set_response_get_cmd_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 0);
}
/**
* @brief Get field target_component from gimbal_reset message
* @brief Get field status from gopro_set_response message
*
* @return Component ID
* @return Status
*/
static inline uint8_t mavlink_msg_gimbal_reset_get_target_component(const mavlink_message_t* msg)
static inline uint8_t mavlink_msg_gopro_set_response_get_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 1);
}
/**
* @brief Decode a gimbal_reset message into a struct
* @brief Decode a gopro_set_response message into a struct
*
* @param msg The message to decode
* @param gimbal_reset C-struct to decode the message contents into
* @param gopro_set_response C-struct to decode the message contents into
*/
static inline void mavlink_msg_gimbal_reset_decode(const mavlink_message_t* msg, mavlink_gimbal_reset_t* gimbal_reset)
static inline void mavlink_msg_gopro_set_response_decode(const mavlink_message_t* msg, mavlink_gopro_set_response_t* gopro_set_response)
{
#if MAVLINK_NEED_BYTE_SWAP
gimbal_reset->target_system = mavlink_msg_gimbal_reset_get_target_system(msg);
gimbal_reset->target_component = mavlink_msg_gimbal_reset_get_target_component(msg);
gopro_set_response->cmd_id = mavlink_msg_gopro_set_response_get_cmd_id(msg);
gopro_set_response->status = mavlink_msg_gopro_set_response_get_status(msg);
#else
memcpy(gimbal_reset, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_RESET_LEN);
memcpy(gopro_set_response, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
#endif
}
......@@ -2057,34 +2057,37 @@ static void mavlink_test_gimbal_control(uint8_t system_id, uint8_t component_id,
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_reset(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gimbal_torque_cmd_report(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_reset_t packet_in = {
5,72
mavlink_gimbal_torque_cmd_report_t packet_in = {
17235,17339,17443,151,218
};
mavlink_gimbal_reset_t packet1, packet2;
mavlink_gimbal_torque_cmd_report_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.rl_torque_cmd = packet_in.rl_torque_cmd;
packet1.el_torque_cmd = packet_in.el_torque_cmd;
packet1.az_torque_cmd = packet_in.az_torque_cmd;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_reset_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_reset_decode(&msg, &packet2);
mavlink_msg_gimbal_torque_cmd_report_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_torque_cmd_report_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_reset_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_reset_decode(&msg, &packet2);
mavlink_msg_gimbal_torque_cmd_report_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.rl_torque_cmd , packet1.el_torque_cmd , packet1.az_torque_cmd );
mavlink_msg_gimbal_torque_cmd_report_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_reset_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_reset_decode(&msg, &packet2);
mavlink_msg_gimbal_torque_cmd_report_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.rl_torque_cmd , packet1.el_torque_cmd , packet1.az_torque_cmd );
mavlink_msg_gimbal_torque_cmd_report_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
......@@ -2092,275 +2095,44 @@ static void mavlink_test_gimbal_reset(uint8_t system_id, uint8_t component_id, m
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gimbal_reset_decode(last_msg, &packet2);
mavlink_msg_gimbal_torque_cmd_report_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_reset_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_reset_decode(last_msg, &packet2);
mavlink_msg_gimbal_torque_cmd_report_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.rl_torque_cmd , packet1.el_torque_cmd , packet1.az_torque_cmd );
mavlink_msg_gimbal_torque_cmd_report_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_axis_calibration_progress(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gopro_heartbeat(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_axis_calibration_progress_t packet_in = {
mavlink_gopro_heartbeat_t packet_in = {
5,72,139
};
mavlink_gimbal_axis_calibration_progress_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.calibration_axis = packet_in.calibration_axis;
packet1.calibration_progress = packet_in.calibration_progress;
packet1.calibration_status = packet_in.calibration_status;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_axis_calibration_progress_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_axis_calibration_progress_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_axis_calibration_progress_pack(system_id, component_id, &msg , packet1.calibration_axis , packet1.calibration_progress , packet1.calibration_status );
mavlink_msg_gimbal_axis_calibration_progress_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_axis_calibration_progress_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.calibration_axis , packet1.calibration_progress , packet1.calibration_status );
mavlink_msg_gimbal_axis_calibration_progress_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gimbal_axis_calibration_progress_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_axis_calibration_progress_send(MAVLINK_COMM_1 , packet1.calibration_axis , packet1.calibration_progress , packet1.calibration_status );
mavlink_msg_gimbal_axis_calibration_progress_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_set_home_offsets(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_set_home_offsets_t packet_in = {
5,72
};
mavlink_gimbal_set_home_offsets_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_home_offsets_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_set_home_offsets_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_home_offsets_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_set_home_offsets_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_home_offsets_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_set_home_offsets_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gimbal_set_home_offsets_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_home_offsets_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_set_home_offsets_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_home_offset_calibration_result(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_home_offset_calibration_result_t packet_in = {
5
};
mavlink_gimbal_home_offset_calibration_result_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.calibration_result = packet_in.calibration_result;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_home_offset_calibration_result_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_home_offset_calibration_result_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_home_offset_calibration_result_pack(system_id, component_id, &msg , packet1.calibration_result );
mavlink_msg_gimbal_home_offset_calibration_result_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_home_offset_calibration_result_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.calibration_result );
mavlink_msg_gimbal_home_offset_calibration_result_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gimbal_home_offset_calibration_result_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_home_offset_calibration_result_send(MAVLINK_COMM_1 , packet1.calibration_result );
mavlink_msg_gimbal_home_offset_calibration_result_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_set_factory_parameters(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_set_factory_parameters_t packet_in = {
963497464,963497672,963497880,963498088,963498296,963498504,18483,211,22,89,156,223,34,101
};
mavlink_gimbal_set_factory_parameters_t packet1, packet2;
mavlink_gopro_heartbeat_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.magic_1 = packet_in.magic_1;
packet1.magic_2 = packet_in.magic_2;
packet1.magic_3 = packet_in.magic_3;
packet1.serial_number_pt_1 = packet_in.serial_number_pt_1;
packet1.serial_number_pt_2 = packet_in.serial_number_pt_2;
packet1.serial_number_pt_3 = packet_in.serial_number_pt_3;
packet1.assembly_year = packet_in.assembly_year;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.assembly_month = packet_in.assembly_month;
packet1.assembly_day = packet_in.assembly_day;
packet1.assembly_hour = packet_in.assembly_hour;
packet1.assembly_minute = packet_in.assembly_minute;
packet1.assembly_second = packet_in.assembly_second;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_factory_parameters_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_set_factory_parameters_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_factory_parameters_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.magic_1 , packet1.magic_2 , packet1.magic_3 , packet1.assembly_year , packet1.assembly_month , packet1.assembly_day , packet1.assembly_hour , packet1.assembly_minute , packet1.assembly_second , packet1.serial_number_pt_1 , packet1.serial_number_pt_2 , packet1.serial_number_pt_3 );
mavlink_msg_gimbal_set_factory_parameters_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_factory_parameters_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.magic_1 , packet1.magic_2 , packet1.magic_3 , packet1.assembly_year , packet1.assembly_month , packet1.assembly_day , packet1.assembly_hour , packet1.assembly_minute , packet1.assembly_second , packet1.serial_number_pt_1 , packet1.serial_number_pt_2 , packet1.serial_number_pt_3 );
mavlink_msg_gimbal_set_factory_parameters_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gimbal_set_factory_parameters_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_set_factory_parameters_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.magic_1 , packet1.magic_2 , packet1.magic_3 , packet1.assembly_year , packet1.assembly_month , packet1.assembly_day , packet1.assembly_hour , packet1.assembly_minute , packet1.assembly_second , packet1.serial_number_pt_1 , packet1.serial_number_pt_2 , packet1.serial_number_pt_3 );
mavlink_msg_gimbal_set_factory_parameters_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_factory_parameters_loaded(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_factory_parameters_loaded_t packet_in = {
5
};
mavlink_gimbal_factory_parameters_loaded_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.dummy = packet_in.dummy;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_factory_parameters_loaded_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_factory_parameters_loaded_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_factory_parameters_loaded_pack(system_id, component_id, &msg , packet1.dummy );
mavlink_msg_gimbal_factory_parameters_loaded_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_factory_parameters_loaded_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.dummy );
mavlink_msg_gimbal_factory_parameters_loaded_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gimbal_factory_parameters_loaded_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_factory_parameters_loaded_send(MAVLINK_COMM_1 , packet1.dummy );
mavlink_msg_gimbal_factory_parameters_loaded_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_erase_firmware_and_config(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_erase_firmware_and_config_t packet_in = {
963497464,17,84
};
mavlink_gimbal_erase_firmware_and_config_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.knock = packet_in.knock;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.status = packet_in.status;
packet1.capture_mode = packet_in.capture_mode;
packet1.flags = packet_in.flags;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_erase_firmware_and_config_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_erase_firmware_and_config_decode(&msg, &packet2);
mavlink_msg_gopro_heartbeat_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_heartbeat_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_erase_firmware_and_config_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.knock );
mavlink_msg_gimbal_erase_firmware_and_config_decode(&msg, &packet2);
mavlink_msg_gopro_heartbeat_pack(system_id, component_id, &msg , packet1.status , packet1.capture_mode , packet1.flags );
mavlink_msg_gopro_heartbeat_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_erase_firmware_and_config_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.knock );
mavlink_msg_gimbal_erase_firmware_and_config_decode(&msg, &packet2);
mavlink_msg_gopro_heartbeat_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.status , packet1.capture_mode , packet1.flags );
mavlink_msg_gopro_heartbeat_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
......@@ -2368,43 +2140,44 @@ static void mavlink_test_gimbal_erase_firmware_and_config(uint8_t system_id, uin
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gimbal_erase_firmware_and_config_decode(last_msg, &packet2);
mavlink_msg_gopro_heartbeat_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_erase_firmware_and_config_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.knock );
mavlink_msg_gimbal_erase_firmware_and_config_decode(last_msg, &packet2);
mavlink_msg_gopro_heartbeat_send(MAVLINK_COMM_1 , packet1.status , packet1.capture_mode , packet1.flags );
mavlink_msg_gopro_heartbeat_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_perform_factory_tests(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gopro_get_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_perform_factory_tests_t packet_in = {
5,72
mavlink_gopro_get_request_t packet_in = {
5,72,139
};
mavlink_gimbal_perform_factory_tests_t packet1, packet2;
mavlink_gopro_get_request_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.cmd_id = packet_in.cmd_id;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_perform_factory_tests_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_perform_factory_tests_decode(&msg, &packet2);
mavlink_msg_gopro_get_request_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_get_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_perform_factory_tests_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_perform_factory_tests_decode(&msg, &packet2);
mavlink_msg_gopro_get_request_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.cmd_id );
mavlink_msg_gopro_get_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_perform_factory_tests_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_perform_factory_tests_decode(&msg, &packet2);
mavlink_msg_gopro_get_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.cmd_id );
mavlink_msg_gopro_get_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
......@@ -2412,45 +2185,44 @@ static void mavlink_test_gimbal_perform_factory_tests(uint8_t system_id, uint8_t
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gimbal_perform_factory_tests_decode(last_msg, &packet2);
mavlink_msg_gopro_get_request_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_perform_factory_tests_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_gimbal_perform_factory_tests_decode(last_msg, &packet2);
mavlink_msg_gopro_get_request_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.cmd_id );
mavlink_msg_gopro_get_request_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gimbal_report_factory_tests_progress(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gopro_get_response(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gimbal_report_factory_tests_progress_t packet_in = {
5,72,139,206
mavlink_gopro_get_response_t packet_in = {
5,72,{ 139, 140, 141, 142 }
};
mavlink_gimbal_report_factory_tests_progress_t packet1, packet2;
mavlink_gopro_get_response_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.test = packet_in.test;
packet1.test_section = packet_in.test_section;
packet1.test_section_progress = packet_in.test_section_progress;
packet1.test_status = packet_in.test_status;
packet1.cmd_id = packet_in.cmd_id;
packet1.status = packet_in.status;
mav_array_memcpy(packet1.value, packet_in.value, sizeof(uint8_t)*4);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_factory_tests_progress_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gimbal_report_factory_tests_progress_decode(&msg, &packet2);
mavlink_msg_gopro_get_response_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_get_response_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_factory_tests_progress_pack(system_id, component_id, &msg , packet1.test , packet1.test_section , packet1.test_section_progress , packet1.test_status );
mavlink_msg_gimbal_report_factory_tests_progress_decode(&msg, &packet2);
mavlink_msg_gopro_get_response_pack(system_id, component_id, &msg , packet1.cmd_id , packet1.status , packet1.value );
mavlink_msg_gopro_get_response_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_factory_tests_progress_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.test , packet1.test_section , packet1.test_section_progress , packet1.test_status );
mavlink_msg_gimbal_report_factory_tests_progress_decode(&msg, &packet2);
mavlink_msg_gopro_get_response_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.cmd_id , packet1.status , packet1.value );
mavlink_msg_gopro_get_response_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
......@@ -2458,43 +2230,45 @@ static void mavlink_test_gimbal_report_factory_tests_progress(uint8_t system_id,
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gimbal_report_factory_tests_progress_decode(last_msg, &packet2);
mavlink_msg_gopro_get_response_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gimbal_report_factory_tests_progress_send(MAVLINK_COMM_1 , packet1.test , packet1.test_section , packet1.test_section_progress , packet1.test_status );
mavlink_msg_gimbal_report_factory_tests_progress_decode(last_msg, &packet2);
mavlink_msg_gopro_get_response_send(MAVLINK_COMM_1 , packet1.cmd_id , packet1.status , packet1.value );
mavlink_msg_gopro_get_response_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gopro_power_on(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gopro_set_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gopro_power_on_t packet_in = {
5,72
mavlink_gopro_set_request_t packet_in = {
5,72,139,{ 206, 207, 208, 209 }
};
mavlink_gopro_power_on_t packet1, packet2;
mavlink_gopro_set_request_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.cmd_id = packet_in.cmd_id;
mav_array_memcpy(packet1.value, packet_in.value, sizeof(uint8_t)*4);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_power_on_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_power_on_decode(&msg, &packet2);
mavlink_msg_gopro_set_request_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_set_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_power_on_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gopro_power_on_decode(&msg, &packet2);
mavlink_msg_gopro_set_request_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.cmd_id , packet1.value );
mavlink_msg_gopro_set_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_power_on_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gopro_power_on_decode(&msg, &packet2);
mavlink_msg_gopro_set_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.cmd_id , packet1.value );
mavlink_msg_gopro_set_request_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
......@@ -2502,137 +2276,43 @@ static void mavlink_test_gopro_power_on(uint8_t system_id, uint8_t component_id,
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gopro_power_on_decode(last_msg, &packet2);
mavlink_msg_gopro_set_request_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_power_on_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_gopro_power_on_decode(last_msg, &packet2);
mavlink_msg_gopro_set_request_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.cmd_id , packet1.value );
mavlink_msg_gopro_set_request_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gopro_power_off(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gopro_set_response(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gopro_power_off_t packet_in = {
mavlink_gopro_set_response_t packet_in = {
5,72
};
mavlink_gopro_power_off_t packet1, packet2;
mavlink_gopro_set_response_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_power_off_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_power_off_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_power_off_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gopro_power_off_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_power_off_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
mavlink_msg_gopro_power_off_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gopro_power_off_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_power_off_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
mavlink_msg_gopro_power_off_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gopro_command(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gopro_command_t packet_in = {
5,72,139,206,17
};
mavlink_gopro_command_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.gp_cmd_name_1 = packet_in.gp_cmd_name_1;
packet1.gp_cmd_name_2 = packet_in.gp_cmd_name_2;
packet1.gp_cmd_parm = packet_in.gp_cmd_parm;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_command_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_command_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_command_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.gp_cmd_name_1 , packet1.gp_cmd_name_2 , packet1.gp_cmd_parm );
mavlink_msg_gopro_command_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_command_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.gp_cmd_name_1 , packet1.gp_cmd_name_2 , packet1.gp_cmd_parm );
mavlink_msg_gopro_command_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gopro_command_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_command_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.gp_cmd_name_1 , packet1.gp_cmd_name_2 , packet1.gp_cmd_parm );
mavlink_msg_gopro_command_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_gopro_response(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_gopro_response_t packet_in = {
17235,139,206,17,84
};
mavlink_gopro_response_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.gp_cmd_result = packet_in.gp_cmd_result;
packet1.gp_cmd_name_1 = packet_in.gp_cmd_name_1;
packet1.gp_cmd_name_2 = packet_in.gp_cmd_name_2;
packet1.gp_cmd_response_status = packet_in.gp_cmd_response_status;
packet1.gp_cmd_response_argument = packet_in.gp_cmd_response_argument;
packet1.cmd_id = packet_in.cmd_id;
packet1.status = packet_in.status;
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_response_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_response_decode(&msg, &packet2);
mavlink_msg_gopro_set_response_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_gopro_set_response_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_response_pack(system_id, component_id, &msg , packet1.gp_cmd_name_1 , packet1.gp_cmd_name_2 , packet1.gp_cmd_response_status , packet1.gp_cmd_response_argument , packet1.gp_cmd_result );
mavlink_msg_gopro_response_decode(&msg, &packet2);
mavlink_msg_gopro_set_response_pack(system_id, component_id, &msg , packet1.cmd_id , packet1.status );
mavlink_msg_gopro_set_response_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_response_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.gp_cmd_name_1 , packet1.gp_cmd_name_2 , packet1.gp_cmd_response_status , packet1.gp_cmd_response_argument , packet1.gp_cmd_result );
mavlink_msg_gopro_response_decode(&msg, &packet2);
mavlink_msg_gopro_set_response_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.cmd_id , packet1.status );
mavlink_msg_gopro_set_response_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
......@@ -2640,12 +2320,12 @@ static void mavlink_test_gopro_response(uint8_t system_id, uint8_t component_id,
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_gopro_response_decode(last_msg, &packet2);
mavlink_msg_gopro_set_response_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_gopro_response_send(MAVLINK_COMM_1 , packet1.gp_cmd_name_1 , packet1.gp_cmd_name_2 , packet1.gp_cmd_response_status , packet1.gp_cmd_response_argument , packet1.gp_cmd_result );
mavlink_msg_gopro_response_decode(last_msg, &packet2);
mavlink_msg_gopro_set_response_send(MAVLINK_COMM_1 , packet1.cmd_id , packet1.status );
mavlink_msg_gopro_set_response_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
......@@ -2737,19 +2417,12 @@ static void mavlink_test_ardupilotmega(uint8_t system_id, uint8_t component_id,
mavlink_test_pid_tuning(system_id, component_id, last_msg);
mavlink_test_gimbal_report(system_id, component_id, last_msg);
mavlink_test_gimbal_control(system_id, component_id, last_msg);
mavlink_test_gimbal_reset(system_id, component_id, last_msg);
mavlink_test_gimbal_axis_calibration_progress(system_id, component_id, last_msg);
mavlink_test_gimbal_set_home_offsets(system_id, component_id, last_msg);
mavlink_test_gimbal_home_offset_calibration_result(system_id, component_id, last_msg);
mavlink_test_gimbal_set_factory_parameters(system_id, component_id, last_msg);
mavlink_test_gimbal_factory_parameters_loaded(system_id, component_id, last_msg);
mavlink_test_gimbal_erase_firmware_and_config(system_id, component_id, last_msg);
mavlink_test_gimbal_perform_factory_tests(system_id, component_id, last_msg);
mavlink_test_gimbal_report_factory_tests_progress(system_id, component_id, last_msg);
mavlink_test_gopro_power_on(system_id, component_id, last_msg);
mavlink_test_gopro_power_off(system_id, component_id, last_msg);
mavlink_test_gopro_command(system_id, component_id, last_msg);
mavlink_test_gopro_response(system_id, component_id, last_msg);
mavlink_test_gimbal_torque_cmd_report(system_id, component_id, last_msg);
mavlink_test_gopro_heartbeat(system_id, component_id, last_msg);
mavlink_test_gopro_get_request(system_id, component_id, last_msg);
mavlink_test_gopro_get_response(system_id, component_id, last_msg);
mavlink_test_gopro_set_request(system_id, component_id, last_msg);
mavlink_test_gopro_set_response(system_id, component_id, last_msg);
mavlink_test_rpm(system_id, component_id, last_msg);
}
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:35 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:11 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:39 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:15 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:39:00 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:39 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:42 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:19 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:46 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:23 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 9
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:46 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:24 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:50 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:28 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179
......
......@@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Jan 5 20:38:50 2016"
#define MAVLINK_BUILD_DATE "Thu Jan 7 07:03:29 2016"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment