From 9f10c4370897742ae844343704faaee30fcd9bef Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 21 Apr 2015 21:01:06 +0900 Subject: [PATCH] GCS_MAVLink: generate after GIMBAL/GOPRO msgs added --- .../v1.0/ardupilotmega/ardupilotmega.h | 127 ++- ...ink_msg_gimbal_axis_calibration_progress.h | 257 ++++++ ...ink_msg_gimbal_erase_firmware_and_config.h | 257 ++++++ ...ink_msg_gimbal_factory_parameters_loaded.h | 209 +++++ ...sg_gimbal_home_offset_calibration_result.h | 209 +++++ ...mavlink_msg_gimbal_perform_factory_tests.h | 233 ++++++ ...sg_gimbal_report_axis_calibration_status.h | 257 ++++++ ...msg_gimbal_report_factory_tests_progress.h | 281 +++++++ ...link_msg_gimbal_request_axis_calibration.h | 233 ++++++ ...g_gimbal_request_axis_calibration_status.h | 233 ++++++ .../ardupilotmega/mavlink_msg_gimbal_reset.h | 233 ++++++ ...avlink_msg_gimbal_set_factory_parameters.h | 521 ++++++++++++ .../mavlink_msg_gimbal_set_home_offsets.h | 233 ++++++ .../mavlink_msg_gopro_get_request.h | 257 ++++++ .../mavlink_msg_gopro_get_response.h | 233 ++++++ .../mavlink_msg_gopro_heartbeat.h | 209 +++++ .../mavlink_msg_gopro_set_request.h | 281 +++++++ .../mavlink_msg_gopro_set_response.h | 233 ++++++ .../mavlink/v1.0/ardupilotmega/testsuite.h | 782 ++++++++++++++++++ 19 files changed, 5275 insertions(+), 3 deletions(-) create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_axis_calibration_progress.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_erase_firmware_and_config.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_factory_parameters_loaded.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_home_offset_calibration_result.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_perform_factory_tests.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_axis_calibration_status.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_factory_tests_progress.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration_status.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_reset.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_factory_parameters.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_home_offsets.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_request.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_response.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_heartbeat.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_request.h create mode 100644 libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_response.h diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h index 4f50337a00..8696a6b18b 100644 --- a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h @@ -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, 181, 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, 0, 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, 0, 0, 0, 0, 0, 0, 36, 60, 0, 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, 0, 0, 29, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 42, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 181, 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, 0, 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, 0, 0, 0, 0, 0, 0, 36, 60, 0, 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, 0, 0, 29, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 42, 14, 2, 3, 2, 1, 33, 1, 6, 2, 4, 2, 3, 2, 0, 1, 3, 2, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 82, 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, 0, 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, 0, 0, 0, 0, 0, 0, 154, 178, 0, 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, 0, 0, 72, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 134, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 82, 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, 0, 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, 0, 0, 0, 0, 0, 0, 154, 178, 0, 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, 0, 0, 72, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 134, 205, 94, 128, 54, 63, 112, 201, 221, 226, 238, 103, 235, 14, 0, 77, 50, 163, 115, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, 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, {"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_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, 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, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, 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}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, {"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_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}}}, {"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}}}, {"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}}}, {"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_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, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, 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, {"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_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, 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, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, 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}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, {"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_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, MAVLINK_MESSAGE_INFO_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_REQUEST_AXIS_CALIBRATION, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, 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}}}, {"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}}}, {"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_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" @@ -208,6 +208,110 @@ typedef enum CAMERA_FEEDBACK_FLAGS } CAMERA_FEEDBACK_FLAGS; #endif +/** @brief */ +#ifndef HAVE_ENUM_MAV_MODE_GIMBAL +#define HAVE_ENUM_MAV_MODE_GIMBAL +typedef enum MAV_MODE_GIMBAL +{ + MAV_MODE_GIMBAL_UNINITIALIZED=0, /* Gimbal is powered on but has not started initializing yet | */ + MAV_MODE_GIMBAL_CALIBRATING_PITCH=1, /* Gimbal is currently running calibration on the pitch axis | */ + MAV_MODE_GIMBAL_CALIBRATING_ROLL=2, /* Gimbal is currently running calibration on the roll axis | */ + 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_ENUM_END=7, /* | */ +} MAV_MODE_GIMBAL; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GIMBAL_AXIS +#define HAVE_ENUM_GIMBAL_AXIS +typedef enum GIMBAL_AXIS +{ + GIMBAL_AXIS_YAW=0, /* Gimbal yaw axis | */ + GIMBAL_AXIS_PITCH=1, /* Gimbal pitch axis | */ + GIMBAL_AXIS_ROLL=2, /* Gimbal roll axis | */ + GIMBAL_AXIS_ENUM_END=3, /* | */ +} GIMBAL_AXIS; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GIMBAL_AXIS_CALIBRATION_STATUS +#define HAVE_ENUM_GIMBAL_AXIS_CALIBRATION_STATUS +typedef enum GIMBAL_AXIS_CALIBRATION_STATUS +{ + GIMBAL_AXIS_CALIBRATION_STATUS_IN_PROGRESS=0, /* Axis calibration is in progress | */ + GIMBAL_AXIS_CALIBRATION_STATUS_SUCCEEDED=1, /* Axis calibration succeeded | */ + GIMBAL_AXIS_CALIBRATION_STATUS_FAILED=2, /* Axis calibration failed | */ + GIMBAL_AXIS_CALIBRATION_STATUS_ENUM_END=3, /* | */ +} GIMBAL_AXIS_CALIBRATION_STATUS; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_FACTORY_TEST +#define HAVE_ENUM_FACTORY_TEST +typedef enum FACTORY_TEST +{ + 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; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GIMBAL_AXIS_CALIBRATION_REQUIRED +#define HAVE_ENUM_GIMBAL_AXIS_CALIBRATION_REQUIRED +typedef enum GIMBAL_AXIS_CALIBRATION_REQUIRED +{ + 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_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_POWER_OFF=2, /* A HeroBus compatible GoPro is connected | */ + GOPRO_HEARTBEAT_STATUS_CONNECTED_POWER_ON=3, /* A HeroBus compatible GoPro is connected | */ + GOPRO_HEARTBEAT_STATUS_RECORDING=4, /* A HeroBus compatible GoPro is connected and recording | */ + GOPRO_HEARTBEAT_STATUS_ERR_OVERTEMP=5, /* A HeroBus compatible GoPro is connected and overtemperature | */ + GOPRO_HEARTBEAT_STATUS_ERR_STORAGE=6, /* A HeroBus compatible GoPro is connected and storage is missing or full | */ + GOPRO_HEARTBEAT_STATUS_ENUM_END=7, /* | */ +} GOPRO_HEARTBEAT_STATUS; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_SET_RESPONSE_RESULT +#define HAVE_ENUM_GOPRO_SET_RESPONSE_RESULT +typedef enum GOPRO_SET_RESPONSE_RESULT +{ + GOPRO_SET_RESPONSE_RESULT_FAILURE=0, /* The write message with ID indicated failed | */ + GOPRO_SET_RESPONSE_RESULT_SUCCESS=1, /* The write message with ID indicated succeeded | */ + GOPRO_SET_RESPONSE_RESULT_ENUM_END=2, /* | */ +} GOPRO_SET_RESPONSE_RESULT; +#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_REQUEST_FAILED=254, /* (Get/___) | */ + GOPRO_COMMAND_ENUM_END=255, /* | */ +} GOPRO_COMMAND; +#endif + /** @brief */ #ifndef HAVE_ENUM_LED_CONTROL_PATTERN #define HAVE_ENUM_LED_CONTROL_PATTERN @@ -290,6 +394,23 @@ typedef enum EKF_STATUS_FLAGS #include "./mavlink_msg_ekf_status_report.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_gimbal_request_axis_calibration_status.h" +#include "./mavlink_msg_gimbal_report_axis_calibration_status.h" +#include "./mavlink_msg_gimbal_request_axis_calibration.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" #ifdef __cplusplus } diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_axis_calibration_progress.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_axis_calibration_progress.h new file mode 100644 index 0000000000..c41e1d3756 --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_axis_calibration_progress.h @@ -0,0 +1,257 @@ +// 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 +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_erase_firmware_and_config.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_erase_firmware_and_config.h new file mode 100644 index 0000000000..23174d0afc --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_erase_firmware_and_config.h @@ -0,0 +1,257 @@ +// 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 +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_factory_parameters_loaded.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_factory_parameters_loaded.h new file mode 100644 index 0000000000..790fe4e212 --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_factory_parameters_loaded.h @@ -0,0 +1,209 @@ +// 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 +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_home_offset_calibration_result.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_home_offset_calibration_result.h new file mode 100644 index 0000000000..a1c9ace56e --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_home_offset_calibration_result.h @@ -0,0 +1,209 @@ +// 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 +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_perform_factory_tests.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_perform_factory_tests.h new file mode 100644 index 0000000000..a37c834019 --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_perform_factory_tests.h @@ -0,0 +1,233 @@ +// MESSAGE GIMBAL_PERFORM_FACTORY_TESTS PACKING + +#define MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS 209 + +typedef struct __mavlink_gimbal_perform_factory_tests_t +{ + uint8_t target_system; ///< System ID + uint8_t target_component; ///< Component ID +} mavlink_gimbal_perform_factory_tests_t; + +#define MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN 2 +#define MAVLINK_MSG_ID_209_LEN 2 + +#define MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC 226 +#define MAVLINK_MSG_ID_209_CRC 226 + + + +#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) }, \ + } \ +} + + +/** + * @brief Pack a gimbal_perform_factory_tests 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_perform_factory_tests_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_PERFORM_FACTORY_TESTS_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); +#else + mavlink_gimbal_perform_factory_tests_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); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS; +#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); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN); +#endif +} + +/** + * @brief Pack a gimbal_perform_factory_tests 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_perform_factory_tests_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_PERFORM_FACTORY_TESTS_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); +#else + mavlink_gimbal_perform_factory_tests_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); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS; +#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); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN); +#endif +} + +/** + * @brief Encode a gimbal_perform_factory_tests 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 + */ +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) +{ + 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); +} + +/** + * @brief Encode a gimbal_perform_factory_tests 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 + */ +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) +{ + 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); +} + +/** + * @brief Send a gimbal_perform_factory_tests 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_perform_factory_tests_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_PERFORM_FACTORY_TESTS_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_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN); +#endif +#else + mavlink_gimbal_perform_factory_tests_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_PERFORM_FACTORY_TESTS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_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); +#endif +#endif +} + +#if MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_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_perform_factory_tests_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_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS, buf, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN); +#endif +#else + mavlink_gimbal_perform_factory_tests_t *packet = (mavlink_gimbal_perform_factory_tests_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_PERFORM_FACTORY_TESTS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN, MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_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); +#endif +#endif +} +#endif + +#endif + +// MESSAGE GIMBAL_PERFORM_FACTORY_TESTS UNPACKING + + +/** + * @brief Get field target_system from gimbal_perform_factory_tests message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_gimbal_perform_factory_tests_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 + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_gimbal_perform_factory_tests_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 + * + * @param msg The message to decode + * @param gimbal_perform_factory_tests 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) +{ +#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); +#else + memcpy(gimbal_perform_factory_tests, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_PERFORM_FACTORY_TESTS_LEN); +#endif +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_axis_calibration_status.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_axis_calibration_status.h new file mode 100644 index 0000000000..37552d661d --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_axis_calibration_status.h @@ -0,0 +1,257 @@ +// MESSAGE GIMBAL_REPORT_AXIS_CALIBRATION_STATUS PACKING + +#define MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS 212 + +typedef struct __mavlink_gimbal_report_axis_calibration_status_t +{ + uint8_t yaw_requires_calibration; ///< Whether or not the yaw axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + uint8_t pitch_requires_calibration; ///< Whether or not the pitch axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + uint8_t roll_requires_calibration; ///< Whether or not the roll axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration +} mavlink_gimbal_report_axis_calibration_status_t; + +#define MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN 3 +#define MAVLINK_MSG_ID_212_LEN 3 + +#define MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC 235 +#define MAVLINK_MSG_ID_212_CRC 235 + + + +#define MAVLINK_MESSAGE_INFO_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS { \ + "GIMBAL_REPORT_AXIS_CALIBRATION_STATUS", \ + 3, \ + { { "yaw_requires_calibration", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_report_axis_calibration_status_t, yaw_requires_calibration) }, \ + { "pitch_requires_calibration", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_report_axis_calibration_status_t, pitch_requires_calibration) }, \ + { "roll_requires_calibration", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gimbal_report_axis_calibration_status_t, roll_requires_calibration) }, \ + } \ +} + + +/** + * @brief Pack a gimbal_report_axis_calibration_status 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 yaw_requires_calibration Whether or not the yaw axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + * @param pitch_requires_calibration Whether or not the pitch axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + * @param roll_requires_calibration Whether or not the roll axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_gimbal_report_axis_calibration_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t yaw_requires_calibration, uint8_t pitch_requires_calibration, uint8_t roll_requires_calibration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN]; + _mav_put_uint8_t(buf, 0, yaw_requires_calibration); + _mav_put_uint8_t(buf, 1, pitch_requires_calibration); + _mav_put_uint8_t(buf, 2, roll_requires_calibration); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#else + mavlink_gimbal_report_axis_calibration_status_t packet; + packet.yaw_requires_calibration = yaw_requires_calibration; + packet.pitch_requires_calibration = pitch_requires_calibration; + packet.roll_requires_calibration = roll_requires_calibration; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#endif +} + +/** + * @brief Pack a gimbal_report_axis_calibration_status 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 yaw_requires_calibration Whether or not the yaw axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + * @param pitch_requires_calibration Whether or not the pitch axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + * @param roll_requires_calibration Whether or not the roll axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_gimbal_report_axis_calibration_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t yaw_requires_calibration,uint8_t pitch_requires_calibration,uint8_t roll_requires_calibration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN]; + _mav_put_uint8_t(buf, 0, yaw_requires_calibration); + _mav_put_uint8_t(buf, 1, pitch_requires_calibration); + _mav_put_uint8_t(buf, 2, roll_requires_calibration); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#else + mavlink_gimbal_report_axis_calibration_status_t packet; + packet.yaw_requires_calibration = yaw_requires_calibration; + packet.pitch_requires_calibration = pitch_requires_calibration; + packet.roll_requires_calibration = roll_requires_calibration; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#endif +} + +/** + * @brief Encode a gimbal_report_axis_calibration_status 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_axis_calibration_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_gimbal_report_axis_calibration_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_report_axis_calibration_status_t* gimbal_report_axis_calibration_status) +{ + return mavlink_msg_gimbal_report_axis_calibration_status_pack(system_id, component_id, msg, gimbal_report_axis_calibration_status->yaw_requires_calibration, gimbal_report_axis_calibration_status->pitch_requires_calibration, gimbal_report_axis_calibration_status->roll_requires_calibration); +} + +/** + * @brief Encode a gimbal_report_axis_calibration_status 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_axis_calibration_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_gimbal_report_axis_calibration_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_report_axis_calibration_status_t* gimbal_report_axis_calibration_status) +{ + return mavlink_msg_gimbal_report_axis_calibration_status_pack_chan(system_id, component_id, chan, msg, gimbal_report_axis_calibration_status->yaw_requires_calibration, gimbal_report_axis_calibration_status->pitch_requires_calibration, gimbal_report_axis_calibration_status->roll_requires_calibration); +} + +/** + * @brief Send a gimbal_report_axis_calibration_status message + * @param chan MAVLink channel to send the message + * + * @param yaw_requires_calibration Whether or not the yaw axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + * @param pitch_requires_calibration Whether or not the pitch axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + * @param roll_requires_calibration Whether or not the roll axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_gimbal_report_axis_calibration_status_send(mavlink_channel_t chan, uint8_t yaw_requires_calibration, uint8_t pitch_requires_calibration, uint8_t roll_requires_calibration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN]; + _mav_put_uint8_t(buf, 0, yaw_requires_calibration); + _mav_put_uint8_t(buf, 1, pitch_requires_calibration); + _mav_put_uint8_t(buf, 2, roll_requires_calibration); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#endif +#else + mavlink_gimbal_report_axis_calibration_status_t packet; + packet.yaw_requires_calibration = yaw_requires_calibration; + packet.pitch_requires_calibration = pitch_requires_calibration; + packet.roll_requires_calibration = roll_requires_calibration; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_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_axis_calibration_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t yaw_requires_calibration, uint8_t pitch_requires_calibration, uint8_t roll_requires_calibration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint8_t(buf, 0, yaw_requires_calibration); + _mav_put_uint8_t(buf, 1, pitch_requires_calibration); + _mav_put_uint8_t(buf, 2, roll_requires_calibration); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#endif +#else + mavlink_gimbal_report_axis_calibration_status_t *packet = (mavlink_gimbal_report_axis_calibration_status_t *)msgbuf; + packet->yaw_requires_calibration = yaw_requires_calibration; + packet->pitch_requires_calibration = pitch_requires_calibration; + packet->roll_requires_calibration = roll_requires_calibration; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE GIMBAL_REPORT_AXIS_CALIBRATION_STATUS UNPACKING + + +/** + * @brief Get field yaw_requires_calibration from gimbal_report_axis_calibration_status message + * + * @return Whether or not the yaw axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + */ +static inline uint8_t mavlink_msg_gimbal_report_axis_calibration_status_get_yaw_requires_calibration(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 0); +} + +/** + * @brief Get field pitch_requires_calibration from gimbal_report_axis_calibration_status message + * + * @return Whether or not the pitch axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + */ +static inline uint8_t mavlink_msg_gimbal_report_axis_calibration_status_get_pitch_requires_calibration(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + +/** + * @brief Get field roll_requires_calibration from gimbal_report_axis_calibration_status message + * + * @return Whether or not the roll axis requires calibration, see GIMBAL_AXIS_CALIBRATION_REQUIRED enumeration + */ +static inline uint8_t mavlink_msg_gimbal_report_axis_calibration_status_get_roll_requires_calibration(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 2); +} + +/** + * @brief Decode a gimbal_report_axis_calibration_status message into a struct + * + * @param msg The message to decode + * @param gimbal_report_axis_calibration_status C-struct to decode the message contents into + */ +static inline void mavlink_msg_gimbal_report_axis_calibration_status_decode(const mavlink_message_t* msg, mavlink_gimbal_report_axis_calibration_status_t* gimbal_report_axis_calibration_status) +{ +#if MAVLINK_NEED_BYTE_SWAP + gimbal_report_axis_calibration_status->yaw_requires_calibration = mavlink_msg_gimbal_report_axis_calibration_status_get_yaw_requires_calibration(msg); + gimbal_report_axis_calibration_status->pitch_requires_calibration = mavlink_msg_gimbal_report_axis_calibration_status_get_pitch_requires_calibration(msg); + gimbal_report_axis_calibration_status->roll_requires_calibration = mavlink_msg_gimbal_report_axis_calibration_status_get_roll_requires_calibration(msg); +#else + memcpy(gimbal_report_axis_calibration_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_REPORT_AXIS_CALIBRATION_STATUS_LEN); +#endif +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_factory_tests_progress.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_factory_tests_progress.h new file mode 100644 index 0000000000..ada3a91d14 --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_factory_tests_progress.h @@ -0,0 +1,281 @@ +// 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 +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration.h new file mode 100644 index 0000000000..9a848cf47f --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration.h @@ -0,0 +1,233 @@ +// MESSAGE GIMBAL_REQUEST_AXIS_CALIBRATION PACKING + +#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION 213 + +typedef struct __mavlink_gimbal_request_axis_calibration_t +{ + uint8_t target_system; ///< System ID + uint8_t target_component; ///< Component ID +} mavlink_gimbal_request_axis_calibration_t; + +#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN 2 +#define MAVLINK_MSG_ID_213_LEN 2 + +#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC 14 +#define MAVLINK_MSG_ID_213_CRC 14 + + + +#define MAVLINK_MESSAGE_INFO_GIMBAL_REQUEST_AXIS_CALIBRATION { \ + "GIMBAL_REQUEST_AXIS_CALIBRATION", \ + 2, \ + { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_request_axis_calibration_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_request_axis_calibration_t, target_component) }, \ + } \ +} + + +/** + * @brief Pack a gimbal_request_axis_calibration 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_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION_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_REQUEST_AXIS_CALIBRATION_LEN); +#else + mavlink_gimbal_request_axis_calibration_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN); +#endif +} + +/** + * @brief Pack a gimbal_request_axis_calibration 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_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION_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_REQUEST_AXIS_CALIBRATION_LEN); +#else + mavlink_gimbal_request_axis_calibration_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN); +#endif +} + +/** + * @brief Encode a gimbal_request_axis_calibration 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_request_axis_calibration C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_gimbal_request_axis_calibration_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_request_axis_calibration_t* gimbal_request_axis_calibration) +{ + return mavlink_msg_gimbal_request_axis_calibration_pack(system_id, component_id, msg, gimbal_request_axis_calibration->target_system, gimbal_request_axis_calibration->target_component); +} + +/** + * @brief Encode a gimbal_request_axis_calibration 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_request_axis_calibration C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_gimbal_request_axis_calibration_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_request_axis_calibration_t* gimbal_request_axis_calibration) +{ + return mavlink_msg_gimbal_request_axis_calibration_pack_chan(system_id, component_id, chan, msg, gimbal_request_axis_calibration->target_system, gimbal_request_axis_calibration->target_component); +} + +/** + * @brief Send a gimbal_request_axis_calibration 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_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION_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_REQUEST_AXIS_CALIBRATION, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN); +#endif +#else + mavlink_gimbal_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_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_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN); +#endif +#else + mavlink_gimbal_request_axis_calibration_t *packet = (mavlink_gimbal_request_axis_calibration_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_REQUEST_AXIS_CALIBRATION, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE GIMBAL_REQUEST_AXIS_CALIBRATION UNPACKING + + +/** + * @brief Get field target_system from gimbal_request_axis_calibration message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_gimbal_request_axis_calibration_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 0); +} + +/** + * @brief Get field target_component from gimbal_request_axis_calibration message + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_gimbal_request_axis_calibration_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + +/** + * @brief Decode a gimbal_request_axis_calibration message into a struct + * + * @param msg The message to decode + * @param gimbal_request_axis_calibration C-struct to decode the message contents into + */ +static inline void mavlink_msg_gimbal_request_axis_calibration_decode(const mavlink_message_t* msg, mavlink_gimbal_request_axis_calibration_t* gimbal_request_axis_calibration) +{ +#if MAVLINK_NEED_BYTE_SWAP + gimbal_request_axis_calibration->target_system = mavlink_msg_gimbal_request_axis_calibration_get_target_system(msg); + gimbal_request_axis_calibration->target_component = mavlink_msg_gimbal_request_axis_calibration_get_target_component(msg); +#else + memcpy(gimbal_request_axis_calibration, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_LEN); +#endif +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration_status.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration_status.h new file mode 100644 index 0000000000..b8c4f36770 --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration_status.h @@ -0,0 +1,233 @@ +// MESSAGE GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS PACKING + +#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS 211 + +typedef struct __mavlink_gimbal_request_axis_calibration_status_t +{ + uint8_t target_system; ///< System ID + uint8_t target_component; ///< Component ID +} mavlink_gimbal_request_axis_calibration_status_t; + +#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN 2 +#define MAVLINK_MSG_ID_211_LEN 2 + +#define MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC 103 +#define MAVLINK_MSG_ID_211_CRC 103 + + + +#define MAVLINK_MESSAGE_INFO_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS { \ + "GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS", \ + 2, \ + { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_request_axis_calibration_status_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gimbal_request_axis_calibration_status_t, target_component) }, \ + } \ +} + + +/** + * @brief Pack a gimbal_request_axis_calibration_status 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_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS_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_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#else + mavlink_gimbal_request_axis_calibration_status_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#endif +} + +/** + * @brief Pack a gimbal_request_axis_calibration_status 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_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS_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_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#else + mavlink_gimbal_request_axis_calibration_status_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#endif +} + +/** + * @brief Encode a gimbal_request_axis_calibration_status 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_request_axis_calibration_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_gimbal_request_axis_calibration_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_request_axis_calibration_status_t* gimbal_request_axis_calibration_status) +{ + return mavlink_msg_gimbal_request_axis_calibration_status_pack(system_id, component_id, msg, gimbal_request_axis_calibration_status->target_system, gimbal_request_axis_calibration_status->target_component); +} + +/** + * @brief Encode a gimbal_request_axis_calibration_status 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_request_axis_calibration_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_gimbal_request_axis_calibration_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_request_axis_calibration_status_t* gimbal_request_axis_calibration_status) +{ + return mavlink_msg_gimbal_request_axis_calibration_status_pack_chan(system_id, component_id, chan, msg, gimbal_request_axis_calibration_status->target_system, gimbal_request_axis_calibration_status->target_component); +} + +/** + * @brief Send a gimbal_request_axis_calibration_status 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_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS_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_REQUEST_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#endif +#else + mavlink_gimbal_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_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_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS, buf, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#endif +#else + mavlink_gimbal_request_axis_calibration_status_t *packet = (mavlink_gimbal_request_axis_calibration_status_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_REQUEST_AXIS_CALIBRATION_STATUS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS UNPACKING + + +/** + * @brief Get field target_system from gimbal_request_axis_calibration_status message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_gimbal_request_axis_calibration_status_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 0); +} + +/** + * @brief Get field target_component from gimbal_request_axis_calibration_status message + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_gimbal_request_axis_calibration_status_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + +/** + * @brief Decode a gimbal_request_axis_calibration_status message into a struct + * + * @param msg The message to decode + * @param gimbal_request_axis_calibration_status C-struct to decode the message contents into + */ +static inline void mavlink_msg_gimbal_request_axis_calibration_status_decode(const mavlink_message_t* msg, mavlink_gimbal_request_axis_calibration_status_t* gimbal_request_axis_calibration_status) +{ +#if MAVLINK_NEED_BYTE_SWAP + gimbal_request_axis_calibration_status->target_system = mavlink_msg_gimbal_request_axis_calibration_status_get_target_system(msg); + gimbal_request_axis_calibration_status->target_component = mavlink_msg_gimbal_request_axis_calibration_status_get_target_component(msg); +#else + memcpy(gimbal_request_axis_calibration_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_REQUEST_AXIS_CALIBRATION_STATUS_LEN); +#endif +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_reset.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_reset.h new file mode 100644 index 0000000000..df1a8cd651 --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_reset.h @@ -0,0 +1,233 @@ +// MESSAGE GIMBAL_RESET PACKING + +#define MAVLINK_MSG_ID_GIMBAL_RESET 202 + +typedef struct __mavlink_gimbal_reset_t +{ + uint8_t target_system; ///< System ID + uint8_t target_component; ///< Component ID +} mavlink_gimbal_reset_t; + +#define MAVLINK_MSG_ID_GIMBAL_RESET_LEN 2 +#define MAVLINK_MSG_ID_202_LEN 2 + +#define MAVLINK_MSG_ID_GIMBAL_RESET_CRC 94 +#define MAVLINK_MSG_ID_202_CRC 94 + + + +#define MAVLINK_MESSAGE_INFO_GIMBAL_RESET { \ + "GIMBAL_RESET", \ + 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) }, \ + } \ +} + + +/** + * @brief Pack a gimbal_reset 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_reset_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_RESET_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_RESET_LEN); +#else + mavlink_gimbal_reset_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_RESET; +#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); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_RESET_LEN); +#endif +} + +/** + * @brief Pack a gimbal_reset 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_reset_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_RESET_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_RESET_LEN); +#else + mavlink_gimbal_reset_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_RESET; +#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); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_RESET_LEN); +#endif +} + +/** + * @brief Encode a gimbal_reset 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 + */ +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) +{ + return mavlink_msg_gimbal_reset_pack(system_id, component_id, msg, gimbal_reset->target_system, gimbal_reset->target_component); +} + +/** + * @brief Encode a gimbal_reset 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 + */ +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) +{ + return mavlink_msg_gimbal_reset_pack_chan(system_id, component_id, chan, msg, gimbal_reset->target_system, gimbal_reset->target_component); +} + +/** + * @brief Send a gimbal_reset 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_reset_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_RESET_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_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN); +#endif +#else + mavlink_gimbal_reset_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_RESET, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_GIMBAL_RESET_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_reset_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_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, buf, MAVLINK_MSG_ID_GIMBAL_RESET_LEN); +#endif +#else + mavlink_gimbal_reset_t *packet = (mavlink_gimbal_reset_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_RESET, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN, MAVLINK_MSG_ID_GIMBAL_RESET_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_RESET, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_RESET_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE GIMBAL_RESET UNPACKING + + +/** + * @brief Get field target_system from gimbal_reset message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_gimbal_reset_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 0); +} + +/** + * @brief Get field target_component from gimbal_reset message + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_gimbal_reset_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + +/** + * @brief Decode a gimbal_reset message into a struct + * + * @param msg The message to decode + * @param gimbal_reset 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) +{ +#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); +#else + memcpy(gimbal_reset, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_RESET_LEN); +#endif +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_factory_parameters.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_factory_parameters.h new file mode 100644 index 0000000000..c0e8790ab7 --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_factory_parameters.h @@ -0,0 +1,521 @@ +// 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 +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_home_offsets.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_home_offsets.h new file mode 100644 index 0000000000..4932b10e7f --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_home_offsets.h @@ -0,0 +1,233 @@ +// 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 +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_request.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_request.h new file mode 100644 index 0000000000..5d747e43bc --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_request.h @@ -0,0 +1,257 @@ +// MESSAGE GOPRO_GET_REQUEST PACKING + +#define MAVLINK_MSG_ID_GOPRO_GET_REQUEST 216 + +typedef struct __mavlink_gopro_get_request_t +{ + uint8_t target_system; ///< System ID + uint8_t target_component; ///< Component ID + uint8_t cmd_id; ///< Command ID +} mavlink_gopro_get_request_t; + +#define MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN 3 +#define MAVLINK_MSG_ID_216_LEN 3 + +#define MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC 50 +#define MAVLINK_MSG_ID_216_CRC 50 + + + +#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_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_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_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_GET_REQUEST_LEN); +#else + 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_GET_REQUEST_LEN); +#endif + + 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_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN); +#endif +} + +/** + * @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_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 cmd_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + 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_GET_REQUEST_LEN); +#else + 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_GET_REQUEST_LEN); +#endif + + 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_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_GET_REQUEST_LEN); +#endif +} + +/** + * @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_get_request C-struct to read the message contents from + */ +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_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_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_get_request C-struct to read the message contents from + */ +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_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_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_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_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_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_GET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN); +#endif +#else + 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_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_GET_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN); +#endif +#endif +} + +#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 + 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_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_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_GET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN); +#endif +#else + 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_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_GET_REQUEST, (const char *)packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE GOPRO_GET_REQUEST UNPACKING + + +/** + * @brief Get field target_system from gopro_get_request message + * + * @return System ID + */ +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_get_request message + * + * @return Component ID + */ +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 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_get_request C-struct to decode the message contents into + */ +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_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_get_request, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN); +#endif +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_response.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_response.h new file mode 100644 index 0000000000..2eb66e1fd4 --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_response.h @@ -0,0 +1,233 @@ +// 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 value; ///< Value +} mavlink_gopro_get_response_t; + +#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN 2 +#define MAVLINK_MSG_ID_217_LEN 2 + +#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC 163 +#define MAVLINK_MSG_ID_217_CRC 163 + + + +#define MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE { \ + "GOPRO_GET_RESPONSE", \ + 2, \ + { { "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_get_response_t, cmd_id) }, \ + { "value", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, 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 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 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, value); + + 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.value = value; + + 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 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 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, value); + + 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.value = value; + + 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->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->value); +} + +/** + * @brief Send a gopro_get_response message + * @param chan MAVLink channel to send the message + * + * @param cmd_id Command ID + * @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 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, value); + +#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.value = value; + +#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 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, value); + +#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->value = value; + +#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 value from gopro_get_response message + * + * @return Value + */ +static inline uint8_t mavlink_msg_gopro_get_response_get_value(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + +/** + * @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->value = mavlink_msg_gopro_get_response_get_value(msg); +#else + memcpy(gopro_get_response, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN); +#endif +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_heartbeat.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_heartbeat.h new file mode 100644 index 0000000000..28fe0ecb10 --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_heartbeat.h @@ -0,0 +1,209 @@ +// MESSAGE GOPRO_HEARTBEAT PACKING + +#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT 215 + +typedef struct __mavlink_gopro_heartbeat_t +{ + uint8_t status; ///< Status +} mavlink_gopro_heartbeat_t; + +#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN 1 +#define MAVLINK_MSG_ID_215_LEN 1 + +#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC 77 +#define MAVLINK_MSG_ID_215_CRC 77 + + + +#define MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT { \ + "GOPRO_HEARTBEAT", \ + 1, \ + { { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_heartbeat_t, status) }, \ + } \ +} + + +/** + * @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 status Status + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_gopro_heartbeat_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN]; + _mav_put_uint8_t(buf, 0, status); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); +#else + mavlink_gopro_heartbeat_t packet; + packet.status = status; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GOPRO_HEARTBEAT; +#if MAVLINK_CRC_EXTRA + 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_HEARTBEAT_LEN); +#endif +} + +/** + * @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 status Status + * @return length of the message in bytes (excluding serial stream start sign) + */ +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 status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN]; + _mav_put_uint8_t(buf, 0, status); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); +#else + mavlink_gopro_heartbeat_t packet; + packet.status = status; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); +#endif + + 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_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); +#endif +} + +/** + * @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_heartbeat C-struct to read the message contents from + */ +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_heartbeat_pack(system_id, component_id, msg, gopro_heartbeat->status); +} + +/** + * @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_heartbeat C-struct to read the message contents from + */ +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_heartbeat_pack_chan(system_id, component_id, chan, msg, gopro_heartbeat->status); +} + +/** + * @brief Send a gopro_heartbeat message + * @param chan MAVLink channel to send the message + * + * @param status Status + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_gopro_heartbeat_send(mavlink_channel_t chan, uint8_t status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN]; + _mav_put_uint8_t(buf, 0, status); + +#if MAVLINK_CRC_EXTRA + _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_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); +#endif +#else + mavlink_gopro_heartbeat_t packet; + packet.status = status; + +#if MAVLINK_CRC_EXTRA + _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_HEARTBEAT, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); +#endif +#endif +} + +#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 + 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_heartbeat_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint8_t(buf, 0, status); + +#if MAVLINK_CRC_EXTRA + _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_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); +#endif +#else + mavlink_gopro_heartbeat_t *packet = (mavlink_gopro_heartbeat_t *)msgbuf; + packet->status = status; + +#if MAVLINK_CRC_EXTRA + _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_HEARTBEAT, (const char *)packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE GOPRO_HEARTBEAT UNPACKING + + +/** + * @brief Get field status from gopro_heartbeat message + * + * @return Status + */ +static inline uint8_t mavlink_msg_gopro_heartbeat_get_status(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 0); +} + +/** + * @brief Decode a gopro_heartbeat message into a struct + * + * @param msg The message to decode + * @param gopro_heartbeat C-struct to decode the message contents into + */ +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_heartbeat->status = mavlink_msg_gopro_heartbeat_get_status(msg); +#else + memcpy(gopro_heartbeat, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); +#endif +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_request.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_request.h new file mode 100644 index 0000000000..c05d0f4f65 --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_request.h @@ -0,0 +1,281 @@ +// MESSAGE GOPRO_SET_REQUEST PACKING + +#define MAVLINK_MSG_ID_GOPRO_SET_REQUEST 218 + +typedef struct __mavlink_gopro_set_request_t +{ + uint8_t target_system; ///< System ID + uint8_t target_component; ///< Component ID + uint8_t cmd_id; ///< Command ID + uint8_t value; ///< Value +} mavlink_gopro_set_request_t; + +#define MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN 4 +#define MAVLINK_MSG_ID_218_LEN 4 + +#define MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC 115 +#define MAVLINK_MSG_ID_218_CRC 115 + + + +#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, 0, 3, offsetof(mavlink_gopro_set_request_t, value) }, \ + } \ +} + + +/** + * @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_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, uint8_t value) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + 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(buf, 3, value); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); +#else + mavlink_gopro_set_request_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + packet.cmd_id = cmd_id; + packet.value = value; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_REQUEST; +#if MAVLINK_CRC_EXTRA + 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_GOPRO_SET_REQUEST_LEN); +#endif +} + +/** + * @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_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 cmd_id,uint8_t value) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + 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(buf, 3, value); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); +#else + mavlink_gopro_set_request_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + packet.cmd_id = cmd_id; + packet.value = value; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); +#endif + + 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_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_GOPRO_SET_REQUEST_LEN); +#endif +} + +/** + * @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 gopro_set_request C-struct to read the message contents from + */ +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_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 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 gopro_set_request C-struct to read the message contents from + */ +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_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 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_gopro_set_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id, uint8_t value) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + 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(buf, 3, value); + +#if MAVLINK_CRC_EXTRA + _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_GOPRO_SET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); +#endif +#else + mavlink_gopro_set_request_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + packet.cmd_id = cmd_id; + packet.value = value; + +#if MAVLINK_CRC_EXTRA + _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_GOPRO_SET_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); +#endif +#endif +} + +#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 + 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_set_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id, 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(buf, 3, value); + +#if MAVLINK_CRC_EXTRA + _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_GOPRO_SET_REQUEST, buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); +#endif +#else + 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; + packet->value = value; + +#if MAVLINK_CRC_EXTRA + _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_GOPRO_SET_REQUEST, (const char *)packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE GOPRO_SET_REQUEST UNPACKING + + +/** + * @brief Get field target_system from gopro_set_request message + * + * @return System ID + */ +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 gopro_set_request message + * + * @return Component ID + */ +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 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 uint8_t mavlink_msg_gopro_set_request_get_value(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 3); +} + +/** + * @brief Decode a gopro_set_request message into a struct + * + * @param msg The message to decode + * @param gopro_set_request C-struct to decode the message contents into + */ +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 + 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); + gopro_set_request->value = mavlink_msg_gopro_set_request_get_value(msg); +#else + memcpy(gopro_set_request, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); +#endif +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_response.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_response.h new file mode 100644 index 0000000000..d4dee54b7d --- /dev/null +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_response.h @@ -0,0 +1,233 @@ +// MESSAGE GOPRO_SET_RESPONSE PACKING + +#define MAVLINK_MSG_ID_GOPRO_SET_RESPONSE 219 + +typedef struct __mavlink_gopro_set_response_t +{ + uint8_t cmd_id; ///< Command ID + uint8_t result; ///< Result +} mavlink_gopro_set_response_t; + +#define MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN 2 +#define MAVLINK_MSG_ID_219_LEN 2 + +#define MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC 47 +#define MAVLINK_MSG_ID_219_CRC 47 + + + +#define MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE { \ + "GOPRO_SET_RESPONSE", \ + 2, \ + { { "cmd_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_set_response_t, cmd_id) }, \ + { "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_set_response_t, result) }, \ + } \ +} + + +/** + * @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 cmd_id Command ID + * @param result Result + * @return length of the message in bytes (excluding serial stream start sign) + */ +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 result) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN]; + _mav_put_uint8_t(buf, 0, cmd_id); + _mav_put_uint8_t(buf, 1, result); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); +#else + mavlink_gopro_set_response_t packet; + packet.cmd_id = cmd_id; + packet.result = result; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_RESPONSE; +#if MAVLINK_CRC_EXTRA + 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_GOPRO_SET_RESPONSE_LEN); +#endif +} + +/** + * @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 cmd_id Command ID + * @param result Result + * @return length of the message in bytes (excluding serial stream start sign) + */ +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 cmd_id,uint8_t result) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN]; + _mav_put_uint8_t(buf, 0, cmd_id); + _mav_put_uint8_t(buf, 1, result); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); +#else + mavlink_gopro_set_response_t packet; + packet.cmd_id = cmd_id; + packet.result = result; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); +#endif + + 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_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_GOPRO_SET_RESPONSE_LEN); +#endif +} + +/** + * @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 gopro_set_response C-struct to read the message contents from + */ +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_gopro_set_response_pack(system_id, component_id, msg, gopro_set_response->cmd_id, gopro_set_response->result); +} + +/** + * @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 gopro_set_response C-struct to read the message contents from + */ +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_gopro_set_response_pack_chan(system_id, component_id, chan, msg, gopro_set_response->cmd_id, gopro_set_response->result); +} + +/** + * @brief Send a gopro_set_response message + * @param chan MAVLink channel to send the message + * + * @param cmd_id Command ID + * @param result Result + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_gopro_set_response_send(mavlink_channel_t chan, uint8_t cmd_id, uint8_t result) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN]; + _mav_put_uint8_t(buf, 0, cmd_id); + _mav_put_uint8_t(buf, 1, result); + +#if MAVLINK_CRC_EXTRA + _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_GOPRO_SET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); +#endif +#else + mavlink_gopro_set_response_t packet; + packet.cmd_id = cmd_id; + packet.result = result; + +#if MAVLINK_CRC_EXTRA + _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_GOPRO_SET_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); +#endif +#endif +} + +#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 + 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_set_response_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t cmd_id, uint8_t result) +{ +#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, result); + +#if MAVLINK_CRC_EXTRA + _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_GOPRO_SET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); +#endif +#else + mavlink_gopro_set_response_t *packet = (mavlink_gopro_set_response_t *)msgbuf; + packet->cmd_id = cmd_id; + packet->result = result; + +#if MAVLINK_CRC_EXTRA + _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_GOPRO_SET_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE GOPRO_SET_RESPONSE UNPACKING + + +/** + * @brief Get field cmd_id from gopro_set_response message + * + * @return Command ID + */ +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 result from gopro_set_response message + * + * @return Result + */ +static inline uint8_t mavlink_msg_gopro_set_response_get_result(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + +/** + * @brief Decode a gopro_set_response message into a struct + * + * @param msg The message to decode + * @param gopro_set_response C-struct to decode the message contents into + */ +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 + gopro_set_response->cmd_id = mavlink_msg_gopro_set_response_get_cmd_id(msg); + gopro_set_response->result = mavlink_msg_gopro_set_response_get_result(msg); +#else + memcpy(gopro_set_response, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); +#endif +} diff --git a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/testsuite.h b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/testsuite.h index bd08e4e30e..a92da64c5e 100644 --- a/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/testsuite.h +++ b/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega/testsuite.h @@ -1809,6 +1809,771 @@ 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) +{ + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_gimbal_reset_t packet_in = { + 5,72 + }; + mavlink_gimbal_reset_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_reset_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_gimbal_reset_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_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_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; i