diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h index 8050bba..15c5f79 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h +++ b/firmware/alce-osd.X/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, 25, 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} +#define MAVLINK_MESSAGE_LENGTHS {9, 31, 12, 0, 14, 28, 3, 32, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 25, 23, 30, 101, 22, 26, 16, 14, 28, 32, 28, 28, 22, 22, 21, 6, 6, 37, 4, 4, 2, 2, 4, 2, 2, 3, 13, 12, 37, 0, 0, 0, 27, 25, 0, 0, 0, 0, 0, 68, 26, 185, 229, 42, 6, 4, 0, 11, 18, 0, 0, 37, 20, 35, 33, 3, 0, 0, 0, 22, 39, 37, 53, 51, 53, 51, 0, 28, 56, 42, 33, 0, 0, 0, 0, 0, 0, 0, 26, 32, 32, 20, 32, 62, 44, 64, 84, 9, 254, 16, 12, 36, 44, 64, 22, 6, 14, 12, 97, 2, 2, 113, 35, 6, 79, 35, 35, 22, 13, 255, 14, 18, 43, 8, 22, 14, 36, 43, 41, 32, 243, 14, 0, 0, 100, 36, 60, 30, 42, 8, 4, 12, 15, 13, 6, 15, 14, 0, 12, 3, 8, 28, 44, 3, 9, 22, 12, 18, 34, 66, 98, 8, 48, 19, 3, 20, 24, 29, 45, 4, 40, 2, 206, 7, 29, 0, 0, 0, 0, 27, 44, 22, 25, 0, 0, 0, 0, 0, 42, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 3, 3, 6, 7, 2, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 52, 53, 6, 2, 38, 0, 254, 36, 30, 18, 18, 51, 9, 0} #endif #ifndef MAVLINK_MESSAGE_CRCS -#define MAVLINK_MESSAGE_CRCS {50, 124, 137, 0, 237, 217, 104, 119, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 214, 159, 220, 168, 24, 23, 170, 144, 67, 115, 39, 246, 185, 104, 237, 244, 222, 212, 9, 254, 230, 28, 28, 132, 221, 232, 11, 153, 41, 39, 78, 0, 0, 0, 15, 3, 0, 0, 0, 0, 0, 153, 183, 51, 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, 98, 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} +#define MAVLINK_MESSAGE_CRCS {50, 124, 137, 0, 237, 217, 104, 119, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 214, 159, 220, 168, 24, 23, 170, 144, 67, 115, 39, 246, 185, 104, 237, 244, 222, 212, 9, 254, 230, 28, 28, 132, 221, 232, 11, 153, 41, 39, 78, 0, 0, 0, 15, 3, 0, 0, 0, 0, 0, 153, 183, 51, 59, 118, 148, 21, 0, 243, 124, 0, 0, 38, 20, 158, 152, 143, 0, 0, 0, 106, 49, 22, 143, 140, 5, 150, 0, 231, 183, 63, 54, 0, 0, 0, 0, 0, 0, 0, 175, 102, 158, 208, 56, 93, 138, 108, 32, 185, 84, 34, 174, 124, 237, 4, 76, 128, 56, 116, 134, 237, 203, 250, 87, 203, 220, 25, 226, 46, 29, 223, 85, 6, 229, 203, 1, 195, 109, 168, 181, 47, 72, 131, 0, 0, 103, 154, 178, 200, 134, 219, 208, 188, 84, 22, 19, 21, 134, 0, 78, 68, 189, 127, 154, 21, 21, 144, 1, 234, 73, 181, 22, 83, 167, 138, 234, 240, 47, 189, 52, 174, 229, 85, 159, 186, 72, 0, 0, 0, 0, 92, 36, 71, 98, 0, 0, 0, 0, 0, 134, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 101, 50, 202, 17, 162, 0, 0, 0, 0, 0, 0, 207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 104, 85, 95, 130, 184, 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, MAVLINK_MESSAGE_INFO_PID_TUNING, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT, MAVLINK_MESSAGE_INFO_GIMBAL_CONTROL, MAVLINK_MESSAGE_INFO_GIMBAL_RESET, MAVLINK_MESSAGE_INFO_GIMBAL_AXIS_CALIBRATION_PROGRESS, MAVLINK_MESSAGE_INFO_GIMBAL_SET_HOME_OFFSETS, MAVLINK_MESSAGE_INFO_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, MAVLINK_MESSAGE_INFO_GIMBAL_SET_FACTORY_PARAMETERS, MAVLINK_MESSAGE_INFO_GIMBAL_FACTORY_PARAMETERS_LOADED, MAVLINK_MESSAGE_INFO_GIMBAL_ERASE_FIRMWARE_AND_CONFIG, MAVLINK_MESSAGE_INFO_GIMBAL_PERFORM_FACTORY_TESTS, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT_FACTORY_TESTS_PROGRESS, 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}}}} +#define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_SET_MODE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS, MAVLINK_MESSAGE_INFO_SET_MAG_OFFSETS, MAVLINK_MESSAGE_INFO_MEMINFO, MAVLINK_MESSAGE_INFO_AP_ADC, MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE, MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE, MAVLINK_MESSAGE_INFO_MOUNT_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_STATUS, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_FENCE_POINT, MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_AHRS, MAVLINK_MESSAGE_INFO_SIMSTATE, MAVLINK_MESSAGE_INFO_HWSTATUS, MAVLINK_MESSAGE_INFO_RADIO, MAVLINK_MESSAGE_INFO_LIMITS_STATUS, MAVLINK_MESSAGE_INFO_WIND, MAVLINK_MESSAGE_INFO_DATA16, MAVLINK_MESSAGE_INFO_DATA32, MAVLINK_MESSAGE_INFO_DATA64, MAVLINK_MESSAGE_INFO_DATA96, MAVLINK_MESSAGE_INFO_RANGEFINDER, MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL, MAVLINK_MESSAGE_INFO_RALLY_POINT, MAVLINK_MESSAGE_INFO_RALLY_FETCH_POINT, MAVLINK_MESSAGE_INFO_COMPASSMOT_STATUS, MAVLINK_MESSAGE_INFO_AHRS2, MAVLINK_MESSAGE_INFO_CAMERA_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK, MAVLINK_MESSAGE_INFO_BATTERY2, MAVLINK_MESSAGE_INFO_AHRS3, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION_REQUEST, MAVLINK_MESSAGE_INFO_REMOTE_LOG_DATA_BLOCK, MAVLINK_MESSAGE_INFO_REMOTE_LOG_BLOCK_STATUS, MAVLINK_MESSAGE_INFO_LED_CONTROL, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, MAVLINK_MESSAGE_INFO_PID_TUNING, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT, MAVLINK_MESSAGE_INFO_GIMBAL_CONTROL, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_GIMBAL_TORQUE_CMD_REPORT, MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT, MAVLINK_MESSAGE_INFO_GOPRO_GET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE, MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_RPM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}} #endif #include "../protocol.h" @@ -34,7 +34,7 @@ extern "C" { // ENUM DEFINITIONS -/** @brief */ +/** @brief Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. */ #ifndef HAVE_ENUM_MAV_CMD #define HAVE_ENUM_MAV_CMD typedef enum MAV_CMD @@ -44,13 +44,19 @@ typedef enum MAV_CMD MAV_CMD_NAV_LOITER_TURNS=18, /* Loiter around this MISSION for X turns |Turns| Empty| Radius around MISSION, in meters. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */ MAV_CMD_NAV_LOITER_TIME=19, /* Loiter around this MISSION for X seconds |Seconds (decimal)| Empty| Radius around MISSION, in meters. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */ MAV_CMD_NAV_RETURN_TO_LAUNCH=20, /* Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_LAND=21, /* Land at location |Empty| Empty| Empty| Desired yaw angle.| Latitude| Longitude| Altitude| */ + MAV_CMD_NAV_LAND=21, /* Land at location |Abort Alt| Empty| Empty| Desired yaw angle| Latitude| Longitude| Altitude| */ MAV_CMD_NAV_TAKEOFF=22, /* Takeoff from ground / hand |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT=30, /* Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. |Empty| Empty| Empty| Empty| Empty| Empty| Desired altitude in meters| */ + MAV_CMD_NAV_LAND_LOCAL=23, /* Land at local position (local frame only) |Landing target number (if available)| Maximum accepted offset from desired landing position [m] - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| Landing descend rate [ms^-1]| Desired yaw angle [rad]| Y-axis position [m]| X-axis position [m]| Z-axis / ground level position [m]| */ + MAV_CMD_NAV_TAKEOFF_LOCAL=24, /* Takeoff from local position (local frame only) |Minimum pitch (if airspeed sensor present), desired pitch without sensor [rad]| Empty| Takeoff ascend rate [ms^-1]| Yaw angle [rad] (if magnetometer or another yaw estimation source present), ignored without one of these| Y-axis position [m]| X-axis position [m]| Z-axis position [m]| */ + MAV_CMD_NAV_FOLLOW=25, /* Vehicle following, i.e. this waypoint represents the position of a moving vehicle |Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Ground speed of vehicle to be followed| Radius around MISSION, in meters. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */ + MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT=30, /* Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. |Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude. | Empty| Empty| Empty| Empty| Empty| Desired altitude in meters| */ MAV_CMD_NAV_LOITER_TO_ALT=31, /* Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. |Heading Required (0 = False)| Radius in meters. If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| Empty| Empty| Latitude| Longitude| Altitude| */ MAV_CMD_NAV_ROI=80, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicles control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of intereset mode. (see MAV_ROI enum)| MISSION index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */ MAV_CMD_NAV_PATHPLANNING=81, /* Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal, in compass degrees, [0..360]| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ MAV_CMD_NAV_SPLINE_WAYPOINT=82, /* Navigate to MISSION using a spline path. |Hold time in decimal seconds. (ignored by fixed wing, time to stay at MISSION for rotary wing)| Empty| Empty| Empty| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ + MAV_CMD_NAV_ALTITUDE_WAIT=83, /* Mission command to wait for an altitude or downwards vertical speed. This is meant for high altitude balloon launches, allowing the aircraft to be idle until either an altitude is reached or a negative vertical speed is reached (indicating early balloon burst). The wiggle time is how often to wiggle the control surfaces to prevent them seizing up. |altitude (m)| descent speed (m/s)| Wiggle Time (s)| Empty| Empty| Empty| Empty| */ + MAV_CMD_NAV_VTOL_TAKEOFF=84, /* Takeoff from ground using VTOL mode |Empty| Empty| Empty| Yaw angle in degrees| Latitude| Longitude| Altitude| */ + MAV_CMD_NAV_VTOL_LAND=85, /* Land using VTOL mode |Empty| Empty| Empty| Yaw angle in degrees| Latitude| Longitude| Altitude| */ MAV_CMD_NAV_GUIDED_ENABLE=92, /* hand control over to an external controller |On / Off (> 0.5f on)| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_NAV_LAST=95, /* NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_CONDITION_DELAY=112, /* Delay mission state machine. |Delay in seconds (decimal)| Empty| Empty| Empty| Empty| Empty| Empty| */ @@ -58,7 +64,7 @@ typedef enum MAV_CMD MAV_CMD_CONDITION_DISTANCE=114, /* Delay mission state machine until within desired distance of next NAV point. |Distance (meters)| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_CONDITION_YAW=115, /* Reach a certain target angle. |target angle: [0-360], 0 is north| speed during yaw change:[deg per second]| direction: negative: counter clockwise, positive: clockwise [-1,1]| relative offset or absolute angle: [ 1,0]| Empty| Empty| Empty| */ MAV_CMD_CONDITION_LAST=159, /* NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MODE=176, /* Set system mode. |Mode, as defined by ENUM MAV_MODE| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_DO_SET_MODE=176, /* Set system mode. |Mode, as defined by ENUM MAV_MODE| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_JUMP=177, /* Jump to the desired command in the mission list. Repeat this action only the specified number of times |Sequence number| Repeat count| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_CHANGE_SPEED=178, /* Change speed and/or throttle set points. |Speed type (0=Airspeed, 1=Ground Speed)| Speed (m/s, -1 indicates no change)| Throttle ( Percent, -1 indicates no change)| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_SET_HOME=179, /* Changes the home location either to the current location or a specified location. |Use current (1=use current location, 0=use specified location)| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ @@ -78,32 +84,52 @@ typedef enum MAV_CMD MAV_CMD_DO_MOUNT_CONFIGURE=204, /* Mission command to configure a camera or antenna mount |Mount operation mode (see MAV_MOUNT_MODE enum)| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| Empty| Empty| Empty| */ MAV_CMD_DO_MOUNT_CONTROL=205, /* Mission command to control a camera or antenna mount |pitch or lat in degrees, depending on mount mode.| roll or lon in degrees depending on mount mode| yaw or alt (in meters) depending on mount mode| reserved| reserved| reserved| MAV_MOUNT_MODE enum value| */ MAV_CMD_DO_SET_CAM_TRIGG_DIST=206, /* Mission command to set CAM_TRIGG_DIST for this flight |Camera trigger distance (meters)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_FENCE_ENABLE=207, /* Mission command to enable the geofence |enable? (0=disable, 1=enable)| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_DO_FENCE_ENABLE=207, /* Mission command to enable the geofence |enable? (0=disable, 1=enable, 2=disable_floor_only)| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_PARACHUTE=208, /* Mission command to trigger a parachute |action (0=disable, 1=enable, 2=release, for some systems see PARACHUTE_ACTION enum, not in general message set.)| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_MOTOR_TEST=209, /* Mission command to perform motor test |motor sequence number (a number from 1 to max number of motors on the vehicle)| throttle type (0=throttle percentage, 1=PWM, 2=pilot throttle channel pass-through. See MOTOR_TEST_THROTTLE_TYPE enum)| throttle| timeout (in seconds)| Empty| Empty| Empty| */ MAV_CMD_DO_INVERTED_FLIGHT=210, /* Change to/from inverted flight |inverted (0=normal, 1=inverted)| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_GRIPPER=211, /* Mission command to operate EPM gripper |gripper number (a number from 1 to max number of grippers on the vehicle)| gripper action (0=release, 1=grab. See GRIPPER_ACTIONS enum)| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_DO_AUTOTUNE_ENABLE=212, /* Enable/disable autotune |enable (1: enable, 0:disable)| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_MOUNT_CONTROL_QUAT=220, /* Mission command to control a camera or antenna mount, using a quaternion as reference. |q1 - quaternion param #1, w (1 in null-rotation)| q2 - quaternion param #2, x (0 in null-rotation)| q3 - quaternion param #3, y (0 in null-rotation)| q4 - quaternion param #4, z (0 in null-rotation)| Empty| Empty| Empty| */ MAV_CMD_DO_GUIDED_MASTER=221, /* set id of master controller |System ID| Component ID| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_GUIDED_LIMITS=222, /* set limits for external control |timeout - maximum time (in seconds) that external controller will be allowed to control vehicle. 0 means no timeout| absolute altitude min (in meters, AMSL) - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit| absolute altitude max (in meters)- if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit| horizontal move limit (in meters, AMSL) - if vehicle moves more than this distance from it's location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal altitude limit| Empty| Empty| Empty| */ MAV_CMD_DO_LAST=240, /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_PREFLIGHT_CALIBRATION=241, /* Trigger calibration. This command will be only accepted if in pre-flight mode. |Gyro calibration: 0: no, 1: yes| Magnetometer calibration: 0: no, 1: yes| Ground pressure: 0: no, 1: yes| Radio calibration: 0: no, 1: yes| Accelerometer calibration: 0: no, 1: yes| Compass/Motor interference calibration: 0: no, 1: yes| Empty| */ MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS=242, /* Set sensor offsets. This command will be only accepted if in pre-flight mode. |Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer| X axis offset (or generic dimension 1), in the sensor's raw units| Y axis offset (or generic dimension 2), in the sensor's raw units| Z axis offset (or generic dimension 3), in the sensor's raw units| Generic dimension 4, in the sensor's raw units| Generic dimension 5, in the sensor's raw units| Generic dimension 6, in the sensor's raw units| */ - MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Parameter storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM| Mission storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM| Reserved| Reserved| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN=246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer.| Reserved| Reserved| Empty| Empty| Empty| */ + MAV_CMD_PREFLIGHT_UAVCAN=243, /* Trigger UAVCAN config. This command will be only accepted if in pre-flight mode. |1: Trigger actuator ID assignment and direction mapping.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ + MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Parameter storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM, 2: Reset to defaults| Mission storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM, 2: Reset to defaults| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: start logging with rate of param 3 in Hz (e.g. set to 1000 for 1000 Hz logging)| Reserved| Empty| Empty| Empty| */ + MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN=246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| Reserved, send 0| Reserved, send 0| Reserved, send 0| Reserved, send 0| Reserved, send 0| */ MAV_CMD_OVERRIDE_GOTO=252, /* Hold / continue the current action |MAV_GOTO_DO_HOLD: hold MAV_GOTO_DO_CONTINUE: continue with next item in mission plan| MAV_GOTO_HOLD_AT_CURRENT_POSITION: Hold at current position MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position| MAV_FRAME coordinate frame of hold point| Desired yaw angle in degrees| Latitude / X position| Longitude / Y position| Altitude / Z position| */ MAV_CMD_MISSION_START=300, /* start running a mission |first_item: the first mission item to run| last_item: the last mission item to run (after this item is run, the mission ends)| */ MAV_CMD_COMPONENT_ARM_DISARM=400, /* Arms / Disarms a component |1 to arm, 0 to disarm| */ + MAV_CMD_GET_HOME_POSITION=410, /* Request the home position from the vehicle. |Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ MAV_CMD_START_RX_PAIR=500, /* Starts receiver pairing |0:Spektrum| 0:Spektrum DSM2, 1:Spektrum DSMX| */ + MAV_CMD_GET_MESSAGE_INTERVAL=510, /* Request the interval between messages for a particular MAVLink message ID |The MAVLink message ID| */ + MAV_CMD_SET_MESSAGE_INTERVAL=511, /* Request the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM |The MAVLink message ID| The interval between two messages, in microseconds. Set to -1 to disable and 0 to request default rate.| */ MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES=520, /* Request autopilot capabilities |1: Request autopilot version| Reserved (all remaining params)| */ MAV_CMD_IMAGE_START_CAPTURE=2000, /* Start image capture sequence |Duration between two consecutive pictures (in seconds)| Number of images to capture total - 0 for unlimited capture| Resolution in megapixels (0.3 for 640x480, 1.3 for 1280x720, etc)| */ MAV_CMD_IMAGE_STOP_CAPTURE=2001, /* Stop image capture sequence |Reserved| Reserved| */ + MAV_CMD_DO_TRIGGER_CONTROL=2003, /* Enable or disable on-board camera triggering system. |Trigger enable/disable (0 for disable, 1 for start)| Shutter integration time (in ms)| Reserved| */ MAV_CMD_VIDEO_START_CAPTURE=2500, /* Starts video capture |Camera ID (0 for all cameras), 1 for first, 2 for second, etc.| Frames per second| Resolution in megapixels (0.3 for 640x480, 1.3 for 1280x720, etc)| */ MAV_CMD_VIDEO_STOP_CAPTURE=2501, /* Stop the current video capture |Reserved| Reserved| */ MAV_CMD_PANORAMA_CREATE=2800, /* Create a panorama at the current position |Viewing angle horizontal of the panorama (in degrees, +- 0.5 the total angle)| Viewing angle vertical of panorama (in degrees)| Speed of the horizontal rotation (in degrees per second)| Speed of the vertical rotation (in degrees per second)| */ + MAV_CMD_DO_VTOL_TRANSITION=3000, /* Request VTOL transition |The target VTOL state, as defined by ENUM MAV_VTOL_STATE. Only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| */ MAV_CMD_PAYLOAD_PREPARE_DEPLOY=30001, /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in degrees compass heading (0..360). A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overriden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position in meters. A negative value indicates the system can define the clearance at will.| Latitude unscaled for MISSION_ITEM or in 1e7 degrees for MISSION_ITEM_INT| Longitude unscaled for MISSION_ITEM or in 1e7 degrees for MISSION_ITEM_INT| Altitude, in meters AMSL| */ MAV_CMD_PAYLOAD_CONTROL_DEPLOY=30002, /* Control the payload deployment. |Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deploment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_ENUM_END=30003, /* | */ + MAV_CMD_POWER_OFF_INITIATED=42000, /* A system wide power-off event has been initiated. |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_SOLO_BTN_FLY_CLICK=42001, /* FLY button has been clicked. |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_SOLO_BTN_FLY_HOLD=42002, /* FLY button has been held for 1.5 seconds. |Takeoff altitude| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_SOLO_BTN_PAUSE_CLICK=42003, /* PAUSE button has been clicked. |1 if Solo is in a shot mode, 0 otherwise| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_DO_START_MAG_CAL=42424, /* Initiate a magnetometer calibration |uint8_t bitmask of magnetometers (0 means all)| Automatically retry on failure (0=no retry, 1=retry).| Save without user input (0=require input, 1=autosave).| Delay (seconds)| Autoreboot (0=user reboot, 1=autoreboot)| Empty| Empty| */ + MAV_CMD_DO_ACCEPT_MAG_CAL=42425, /* Initiate a magnetometer calibration |uint8_t bitmask of magnetometers (0 means all)| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_DO_CANCEL_MAG_CAL=42426, /* Cancel a running magnetometer calibration |uint8_t bitmask of magnetometers (0 means all)| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_SET_FACTORY_TEST_MODE=42427, /* Command autopilot to get into factory test/diagnostic mode |0 means get out of test mode, 1 means get into test mode| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_DO_SEND_BANNER=42428, /* Reply with the version banner |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_GIMBAL_RESET=42501, /* Causes the gimbal to reset and boot as if it was just powered on |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_GIMBAL_AXIS_CALIBRATION_STATUS=42502, /* Reports progress and success or failure of gimbal axis calibration procedure |Gimbal axis we're reporting calibration progress for| Current calibration progress for this axis, 0x64=100%| Status of the calibration| Empty| Empty| Empty| Empty| */ + MAV_CMD_GIMBAL_REQUEST_AXIS_CALIBRATION=42503, /* Starts commutation calibration on the gimbal |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_GIMBAL_FULL_RESET=42505, /* Erases gimbal application and parameters |Magic number| Magic number| Magic number| Magic number| Magic number| Magic number| Magic number| */ + MAV_CMD_ENUM_END=42506, /* | */ } MAV_CMD; #endif @@ -112,12 +138,12 @@ typedef enum MAV_CMD #define HAVE_ENUM_LIMITS_STATE typedef enum LIMITS_STATE { - LIMITS_INIT=0, /* pre-initialization | */ - LIMITS_DISABLED=1, /* disabled | */ - LIMITS_ENABLED=2, /* checking limits | */ - LIMITS_TRIGGERED=3, /* a limit has been breached | */ - LIMITS_RECOVERING=4, /* taking action eg. RTL | */ - LIMITS_RECOVERED=5, /* we're no longer in breach of a limit | */ + LIMITS_INIT=0, /* pre-initialization | */ + LIMITS_DISABLED=1, /* disabled | */ + LIMITS_ENABLED=2, /* checking limits | */ + LIMITS_TRIGGERED=3, /* a limit has been breached | */ + LIMITS_RECOVERING=4, /* taking action eg. RTL | */ + LIMITS_RECOVERED=5, /* we're no longer in breach of a limit | */ LIMITS_STATE_ENUM_END=6, /* | */ } LIMITS_STATE; #endif @@ -127,9 +153,9 @@ typedef enum LIMITS_STATE #define HAVE_ENUM_LIMIT_MODULE typedef enum LIMIT_MODULE { - LIMIT_GPSLOCK=1, /* pre-initialization | */ - LIMIT_GEOFENCE=2, /* disabled | */ - LIMIT_ALTITUDE=4, /* checking limits | */ + LIMIT_GPSLOCK=1, /* pre-initialization | */ + LIMIT_GEOFENCE=2, /* disabled | */ + LIMIT_ALTITUDE=4, /* checking limits | */ LIMIT_MODULE_ENUM_END=5, /* | */ } LIMIT_MODULE; #endif @@ -139,8 +165,8 @@ typedef enum LIMIT_MODULE #define HAVE_ENUM_RALLY_FLAGS typedef enum RALLY_FLAGS { - FAVORABLE_WIND=1, /* Flag set when requiring favorable winds for landing. | */ - LAND_IMMEDIATELY=2, /* Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land. | */ + FAVORABLE_WIND=1, /* Flag set when requiring favorable winds for landing. | */ + LAND_IMMEDIATELY=2, /* Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land. | */ RALLY_FLAGS_ENUM_END=3, /* | */ } RALLY_FLAGS; #endif @@ -221,7 +247,7 @@ typedef enum MAV_MODE_GIMBAL MAV_MODE_GIMBAL_CALIBRATING_YAW=3, /* Gimbal is currently running calibration on the yaw axis | */ MAV_MODE_GIMBAL_INITIALIZED=4, /* Gimbal has finished calibrating and initializing, but is relaxed pending reception of first rate command from copter | */ MAV_MODE_GIMBAL_ACTIVE=5, /* Gimbal is actively stabilizing | */ - MAV_MODE_GIMBAL_RATE_CMD_TIMEOUT=6, /* Gimbal is relaxed because it missed more than 10 expected rate command messages in a row. Gimbal will move back to active mode when it receives a new rate command | */ + MAV_MODE_GIMBAL_RATE_CMD_TIMEOUT=6, /* Gimbal is relaxed because it missed more than 10 expected rate command messages in a row. Gimbal will move back to active mode when it receives a new rate command | */ MAV_MODE_GIMBAL_ENUM_END=7, /* | */ } MAV_MODE_GIMBAL; #endif @@ -250,16 +276,6 @@ typedef enum GIMBAL_AXIS_CALIBRATION_STATUS } 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 @@ -279,24 +295,31 @@ 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_CONNECTED=2, /* A HeroBus compatible GoPro is connected | */ + GOPRO_HEARTBEAT_STATUS_ERROR=3, /* An unrecoverable error was encountered with the connected GoPro, it may require a power cycle | */ + GOPRO_HEARTBEAT_STATUS_ENUM_END=4, /* | */ } GOPRO_HEARTBEAT_STATUS; #endif /** @brief */ -#ifndef HAVE_ENUM_GOPRO_SET_RESPONSE_RESULT -#define HAVE_ENUM_GOPRO_SET_RESPONSE_RESULT -typedef enum GOPRO_SET_RESPONSE_RESULT +#ifndef HAVE_ENUM_GOPRO_HEARTBEAT_FLAGS +#define HAVE_ENUM_GOPRO_HEARTBEAT_FLAGS +typedef enum GOPRO_HEARTBEAT_FLAGS { - 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; + GOPRO_FLAG_RECORDING=1, /* GoPro is currently recording | */ + GOPRO_HEARTBEAT_FLAGS_ENUM_END=2, /* | */ +} GOPRO_HEARTBEAT_FLAGS; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_REQUEST_STATUS +#define HAVE_ENUM_GOPRO_REQUEST_STATUS +typedef enum GOPRO_REQUEST_STATUS +{ + GOPRO_REQUEST_SUCCESS=0, /* The write message with ID indicated succeeded | */ + GOPRO_REQUEST_FAILED=1, /* The write message with ID indicated failed | */ + GOPRO_REQUEST_STATUS_ENUM_END=2, /* | */ +} GOPRO_REQUEST_STATUS; #endif /** @brief */ @@ -309,11 +332,245 @@ typedef enum GOPRO_COMMAND 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_VIDEO_SETTINGS=5, /* (Get/Set) | */ + GOPRO_COMMAND_LOW_LIGHT=6, /* (Get/Set) | */ + GOPRO_COMMAND_PHOTO_RESOLUTION=7, /* (Get/Set) | */ + GOPRO_COMMAND_PHOTO_BURST_RATE=8, /* (Get/Set) | */ + GOPRO_COMMAND_PROTUNE=9, /* (Get/Set) | */ + GOPRO_COMMAND_PROTUNE_WHITE_BALANCE=10, /* (Get/Set) Hero 3+ Only | */ + GOPRO_COMMAND_PROTUNE_COLOUR=11, /* (Get/Set) Hero 3+ Only | */ + GOPRO_COMMAND_PROTUNE_GAIN=12, /* (Get/Set) Hero 3+ Only | */ + GOPRO_COMMAND_PROTUNE_SHARPNESS=13, /* (Get/Set) Hero 3+ Only | */ + GOPRO_COMMAND_PROTUNE_EXPOSURE=14, /* (Get/Set) Hero 3+ Only | */ + GOPRO_COMMAND_TIME=15, /* (Get/Set) | */ + GOPRO_COMMAND_CHARGING=16, /* (Get/Set) | */ + GOPRO_COMMAND_ENUM_END=17, /* | */ } GOPRO_COMMAND; #endif +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_CAPTURE_MODE +#define HAVE_ENUM_GOPRO_CAPTURE_MODE +typedef enum GOPRO_CAPTURE_MODE +{ + GOPRO_CAPTURE_MODE_VIDEO=0, /* Video mode | */ + GOPRO_CAPTURE_MODE_PHOTO=1, /* Photo mode | */ + GOPRO_CAPTURE_MODE_BURST=2, /* Burst mode, hero 3+ only | */ + GOPRO_CAPTURE_MODE_TIME_LAPSE=3, /* Time lapse mode, hero 3+ only | */ + GOPRO_CAPTURE_MODE_MULTI_SHOT=4, /* Multi shot mode, hero 4 only | */ + GOPRO_CAPTURE_MODE_PLAYBACK=5, /* Playback mode, hero 4 only, silver only except when LCD or HDMI is connected to black | */ + GOPRO_CAPTURE_MODE_SETUP=6, /* Playback mode, hero 4 only | */ + GOPRO_CAPTURE_MODE_UNKNOWN=255, /* Mode not yet known | */ + GOPRO_CAPTURE_MODE_ENUM_END=256, /* | */ +} GOPRO_CAPTURE_MODE; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_RESOLUTION +#define HAVE_ENUM_GOPRO_RESOLUTION +typedef enum GOPRO_RESOLUTION +{ + GOPRO_RESOLUTION_480p=0, /* 848 x 480 (480p) | */ + GOPRO_RESOLUTION_720p=1, /* 1280 x 720 (720p) | */ + GOPRO_RESOLUTION_960p=2, /* 1280 x 960 (960p) | */ + GOPRO_RESOLUTION_1080p=3, /* 1920 x 1080 (1080p) | */ + GOPRO_RESOLUTION_1440p=4, /* 1920 x 1440 (1440p) | */ + GOPRO_RESOLUTION_2_7k_17_9=5, /* 2704 x 1440 (2.7k-17:9) | */ + GOPRO_RESOLUTION_2_7k_16_9=6, /* 2704 x 1524 (2.7k-16:9) | */ + GOPRO_RESOLUTION_2_7k_4_3=7, /* 2704 x 2028 (2.7k-4:3) | */ + GOPRO_RESOLUTION_4k_16_9=8, /* 3840 x 2160 (4k-16:9) | */ + GOPRO_RESOLUTION_4k_17_9=9, /* 4096 x 2160 (4k-17:9) | */ + GOPRO_RESOLUTION_720p_SUPERVIEW=10, /* 1280 x 720 (720p-SuperView) | */ + GOPRO_RESOLUTION_1080p_SUPERVIEW=11, /* 1920 x 1080 (1080p-SuperView) | */ + GOPRO_RESOLUTION_2_7k_SUPERVIEW=12, /* 2704 x 1520 (2.7k-SuperView) | */ + GOPRO_RESOLUTION_4k_SUPERVIEW=13, /* 3840 x 2160 (4k-SuperView) | */ + GOPRO_RESOLUTION_ENUM_END=14, /* | */ +} GOPRO_RESOLUTION; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_FRAME_RATE +#define HAVE_ENUM_GOPRO_FRAME_RATE +typedef enum GOPRO_FRAME_RATE +{ + GOPRO_FRAME_RATE_12=0, /* 12 FPS | */ + GOPRO_FRAME_RATE_15=1, /* 15 FPS | */ + GOPRO_FRAME_RATE_24=2, /* 24 FPS | */ + GOPRO_FRAME_RATE_25=3, /* 25 FPS | */ + GOPRO_FRAME_RATE_30=4, /* 30 FPS | */ + GOPRO_FRAME_RATE_48=5, /* 48 FPS | */ + GOPRO_FRAME_RATE_50=6, /* 50 FPS | */ + GOPRO_FRAME_RATE_60=7, /* 60 FPS | */ + GOPRO_FRAME_RATE_80=8, /* 80 FPS | */ + GOPRO_FRAME_RATE_90=9, /* 90 FPS | */ + GOPRO_FRAME_RATE_100=10, /* 100 FPS | */ + GOPRO_FRAME_RATE_120=11, /* 120 FPS | */ + GOPRO_FRAME_RATE_240=12, /* 240 FPS | */ + GOPRO_FRAME_RATE_12_5=13, /* 12.5 FPS | */ + GOPRO_FRAME_RATE_ENUM_END=14, /* | */ +} GOPRO_FRAME_RATE; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_FIELD_OF_VIEW +#define HAVE_ENUM_GOPRO_FIELD_OF_VIEW +typedef enum GOPRO_FIELD_OF_VIEW +{ + GOPRO_FIELD_OF_VIEW_WIDE=0, /* 0x00: Wide | */ + GOPRO_FIELD_OF_VIEW_MEDIUM=1, /* 0x01: Medium | */ + GOPRO_FIELD_OF_VIEW_NARROW=2, /* 0x02: Narrow | */ + GOPRO_FIELD_OF_VIEW_ENUM_END=3, /* | */ +} GOPRO_FIELD_OF_VIEW; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_VIDEO_SETTINGS_FLAGS +#define HAVE_ENUM_GOPRO_VIDEO_SETTINGS_FLAGS +typedef enum GOPRO_VIDEO_SETTINGS_FLAGS +{ + GOPRO_VIDEO_SETTINGS_TV_MODE=1, /* 0=NTSC, 1=PAL | */ + GOPRO_VIDEO_SETTINGS_FLAGS_ENUM_END=2, /* | */ +} GOPRO_VIDEO_SETTINGS_FLAGS; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_PHOTO_RESOLUTION +#define HAVE_ENUM_GOPRO_PHOTO_RESOLUTION +typedef enum GOPRO_PHOTO_RESOLUTION +{ + GOPRO_PHOTO_RESOLUTION_5MP_MEDIUM=0, /* 5MP Medium | */ + GOPRO_PHOTO_RESOLUTION_7MP_MEDIUM=1, /* 7MP Medium | */ + GOPRO_PHOTO_RESOLUTION_7MP_WIDE=2, /* 7MP Wide | */ + GOPRO_PHOTO_RESOLUTION_10MP_WIDE=3, /* 10MP Wide | */ + GOPRO_PHOTO_RESOLUTION_12MP_WIDE=4, /* 12MP Wide | */ + GOPRO_PHOTO_RESOLUTION_ENUM_END=5, /* | */ +} GOPRO_PHOTO_RESOLUTION; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_PROTUNE_WHITE_BALANCE +#define HAVE_ENUM_GOPRO_PROTUNE_WHITE_BALANCE +typedef enum GOPRO_PROTUNE_WHITE_BALANCE +{ + GOPRO_PROTUNE_WHITE_BALANCE_AUTO=0, /* Auto | */ + GOPRO_PROTUNE_WHITE_BALANCE_3000K=1, /* 3000K | */ + GOPRO_PROTUNE_WHITE_BALANCE_5500K=2, /* 5500K | */ + GOPRO_PROTUNE_WHITE_BALANCE_6500K=3, /* 6500K | */ + GOPRO_PROTUNE_WHITE_BALANCE_RAW=4, /* Camera Raw | */ + GOPRO_PROTUNE_WHITE_BALANCE_ENUM_END=5, /* | */ +} GOPRO_PROTUNE_WHITE_BALANCE; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_PROTUNE_COLOUR +#define HAVE_ENUM_GOPRO_PROTUNE_COLOUR +typedef enum GOPRO_PROTUNE_COLOUR +{ + GOPRO_PROTUNE_COLOUR_STANDARD=0, /* Auto | */ + GOPRO_PROTUNE_COLOUR_NEUTRAL=1, /* Neutral | */ + GOPRO_PROTUNE_COLOUR_ENUM_END=2, /* | */ +} GOPRO_PROTUNE_COLOUR; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_PROTUNE_GAIN +#define HAVE_ENUM_GOPRO_PROTUNE_GAIN +typedef enum GOPRO_PROTUNE_GAIN +{ + GOPRO_PROTUNE_GAIN_400=0, /* ISO 400 | */ + GOPRO_PROTUNE_GAIN_800=1, /* ISO 800 (Only Hero 4) | */ + GOPRO_PROTUNE_GAIN_1600=2, /* ISO 1600 | */ + GOPRO_PROTUNE_GAIN_3200=3, /* ISO 3200 (Only Hero 4) | */ + GOPRO_PROTUNE_GAIN_6400=4, /* ISO 6400 | */ + GOPRO_PROTUNE_GAIN_ENUM_END=5, /* | */ +} GOPRO_PROTUNE_GAIN; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_PROTUNE_SHARPNESS +#define HAVE_ENUM_GOPRO_PROTUNE_SHARPNESS +typedef enum GOPRO_PROTUNE_SHARPNESS +{ + GOPRO_PROTUNE_SHARPNESS_LOW=0, /* Low Sharpness | */ + GOPRO_PROTUNE_SHARPNESS_MEDIUM=1, /* Medium Sharpness | */ + GOPRO_PROTUNE_SHARPNESS_HIGH=2, /* High Sharpness | */ + GOPRO_PROTUNE_SHARPNESS_ENUM_END=3, /* | */ +} GOPRO_PROTUNE_SHARPNESS; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_PROTUNE_EXPOSURE +#define HAVE_ENUM_GOPRO_PROTUNE_EXPOSURE +typedef enum GOPRO_PROTUNE_EXPOSURE +{ + GOPRO_PROTUNE_EXPOSURE_NEG_5_0=0, /* -5.0 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_NEG_4_5=1, /* -4.5 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_NEG_4_0=2, /* -4.0 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_NEG_3_5=3, /* -3.5 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_NEG_3_0=4, /* -3.0 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_NEG_2_5=5, /* -2.5 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_NEG_2_0=6, /* -2.0 EV | */ + GOPRO_PROTUNE_EXPOSURE_NEG_1_5=7, /* -1.5 EV | */ + GOPRO_PROTUNE_EXPOSURE_NEG_1_0=8, /* -1.0 EV | */ + GOPRO_PROTUNE_EXPOSURE_NEG_0_5=9, /* -0.5 EV | */ + GOPRO_PROTUNE_EXPOSURE_ZERO=10, /* 0.0 EV | */ + GOPRO_PROTUNE_EXPOSURE_POS_0_5=11, /* +0.5 EV | */ + GOPRO_PROTUNE_EXPOSURE_POS_1_0=12, /* +1.0 EV | */ + GOPRO_PROTUNE_EXPOSURE_POS_1_5=13, /* +1.5 EV | */ + GOPRO_PROTUNE_EXPOSURE_POS_2_0=14, /* +2.0 EV | */ + GOPRO_PROTUNE_EXPOSURE_POS_2_5=15, /* +2.5 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_POS_3_0=16, /* +3.0 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_POS_3_5=17, /* +3.5 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_POS_4_0=18, /* +4.0 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_POS_4_5=19, /* +4.5 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_POS_5_0=20, /* +5.0 EV (Hero 3+ Only) | */ + GOPRO_PROTUNE_EXPOSURE_ENUM_END=21, /* | */ +} GOPRO_PROTUNE_EXPOSURE; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_CHARGING +#define HAVE_ENUM_GOPRO_CHARGING +typedef enum GOPRO_CHARGING +{ + GOPRO_CHARGING_DISABLED=0, /* Charging disabled | */ + GOPRO_CHARGING_ENABLED=1, /* Charging enabled | */ + GOPRO_CHARGING_ENUM_END=2, /* | */ +} GOPRO_CHARGING; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_MODEL +#define HAVE_ENUM_GOPRO_MODEL +typedef enum GOPRO_MODEL +{ + GOPRO_MODEL_UNKNOWN=0, /* Unknown gopro model | */ + GOPRO_MODEL_HERO_3_PLUS_SILVER=1, /* Hero 3+ Silver (HeroBus not supported by GoPro) | */ + GOPRO_MODEL_HERO_3_PLUS_BLACK=2, /* Hero 3+ Black | */ + GOPRO_MODEL_HERO_4_SILVER=3, /* Hero 4 Silver | */ + GOPRO_MODEL_HERO_4_BLACK=4, /* Hero 4 Black | */ + GOPRO_MODEL_ENUM_END=5, /* | */ +} GOPRO_MODEL; +#endif + +/** @brief */ +#ifndef HAVE_ENUM_GOPRO_BURST_RATE +#define HAVE_ENUM_GOPRO_BURST_RATE +typedef enum GOPRO_BURST_RATE +{ + GOPRO_BURST_RATE_3_IN_1_SECOND=0, /* 3 Shots / 1 Second | */ + GOPRO_BURST_RATE_5_IN_1_SECOND=1, /* 5 Shots / 1 Second | */ + GOPRO_BURST_RATE_10_IN_1_SECOND=2, /* 10 Shots / 1 Second | */ + GOPRO_BURST_RATE_10_IN_2_SECOND=3, /* 10 Shots / 2 Second | */ + GOPRO_BURST_RATE_10_IN_3_SECOND=4, /* 10 Shots / 3 Second (Hero 4 Only) | */ + GOPRO_BURST_RATE_30_IN_1_SECOND=5, /* 30 Shots / 1 Second | */ + GOPRO_BURST_RATE_30_IN_2_SECOND=6, /* 30 Shots / 2 Second | */ + GOPRO_BURST_RATE_30_IN_3_SECOND=7, /* 30 Shots / 3 Second | */ + GOPRO_BURST_RATE_30_IN_6_SECOND=8, /* 30 Shots / 6 Second | */ + GOPRO_BURST_RATE_ENUM_END=9, /* | */ +} GOPRO_BURST_RATE; +#endif + /** @brief */ #ifndef HAVE_ENUM_LED_CONTROL_PATTERN #define HAVE_ENUM_LED_CONTROL_PATTERN @@ -359,6 +616,43 @@ typedef enum PID_TUNING_AXIS } PID_TUNING_AXIS; #endif +/** @brief */ +#ifndef HAVE_ENUM_MAG_CAL_STATUS +#define HAVE_ENUM_MAG_CAL_STATUS +typedef enum MAG_CAL_STATUS +{ + MAG_CAL_NOT_STARTED=0, /* | */ + MAG_CAL_WAITING_TO_START=1, /* | */ + MAG_CAL_RUNNING_STEP_ONE=2, /* | */ + MAG_CAL_RUNNING_STEP_TWO=3, /* | */ + MAG_CAL_SUCCESS=4, /* | */ + MAG_CAL_FAILED=5, /* | */ + MAG_CAL_STATUS_ENUM_END=6, /* | */ +} MAG_CAL_STATUS; +#endif + +/** @brief Special ACK block numbers control activation of dataflash log streaming */ +#ifndef HAVE_ENUM_MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS +#define HAVE_ENUM_MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS +typedef enum MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS +{ + MAV_REMOTE_LOG_DATA_BLOCK_STOP=2147483645, /* UAV to stop sending DataFlash blocks | */ + MAV_REMOTE_LOG_DATA_BLOCK_START=2147483646, /* UAV to start sending DataFlash blocks | */ + MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS_ENUM_END=2147483647, /* | */ +} MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS; +#endif + +/** @brief Possible remote log data block statuses */ +#ifndef HAVE_ENUM_MAV_REMOTE_LOG_DATA_BLOCK_STATUSES +#define HAVE_ENUM_MAV_REMOTE_LOG_DATA_BLOCK_STATUSES +typedef enum MAV_REMOTE_LOG_DATA_BLOCK_STATUSES +{ + MAV_REMOTE_LOG_DATA_BLOCK_NACK=0, /* This block has NOT been received | */ + MAV_REMOTE_LOG_DATA_BLOCK_ACK=1, /* This block has been received | */ + MAV_REMOTE_LOG_DATA_BLOCK_STATUSES_ENUM_END=2, /* | */ +} MAV_REMOTE_LOG_DATA_BLOCK_STATUSES; +#endif + #include "../common/common.h" // MAVLINK VERSION @@ -406,28 +700,22 @@ typedef enum PID_TUNING_AXIS #include "./mavlink_msg_battery2.h" #include "./mavlink_msg_ahrs3.h" #include "./mavlink_msg_autopilot_version_request.h" +#include "./mavlink_msg_remote_log_data_block.h" +#include "./mavlink_msg_remote_log_block_status.h" #include "./mavlink_msg_led_control.h" +#include "./mavlink_msg_mag_cal_progress.h" +#include "./mavlink_msg_mag_cal_report.h" #include "./mavlink_msg_ekf_status_report.h" #include "./mavlink_msg_pid_tuning.h" #include "./mavlink_msg_gimbal_report.h" #include "./mavlink_msg_gimbal_control.h" -#include "./mavlink_msg_gimbal_reset.h" -#include "./mavlink_msg_gimbal_axis_calibration_progress.h" -#include "./mavlink_msg_gimbal_set_home_offsets.h" -#include "./mavlink_msg_gimbal_home_offset_calibration_result.h" -#include "./mavlink_msg_gimbal_set_factory_parameters.h" -#include "./mavlink_msg_gimbal_factory_parameters_loaded.h" -#include "./mavlink_msg_gimbal_erase_firmware_and_config.h" -#include "./mavlink_msg_gimbal_perform_factory_tests.h" -#include "./mavlink_msg_gimbal_report_factory_tests_progress.h" -#include "./mavlink_msg_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_gimbal_torque_cmd_report.h" #include "./mavlink_msg_gopro_heartbeat.h" #include "./mavlink_msg_gopro_get_request.h" #include "./mavlink_msg_gopro_get_response.h" #include "./mavlink_msg_gopro_set_request.h" #include "./mavlink_msg_gopro_set_response.h" +#include "./mavlink_msg_rpm.h" #ifdef __cplusplus } diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs.h index 50ddc79..29f247a 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs.h @@ -4,13 +4,13 @@ typedef struct __mavlink_ahrs_t { - float omegaIx; ///< X gyro drift estimate rad/s - float omegaIy; ///< Y gyro drift estimate rad/s - float omegaIz; ///< Z gyro drift estimate rad/s - float accel_weight; ///< average accel_weight - float renorm_val; ///< average renormalisation value - float error_rp; ///< average error_roll_pitch value - float error_yaw; ///< average error_yaw value + float omegaIx; /*< X gyro drift estimate rad/s*/ + float omegaIy; /*< Y gyro drift estimate rad/s*/ + float omegaIz; /*< Z gyro drift estimate rad/s*/ + float accel_weight; /*< average accel_weight*/ + float renorm_val; /*< average renormalisation value*/ + float error_rp; /*< average error_roll_pitch value*/ + float error_yaw; /*< average error_yaw value*/ } mavlink_ahrs_t; #define MAVLINK_MSG_ID_AHRS_LEN 28 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs2.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs2.h index 33e0066..6b25d6b 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs2.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs2.h @@ -4,12 +4,12 @@ typedef struct __mavlink_ahrs2_t { - float roll; ///< Roll angle (rad) - float pitch; ///< Pitch angle (rad) - float yaw; ///< Yaw angle (rad) - float altitude; ///< Altitude (MSL) - int32_t lat; ///< Latitude in degrees * 1E7 - int32_t lng; ///< Longitude in degrees * 1E7 + float roll; /*< Roll angle (rad)*/ + float pitch; /*< Pitch angle (rad)*/ + float yaw; /*< Yaw angle (rad)*/ + float altitude; /*< Altitude (MSL)*/ + int32_t lat; /*< Latitude in degrees * 1E7*/ + int32_t lng; /*< Longitude in degrees * 1E7*/ } mavlink_ahrs2_t; #define MAVLINK_MSG_ID_AHRS2_LEN 24 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs3.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs3.h index 32fb8f4..85d6abb 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs3.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs3.h @@ -4,16 +4,16 @@ typedef struct __mavlink_ahrs3_t { - float roll; ///< Roll angle (rad) - float pitch; ///< Pitch angle (rad) - float yaw; ///< Yaw angle (rad) - float altitude; ///< Altitude (MSL) - int32_t lat; ///< Latitude in degrees * 1E7 - int32_t lng; ///< Longitude in degrees * 1E7 - float v1; ///< test variable1 - float v2; ///< test variable2 - float v3; ///< test variable3 - float v4; ///< test variable4 + float roll; /*< Roll angle (rad)*/ + float pitch; /*< Pitch angle (rad)*/ + float yaw; /*< Yaw angle (rad)*/ + float altitude; /*< Altitude (MSL)*/ + int32_t lat; /*< Latitude in degrees * 1E7*/ + int32_t lng; /*< Longitude in degrees * 1E7*/ + float v1; /*< test variable1*/ + float v2; /*< test variable2*/ + float v3; /*< test variable3*/ + float v4; /*< test variable4*/ } mavlink_ahrs3_t; #define MAVLINK_MSG_ID_AHRS3_LEN 40 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_airspeed_autocal.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_airspeed_autocal.h index 521831c..6f6a6b7 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_airspeed_autocal.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_airspeed_autocal.h @@ -4,18 +4,18 @@ typedef struct __mavlink_airspeed_autocal_t { - float vx; ///< GPS velocity north m/s - float vy; ///< GPS velocity east m/s - float vz; ///< GPS velocity down m/s - float diff_pressure; ///< Differential pressure pascals - float EAS2TAS; ///< Estimated to true airspeed ratio - float ratio; ///< Airspeed ratio - float state_x; ///< EKF state x - float state_y; ///< EKF state y - float state_z; ///< EKF state z - float Pax; ///< EKF Pax - float Pby; ///< EKF Pby - float Pcz; ///< EKF Pcz + float vx; /*< GPS velocity north m/s*/ + float vy; /*< GPS velocity east m/s*/ + float vz; /*< GPS velocity down m/s*/ + float diff_pressure; /*< Differential pressure pascals*/ + float EAS2TAS; /*< Estimated to true airspeed ratio*/ + float ratio; /*< Airspeed ratio*/ + float state_x; /*< EKF state x*/ + float state_y; /*< EKF state y*/ + float state_z; /*< EKF state z*/ + float Pax; /*< EKF Pax*/ + float Pby; /*< EKF Pby*/ + float Pcz; /*< EKF Pcz*/ } mavlink_airspeed_autocal_t; #define MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN 48 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ap_adc.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ap_adc.h index 3c18e64..a9f4656 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ap_adc.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ap_adc.h @@ -4,12 +4,12 @@ typedef struct __mavlink_ap_adc_t { - uint16_t adc1; ///< ADC output 1 - uint16_t adc2; ///< ADC output 2 - uint16_t adc3; ///< ADC output 3 - uint16_t adc4; ///< ADC output 4 - uint16_t adc5; ///< ADC output 5 - uint16_t adc6; ///< ADC output 6 + uint16_t adc1; /*< ADC output 1*/ + uint16_t adc2; /*< ADC output 2*/ + uint16_t adc3; /*< ADC output 3*/ + uint16_t adc4; /*< ADC output 4*/ + uint16_t adc5; /*< ADC output 5*/ + uint16_t adc6; /*< ADC output 6*/ } mavlink_ap_adc_t; #define MAVLINK_MSG_ID_AP_ADC_LEN 12 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_autopilot_version_request.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_autopilot_version_request.h index 0420d5d..17725f8 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_autopilot_version_request.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_autopilot_version_request.h @@ -4,8 +4,8 @@ typedef struct __mavlink_autopilot_version_request_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_autopilot_version_request_t; #define MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN 2 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_battery2.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_battery2.h index c8c2bbf..65f87aa 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_battery2.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_battery2.h @@ -4,8 +4,8 @@ typedef struct __mavlink_battery2_t { - uint16_t voltage; ///< voltage in millivolts - int16_t current_battery; ///< Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current + uint16_t voltage; /*< voltage in millivolts*/ + int16_t current_battery; /*< Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current*/ } mavlink_battery2_t; #define MAVLINK_MSG_ID_BATTERY2_LEN 4 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_camera_feedback.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_camera_feedback.h index 6a9748d..8171577 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_camera_feedback.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_camera_feedback.h @@ -4,19 +4,19 @@ typedef struct __mavlink_camera_feedback_t { - uint64_t time_usec; ///< Image timestamp (microseconds since UNIX epoch), as passed in by CAMERA_STATUS message (or autopilot if no CCB) - int32_t lat; ///< Latitude in (deg * 1E7) - int32_t lng; ///< Longitude in (deg * 1E7) - float alt_msl; ///< Altitude Absolute (meters AMSL) - float alt_rel; ///< Altitude Relative (meters above HOME location) - float roll; ///< Camera Roll angle (earth frame, degrees, +-180) - float pitch; ///< Camera Pitch angle (earth frame, degrees, +-180) - float yaw; ///< Camera Yaw (earth frame, degrees, 0-360, true) - float foc_len; ///< Focal Length (mm) - uint16_t img_idx; ///< Image index - uint8_t target_system; ///< System ID - uint8_t cam_idx; ///< Camera ID - uint8_t flags; ///< See CAMERA_FEEDBACK_FLAGS enum for definition of the bitmask + uint64_t time_usec; /*< Image timestamp (microseconds since UNIX epoch), as passed in by CAMERA_STATUS message (or autopilot if no CCB)*/ + int32_t lat; /*< Latitude in (deg * 1E7)*/ + int32_t lng; /*< Longitude in (deg * 1E7)*/ + float alt_msl; /*< Altitude Absolute (meters AMSL)*/ + float alt_rel; /*< Altitude Relative (meters above HOME location)*/ + float roll; /*< Camera Roll angle (earth frame, degrees, +-180)*/ + float pitch; /*< Camera Pitch angle (earth frame, degrees, +-180)*/ + float yaw; /*< Camera Yaw (earth frame, degrees, 0-360, true)*/ + float foc_len; /*< Focal Length (mm)*/ + uint16_t img_idx; /*< Image index*/ + uint8_t target_system; /*< System ID*/ + uint8_t cam_idx; /*< Camera ID*/ + uint8_t flags; /*< See CAMERA_FEEDBACK_FLAGS enum for definition of the bitmask*/ } mavlink_camera_feedback_t; #define MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN 45 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_camera_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_camera_status.h index 9d1e54e..64884d9 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_camera_status.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_camera_status.h @@ -4,15 +4,15 @@ typedef struct __mavlink_camera_status_t { - uint64_t time_usec; ///< Image timestamp (microseconds since UNIX epoch, according to camera clock) - float p1; ///< Parameter 1 (meaning depends on event, see CAMERA_STATUS_TYPES enum) - float p2; ///< Parameter 2 (meaning depends on event, see CAMERA_STATUS_TYPES enum) - float p3; ///< Parameter 3 (meaning depends on event, see CAMERA_STATUS_TYPES enum) - float p4; ///< Parameter 4 (meaning depends on event, see CAMERA_STATUS_TYPES enum) - uint16_t img_idx; ///< Image index - uint8_t target_system; ///< System ID - uint8_t cam_idx; ///< Camera ID - uint8_t event_id; ///< See CAMERA_STATUS_TYPES enum for definition of the bitmask + uint64_t time_usec; /*< Image timestamp (microseconds since UNIX epoch, according to camera clock)*/ + float p1; /*< Parameter 1 (meaning depends on event, see CAMERA_STATUS_TYPES enum)*/ + float p2; /*< Parameter 2 (meaning depends on event, see CAMERA_STATUS_TYPES enum)*/ + float p3; /*< Parameter 3 (meaning depends on event, see CAMERA_STATUS_TYPES enum)*/ + float p4; /*< Parameter 4 (meaning depends on event, see CAMERA_STATUS_TYPES enum)*/ + uint16_t img_idx; /*< Image index*/ + uint8_t target_system; /*< System ID*/ + uint8_t cam_idx; /*< Camera ID*/ + uint8_t event_id; /*< See CAMERA_STATUS_TYPES enum for definition of the bitmask*/ } mavlink_camera_status_t; #define MAVLINK_MSG_ID_CAMERA_STATUS_LEN 29 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_compassmot_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_compassmot_status.h index 9655459..1876203 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_compassmot_status.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_compassmot_status.h @@ -4,12 +4,12 @@ typedef struct __mavlink_compassmot_status_t { - float current; ///< current (amps) - float CompensationX; ///< Motor Compensation X - float CompensationY; ///< Motor Compensation Y - float CompensationZ; ///< Motor Compensation Z - uint16_t throttle; ///< throttle (percent*10) - uint16_t interference; ///< interference (percent) + float current; /*< current (amps)*/ + float CompensationX; /*< Motor Compensation X*/ + float CompensationY; /*< Motor Compensation Y*/ + float CompensationZ; /*< Motor Compensation Z*/ + uint16_t throttle; /*< throttle (percent*10)*/ + uint16_t interference; /*< interference (percent)*/ } mavlink_compassmot_status_t; #define MAVLINK_MSG_ID_COMPASSMOT_STATUS_LEN 20 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data16.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data16.h index 7bad1b2..2ec18df 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data16.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data16.h @@ -4,9 +4,9 @@ typedef struct __mavlink_data16_t { - uint8_t type; ///< data type - uint8_t len; ///< data length - uint8_t data[16]; ///< raw data + uint8_t type; /*< data type*/ + uint8_t len; /*< data length*/ + uint8_t data[16]; /*< raw data*/ } mavlink_data16_t; #define MAVLINK_MSG_ID_DATA16_LEN 18 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data32.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data32.h index df7a2ec..b396155 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data32.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data32.h @@ -4,9 +4,9 @@ typedef struct __mavlink_data32_t { - uint8_t type; ///< data type - uint8_t len; ///< data length - uint8_t data[32]; ///< raw data + uint8_t type; /*< data type*/ + uint8_t len; /*< data length*/ + uint8_t data[32]; /*< raw data*/ } mavlink_data32_t; #define MAVLINK_MSG_ID_DATA32_LEN 34 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data64.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data64.h index c354f89..36467f1 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data64.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data64.h @@ -4,9 +4,9 @@ typedef struct __mavlink_data64_t { - uint8_t type; ///< data type - uint8_t len; ///< data length - uint8_t data[64]; ///< raw data + uint8_t type; /*< data type*/ + uint8_t len; /*< data length*/ + uint8_t data[64]; /*< raw data*/ } mavlink_data64_t; #define MAVLINK_MSG_ID_DATA64_LEN 66 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data96.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data96.h index 634e3f8..d7a1c48 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data96.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data96.h @@ -4,9 +4,9 @@ typedef struct __mavlink_data96_t { - uint8_t type; ///< data type - uint8_t len; ///< data length - uint8_t data[96]; ///< raw data + uint8_t type; /*< data type*/ + uint8_t len; /*< data length*/ + uint8_t data[96]; /*< raw data*/ } mavlink_data96_t; #define MAVLINK_MSG_ID_DATA96_LEN 98 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_digicam_configure.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_digicam_configure.h index d5f9e71..dd0b2c7 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_digicam_configure.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_digicam_configure.h @@ -4,17 +4,17 @@ typedef struct __mavlink_digicam_configure_t { - float extra_value; ///< Correspondent value to given extra_param - uint16_t shutter_speed; ///< Divisor number //e.g. 1000 means 1/1000 (0 means ignore) - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t mode; ///< Mode enumeration from 1 to N //P, TV, AV, M, Etc (0 means ignore) - uint8_t aperture; ///< F stop number x 10 //e.g. 28 means 2.8 (0 means ignore) - uint8_t iso; ///< ISO enumeration from 1 to N //e.g. 80, 100, 200, Etc (0 means ignore) - uint8_t exposure_type; ///< Exposure type enumeration from 1 to N (0 means ignore) - uint8_t command_id; ///< Command Identity (incremental loop: 0 to 255)//A command sent multiple times will be executed or pooled just once - uint8_t engine_cut_off; ///< Main engine cut-off time before camera trigger in seconds/10 (0 means no cut-off) - uint8_t extra_param; ///< Extra parameters enumeration (0 means ignore) + float extra_value; /*< Correspondent value to given extra_param*/ + uint16_t shutter_speed; /*< Divisor number //e.g. 1000 means 1/1000 (0 means ignore)*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t mode; /*< Mode enumeration from 1 to N //P, TV, AV, M, Etc (0 means ignore)*/ + uint8_t aperture; /*< F stop number x 10 //e.g. 28 means 2.8 (0 means ignore)*/ + uint8_t iso; /*< ISO enumeration from 1 to N //e.g. 80, 100, 200, Etc (0 means ignore)*/ + uint8_t exposure_type; /*< Exposure type enumeration from 1 to N (0 means ignore)*/ + uint8_t command_id; /*< Command Identity (incremental loop: 0 to 255)//A command sent multiple times will be executed or pooled just once*/ + uint8_t engine_cut_off; /*< Main engine cut-off time before camera trigger in seconds/10 (0 means no cut-off)*/ + uint8_t extra_param; /*< Extra parameters enumeration (0 means ignore)*/ } mavlink_digicam_configure_t; #define MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN 15 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_digicam_control.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_digicam_control.h index 68484f7..1981384 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_digicam_control.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_digicam_control.h @@ -4,16 +4,16 @@ typedef struct __mavlink_digicam_control_t { - float extra_value; ///< Correspondent value to given extra_param - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t session; ///< 0: stop, 1: start or keep it up //Session control e.g. show/hide lens - uint8_t zoom_pos; ///< 1 to N //Zoom's absolute position (0 means ignore) - int8_t zoom_step; ///< -100 to 100 //Zooming step value to offset zoom from the current position - uint8_t focus_lock; ///< 0: unlock focus or keep unlocked, 1: lock focus or keep locked, 3: re-lock focus - uint8_t shot; ///< 0: ignore, 1: shot or start filming - uint8_t command_id; ///< Command Identity (incremental loop: 0 to 255)//A command sent multiple times will be executed or pooled just once - uint8_t extra_param; ///< Extra parameters enumeration (0 means ignore) + float extra_value; /*< Correspondent value to given extra_param*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t session; /*< 0: stop, 1: start or keep it up //Session control e.g. show/hide lens*/ + uint8_t zoom_pos; /*< 1 to N //Zoom's absolute position (0 means ignore)*/ + int8_t zoom_step; /*< -100 to 100 //Zooming step value to offset zoom from the current position*/ + uint8_t focus_lock; /*< 0: unlock focus or keep unlocked, 1: lock focus or keep locked, 3: re-lock focus*/ + uint8_t shot; /*< 0: ignore, 1: shot or start filming*/ + uint8_t command_id; /*< Command Identity (incremental loop: 0 to 255)//A command sent multiple times will be executed or pooled just once*/ + uint8_t extra_param; /*< Extra parameters enumeration (0 means ignore)*/ } mavlink_digicam_control_t; #define MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN 13 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ekf_status_report.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ekf_status_report.h index 31ff548..6fc1116 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ekf_status_report.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ekf_status_report.h @@ -4,12 +4,12 @@ typedef struct __mavlink_ekf_status_report_t { - float velocity_variance; ///< Velocity variance - float pos_horiz_variance; ///< Horizontal Position variance - float pos_vert_variance; ///< Vertical Position variance - float compass_variance; ///< Compass variance - float terrain_alt_variance; ///< Terrain Altitude variance - uint16_t flags; ///< Flags + float velocity_variance; /*< Velocity variance*/ + float pos_horiz_variance; /*< Horizontal Position variance*/ + float pos_vert_variance; /*< Vertical Position variance*/ + float compass_variance; /*< Compass variance*/ + float terrain_alt_variance; /*< Terrain Altitude variance*/ + uint16_t flags; /*< Flags*/ } mavlink_ekf_status_report_t; #define MAVLINK_MSG_ID_EKF_STATUS_REPORT_LEN 22 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_fetch_point.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_fetch_point.h index 4021c7a..763cb34 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_fetch_point.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_fetch_point.h @@ -4,9 +4,9 @@ typedef struct __mavlink_fence_fetch_point_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t idx; ///< point index (first point is 1, 0 is for return point) + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t idx; /*< point index (first point is 1, 0 is for return point)*/ } mavlink_fence_fetch_point_t; #define MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN 3 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_point.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_point.h index 6fc2c83..287f9fa 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_point.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_point.h @@ -4,12 +4,12 @@ typedef struct __mavlink_fence_point_t { - float lat; ///< Latitude of point - float lng; ///< Longitude of point - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t idx; ///< point index (first point is 1, 0 is for return point) - uint8_t count; ///< total number of points (for sanity checking) + float lat; /*< Latitude of point*/ + float lng; /*< Longitude of point*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t idx; /*< point index (first point is 1, 0 is for return point)*/ + uint8_t count; /*< total number of points (for sanity checking)*/ } mavlink_fence_point_t; #define MAVLINK_MSG_ID_FENCE_POINT_LEN 12 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_status.h index c50d377..40bbc34 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_status.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_status.h @@ -4,10 +4,10 @@ typedef struct __mavlink_fence_status_t { - uint32_t breach_time; ///< time of last breach in milliseconds since boot - uint16_t breach_count; ///< number of fence breaches - uint8_t breach_status; ///< 0 if currently inside fence, 1 if outside - uint8_t breach_type; ///< last breach type (see FENCE_BREACH_* enum) + uint32_t breach_time; /*< time of last breach in milliseconds since boot*/ + uint16_t breach_count; /*< number of fence breaches*/ + uint8_t breach_status; /*< 0 if currently inside fence, 1 if outside*/ + uint8_t breach_type; /*< last breach type (see FENCE_BREACH_* enum)*/ } mavlink_fence_status_t; #define MAVLINK_MSG_ID_FENCE_STATUS_LEN 8 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_axis_calibration_progress.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_axis_calibration_progress.h deleted file mode 100644 index c41e1d3..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_axis_calibration_progress.h +++ /dev/null @@ -1,257 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_control.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_control.h index 1b52501..22a4068 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_control.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_control.h @@ -4,11 +4,11 @@ typedef struct __mavlink_gimbal_control_t { - float demanded_rate_x; ///< Demanded angular rate X (rad/s) - float demanded_rate_y; ///< Demanded angular rate Y (rad/s) - float demanded_rate_z; ///< Demanded angular rate Z (rad/s) - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + float demanded_rate_x; /*< Demanded angular rate X (rad/s)*/ + float demanded_rate_y; /*< Demanded angular rate Y (rad/s)*/ + float demanded_rate_z; /*< Demanded angular rate Z (rad/s)*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_gimbal_control_t; #define MAVLINK_MSG_ID_GIMBAL_CONTROL_LEN 14 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_erase_firmware_and_config.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_erase_firmware_and_config.h deleted file mode 100644 index 23174d0..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_erase_firmware_and_config.h +++ /dev/null @@ -1,257 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_factory_parameters_loaded.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_factory_parameters_loaded.h deleted file mode 100644 index 790fe4e..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_factory_parameters_loaded.h +++ /dev/null @@ -1,209 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_home_offset_calibration_result.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_home_offset_calibration_result.h deleted file mode 100644 index a1c9ace..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_home_offset_calibration_result.h +++ /dev/null @@ -1,209 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_perform_factory_tests.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_perform_factory_tests.h deleted file mode 100644 index a37c834..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_perform_factory_tests.h +++ /dev/null @@ -1,233 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report.h index 6773106..b7df65f 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report.h @@ -4,18 +4,18 @@ typedef struct __mavlink_gimbal_report_t { - float delta_time; ///< Time since last update (seconds) - float delta_angle_x; ///< Delta angle X (radians) - float delta_angle_y; ///< Delta angle Y (radians) - float delta_angle_z; ///< Delta angle X (radians) - float delta_velocity_x; ///< Delta velocity X (m/s) - float delta_velocity_y; ///< Delta velocity Y (m/s) - float delta_velocity_z; ///< Delta velocity Z (m/s) - float joint_roll; ///< Joint ROLL (radians) - float joint_el; ///< Joint EL (radians) - float joint_az; ///< Joint AZ (radians) - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + float delta_time; /*< Time since last update (seconds)*/ + float delta_angle_x; /*< Delta angle X (radians)*/ + float delta_angle_y; /*< Delta angle Y (radians)*/ + float delta_angle_z; /*< Delta angle X (radians)*/ + float delta_velocity_x; /*< Delta velocity X (m/s)*/ + float delta_velocity_y; /*< Delta velocity Y (m/s)*/ + float delta_velocity_z; /*< Delta velocity Z (m/s)*/ + float joint_roll; /*< Joint ROLL (radians)*/ + float joint_el; /*< Joint EL (radians)*/ + float joint_az; /*< Joint AZ (radians)*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_gimbal_report_t; #define MAVLINK_MSG_ID_GIMBAL_REPORT_LEN 42 @@ -60,9 +60,9 @@ typedef struct __mavlink_gimbal_report_t * @param delta_velocity_x Delta velocity X (m/s) * @param delta_velocity_y Delta velocity Y (m/s) * @param delta_velocity_z Delta velocity Z (m/s) - * @param joint_roll Joint ROLL (radians) - * @param joint_el Joint EL (radians) - * @param joint_az Joint AZ (radians) + * @param joint_roll Joint ROLL (radians) + * @param joint_el Joint EL (radians) + * @param joint_az Joint AZ (radians) * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_gimbal_report_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -125,9 +125,9 @@ static inline uint16_t mavlink_msg_gimbal_report_pack(uint8_t system_id, uint8_t * @param delta_velocity_x Delta velocity X (m/s) * @param delta_velocity_y Delta velocity Y (m/s) * @param delta_velocity_z Delta velocity Z (m/s) - * @param joint_roll Joint ROLL (radians) - * @param joint_el Joint EL (radians) - * @param joint_az Joint AZ (radians) + * @param joint_roll Joint ROLL (radians) + * @param joint_el Joint EL (radians) + * @param joint_az Joint AZ (radians) * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_gimbal_report_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -216,9 +216,9 @@ static inline uint16_t mavlink_msg_gimbal_report_encode_chan(uint8_t system_id, * @param delta_velocity_x Delta velocity X (m/s) * @param delta_velocity_y Delta velocity Y (m/s) * @param delta_velocity_z Delta velocity Z (m/s) - * @param joint_roll Joint ROLL (radians) - * @param joint_el Joint EL (radians) - * @param joint_az Joint AZ (radians) + * @param joint_roll Joint ROLL (radians) + * @param joint_el Joint EL (radians) + * @param joint_az Joint AZ (radians) */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -419,7 +419,7 @@ static inline float mavlink_msg_gimbal_report_get_delta_velocity_z(const mavlink /** * @brief Get field joint_roll from gimbal_report message * - * @return Joint ROLL (radians) + * @return Joint ROLL (radians) */ static inline float mavlink_msg_gimbal_report_get_joint_roll(const mavlink_message_t* msg) { @@ -429,7 +429,7 @@ static inline float mavlink_msg_gimbal_report_get_joint_roll(const mavlink_messa /** * @brief Get field joint_el from gimbal_report message * - * @return Joint EL (radians) + * @return Joint EL (radians) */ static inline float mavlink_msg_gimbal_report_get_joint_el(const mavlink_message_t* msg) { @@ -439,7 +439,7 @@ static inline float mavlink_msg_gimbal_report_get_joint_el(const mavlink_message /** * @brief Get field joint_az from gimbal_report message * - * @return Joint AZ (radians) + * @return Joint AZ (radians) */ static inline float mavlink_msg_gimbal_report_get_joint_az(const mavlink_message_t* msg) { diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_axis_calibration_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_axis_calibration_status.h deleted file mode 100644 index 37552d6..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_axis_calibration_status.h +++ /dev/null @@ -1,257 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_factory_tests_progress.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_factory_tests_progress.h deleted file mode 100644 index ada3a91..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_report_factory_tests_progress.h +++ /dev/null @@ -1,281 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration.h deleted file mode 100644 index 9a848cf..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration.h +++ /dev/null @@ -1,233 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration_status.h deleted file mode 100644 index b8c4f36..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_request_axis_calibration_status.h +++ /dev/null @@ -1,233 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_reset.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_reset.h deleted file mode 100644 index df1a8cd..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_reset.h +++ /dev/null @@ -1,233 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_factory_parameters.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_factory_parameters.h deleted file mode 100644 index c0e8790..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_factory_parameters.h +++ /dev/null @@ -1,521 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_home_offsets.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_home_offsets.h deleted file mode 100644 index 4932b10..0000000 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_set_home_offsets.h +++ /dev/null @@ -1,233 +0,0 @@ -// 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/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_torque_cmd_report.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_torque_cmd_report.h new file mode 100644 index 0000000..500d973 --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gimbal_torque_cmd_report.h @@ -0,0 +1,305 @@ +// MESSAGE GIMBAL_TORQUE_CMD_REPORT PACKING + +#define MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT 214 + +typedef struct __mavlink_gimbal_torque_cmd_report_t +{ + int16_t rl_torque_cmd; /*< Roll Torque Command*/ + int16_t el_torque_cmd; /*< Elevation Torque Command*/ + int16_t az_torque_cmd; /*< Azimuth Torque Command*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ +} mavlink_gimbal_torque_cmd_report_t; + +#define MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN 8 +#define MAVLINK_MSG_ID_214_LEN 8 + +#define MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC 69 +#define MAVLINK_MSG_ID_214_CRC 69 + + + +#define MAVLINK_MESSAGE_INFO_GIMBAL_TORQUE_CMD_REPORT { \ + "GIMBAL_TORQUE_CMD_REPORT", \ + 5, \ + { { "rl_torque_cmd", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_gimbal_torque_cmd_report_t, rl_torque_cmd) }, \ + { "el_torque_cmd", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_gimbal_torque_cmd_report_t, el_torque_cmd) }, \ + { "az_torque_cmd", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_gimbal_torque_cmd_report_t, az_torque_cmd) }, \ + { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_gimbal_torque_cmd_report_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_gimbal_torque_cmd_report_t, target_component) }, \ + } \ +} + + +/** + * @brief Pack a gimbal_torque_cmd_report message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID + * @param target_component Component ID + * @param rl_torque_cmd Roll Torque Command + * @param el_torque_cmd Elevation Torque Command + * @param az_torque_cmd Azimuth Torque Command + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, int16_t rl_torque_cmd, int16_t el_torque_cmd, int16_t az_torque_cmd) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN]; + _mav_put_int16_t(buf, 0, rl_torque_cmd); + _mav_put_int16_t(buf, 2, el_torque_cmd); + _mav_put_int16_t(buf, 4, az_torque_cmd); + _mav_put_uint8_t(buf, 6, target_system); + _mav_put_uint8_t(buf, 7, target_component); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#else + mavlink_gimbal_torque_cmd_report_t packet; + packet.rl_torque_cmd = rl_torque_cmd; + packet.el_torque_cmd = el_torque_cmd; + packet.az_torque_cmd = az_torque_cmd; + packet.target_system = target_system; + packet.target_component = target_component; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#endif +} + +/** + * @brief Pack a gimbal_torque_cmd_report message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param target_system System ID + * @param target_component Component ID + * @param rl_torque_cmd Roll Torque Command + * @param el_torque_cmd Elevation Torque Command + * @param az_torque_cmd Azimuth Torque Command + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t target_system,uint8_t target_component,int16_t rl_torque_cmd,int16_t el_torque_cmd,int16_t az_torque_cmd) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN]; + _mav_put_int16_t(buf, 0, rl_torque_cmd); + _mav_put_int16_t(buf, 2, el_torque_cmd); + _mav_put_int16_t(buf, 4, az_torque_cmd); + _mav_put_uint8_t(buf, 6, target_system); + _mav_put_uint8_t(buf, 7, target_component); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#else + mavlink_gimbal_torque_cmd_report_t packet; + packet.rl_torque_cmd = rl_torque_cmd; + packet.el_torque_cmd = el_torque_cmd; + packet.az_torque_cmd = az_torque_cmd; + packet.target_system = target_system; + packet.target_component = target_component; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#endif +} + +/** + * @brief Encode a gimbal_torque_cmd_report struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param gimbal_torque_cmd_report C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_torque_cmd_report_t* gimbal_torque_cmd_report) +{ + return mavlink_msg_gimbal_torque_cmd_report_pack(system_id, component_id, msg, gimbal_torque_cmd_report->target_system, gimbal_torque_cmd_report->target_component, gimbal_torque_cmd_report->rl_torque_cmd, gimbal_torque_cmd_report->el_torque_cmd, gimbal_torque_cmd_report->az_torque_cmd); +} + +/** + * @brief Encode a gimbal_torque_cmd_report struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param gimbal_torque_cmd_report C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_torque_cmd_report_t* gimbal_torque_cmd_report) +{ + return mavlink_msg_gimbal_torque_cmd_report_pack_chan(system_id, component_id, chan, msg, gimbal_torque_cmd_report->target_system, gimbal_torque_cmd_report->target_component, gimbal_torque_cmd_report->rl_torque_cmd, gimbal_torque_cmd_report->el_torque_cmd, gimbal_torque_cmd_report->az_torque_cmd); +} + +/** + * @brief Send a gimbal_torque_cmd_report message + * @param chan MAVLink channel to send the message + * + * @param target_system System ID + * @param target_component Component ID + * @param rl_torque_cmd Roll Torque Command + * @param el_torque_cmd Elevation Torque Command + * @param az_torque_cmd Azimuth Torque Command + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_gimbal_torque_cmd_report_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t rl_torque_cmd, int16_t el_torque_cmd, int16_t az_torque_cmd) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN]; + _mav_put_int16_t(buf, 0, rl_torque_cmd); + _mav_put_int16_t(buf, 2, el_torque_cmd); + _mav_put_int16_t(buf, 4, az_torque_cmd); + _mav_put_uint8_t(buf, 6, target_system); + _mav_put_uint8_t(buf, 7, target_component); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#endif +#else + mavlink_gimbal_torque_cmd_report_t packet; + packet.rl_torque_cmd = rl_torque_cmd; + packet.el_torque_cmd = el_torque_cmd; + packet.az_torque_cmd = az_torque_cmd; + packet.target_system = target_system; + packet.target_component = target_component; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This varient of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_gimbal_torque_cmd_report_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t rl_torque_cmd, int16_t el_torque_cmd, int16_t az_torque_cmd) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_int16_t(buf, 0, rl_torque_cmd); + _mav_put_int16_t(buf, 2, el_torque_cmd); + _mav_put_int16_t(buf, 4, az_torque_cmd); + _mav_put_uint8_t(buf, 6, target_system); + _mav_put_uint8_t(buf, 7, target_component); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#endif +#else + mavlink_gimbal_torque_cmd_report_t *packet = (mavlink_gimbal_torque_cmd_report_t *)msgbuf; + packet->rl_torque_cmd = rl_torque_cmd; + packet->el_torque_cmd = el_torque_cmd; + packet->az_torque_cmd = az_torque_cmd; + packet->target_system = target_system; + packet->target_component = target_component; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT, (const char *)packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE GIMBAL_TORQUE_CMD_REPORT UNPACKING + + +/** + * @brief Get field target_system from gimbal_torque_cmd_report message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_gimbal_torque_cmd_report_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 6); +} + +/** + * @brief Get field target_component from gimbal_torque_cmd_report message + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_gimbal_torque_cmd_report_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 7); +} + +/** + * @brief Get field rl_torque_cmd from gimbal_torque_cmd_report message + * + * @return Roll Torque Command + */ +static inline int16_t mavlink_msg_gimbal_torque_cmd_report_get_rl_torque_cmd(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int16_t(msg, 0); +} + +/** + * @brief Get field el_torque_cmd from gimbal_torque_cmd_report message + * + * @return Elevation Torque Command + */ +static inline int16_t mavlink_msg_gimbal_torque_cmd_report_get_el_torque_cmd(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int16_t(msg, 2); +} + +/** + * @brief Get field az_torque_cmd from gimbal_torque_cmd_report message + * + * @return Azimuth Torque Command + */ +static inline int16_t mavlink_msg_gimbal_torque_cmd_report_get_az_torque_cmd(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int16_t(msg, 4); +} + +/** + * @brief Decode a gimbal_torque_cmd_report message into a struct + * + * @param msg The message to decode + * @param gimbal_torque_cmd_report C-struct to decode the message contents into + */ +static inline void mavlink_msg_gimbal_torque_cmd_report_decode(const mavlink_message_t* msg, mavlink_gimbal_torque_cmd_report_t* gimbal_torque_cmd_report) +{ +#if MAVLINK_NEED_BYTE_SWAP + gimbal_torque_cmd_report->rl_torque_cmd = mavlink_msg_gimbal_torque_cmd_report_get_rl_torque_cmd(msg); + gimbal_torque_cmd_report->el_torque_cmd = mavlink_msg_gimbal_torque_cmd_report_get_el_torque_cmd(msg); + gimbal_torque_cmd_report->az_torque_cmd = mavlink_msg_gimbal_torque_cmd_report_get_az_torque_cmd(msg); + gimbal_torque_cmd_report->target_system = mavlink_msg_gimbal_torque_cmd_report_get_target_system(msg); + gimbal_torque_cmd_report->target_component = mavlink_msg_gimbal_torque_cmd_report_get_target_component(msg); +#else + memcpy(gimbal_torque_cmd_report, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_request.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_request.h index 5d747e4..db4b8e0 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_request.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_request.h @@ -4,9 +4,9 @@ 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 + 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 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_response.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_response.h index 2eb66e1..d26e080 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_response.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_get_response.h @@ -4,23 +4,25 @@ typedef struct __mavlink_gopro_get_response_t { - uint8_t cmd_id; ///< Command ID - uint8_t value; ///< Value + uint8_t cmd_id; /*< Command ID*/ + uint8_t status; /*< Status*/ + uint8_t value[4]; /*< Value*/ } mavlink_gopro_get_response_t; -#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN 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_MSG_ID_GOPRO_GET_RESPONSE_LEN 6 +#define MAVLINK_MSG_ID_217_LEN 6 +#define MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC 202 +#define MAVLINK_MSG_ID_217_CRC 202 +#define MAVLINK_MSG_GOPRO_GET_RESPONSE_FIELD_VALUE_LEN 4 #define MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE { \ "GOPRO_GET_RESPONSE", \ - 2, \ + 3, \ { { "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) }, \ + { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_get_response_t, status) }, \ + { "value", NULL, MAVLINK_TYPE_UINT8_T, 4, 2, offsetof(mavlink_gopro_get_response_t, value) }, \ } \ } @@ -32,23 +34,24 @@ typedef struct __mavlink_gopro_get_response_t * @param msg The MAVLink message to compress the data into * * @param cmd_id Command ID + * @param status Status * @param value Value * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_gopro_get_response_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t cmd_id, uint8_t value) + uint8_t cmd_id, uint8_t status, const uint8_t *value) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN]; _mav_put_uint8_t(buf, 0, cmd_id); - _mav_put_uint8_t(buf, 1, value); - + _mav_put_uint8_t(buf, 1, status); + _mav_put_uint8_t_array(buf, 2, value, 4); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN); #else mavlink_gopro_get_response_t packet; packet.cmd_id = cmd_id; - packet.value = value; - + packet.status = status; + mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN); #endif @@ -67,24 +70,25 @@ static inline uint16_t mavlink_msg_gopro_get_response_pack(uint8_t system_id, ui * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param cmd_id Command ID + * @param status Status * @param value Value * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_gopro_get_response_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint8_t cmd_id,uint8_t value) + uint8_t cmd_id,uint8_t status,const uint8_t *value) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN]; _mav_put_uint8_t(buf, 0, cmd_id); - _mav_put_uint8_t(buf, 1, value); - + _mav_put_uint8_t(buf, 1, status); + _mav_put_uint8_t_array(buf, 2, value, 4); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN); #else mavlink_gopro_get_response_t packet; packet.cmd_id = cmd_id; - packet.value = value; - + packet.status = status; + mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN); #endif @@ -106,7 +110,7 @@ static inline uint16_t mavlink_msg_gopro_get_response_pack_chan(uint8_t system_i */ 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); + return mavlink_msg_gopro_get_response_pack(system_id, component_id, msg, gopro_get_response->cmd_id, gopro_get_response->status, gopro_get_response->value); } /** @@ -120,7 +124,7 @@ static inline uint16_t mavlink_msg_gopro_get_response_encode(uint8_t system_id, */ 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); + return mavlink_msg_gopro_get_response_pack_chan(system_id, component_id, chan, msg, gopro_get_response->cmd_id, gopro_get_response->status, gopro_get_response->value); } /** @@ -128,17 +132,18 @@ static inline uint16_t mavlink_msg_gopro_get_response_encode_chan(uint8_t system * @param chan MAVLink channel to send the message * * @param cmd_id Command ID + * @param status Status * @param value Value */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_gopro_get_response_send(mavlink_channel_t chan, uint8_t cmd_id, uint8_t value) +static inline void mavlink_msg_gopro_get_response_send(mavlink_channel_t chan, uint8_t cmd_id, uint8_t status, const uint8_t *value) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN]; _mav_put_uint8_t(buf, 0, cmd_id); - _mav_put_uint8_t(buf, 1, value); - + _mav_put_uint8_t(buf, 1, status); + _mav_put_uint8_t_array(buf, 2, value, 4); #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC); #else @@ -147,8 +152,8 @@ static inline void mavlink_msg_gopro_get_response_send(mavlink_channel_t chan, u #else mavlink_gopro_get_response_t packet; packet.cmd_id = cmd_id; - packet.value = value; - + packet.status = status; + mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4); #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC); #else @@ -165,13 +170,13 @@ static inline void mavlink_msg_gopro_get_response_send(mavlink_channel_t chan, u 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) +static inline void mavlink_msg_gopro_get_response_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t cmd_id, uint8_t status, const uint8_t *value) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; _mav_put_uint8_t(buf, 0, cmd_id); - _mav_put_uint8_t(buf, 1, value); - + _mav_put_uint8_t(buf, 1, status); + _mav_put_uint8_t_array(buf, 2, value, 4); #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC); #else @@ -180,8 +185,8 @@ static inline void mavlink_msg_gopro_get_response_send_buf(mavlink_message_t *ms #else mavlink_gopro_get_response_t *packet = (mavlink_gopro_get_response_t *)msgbuf; packet->cmd_id = cmd_id; - packet->value = value; - + packet->status = status; + mav_array_memcpy(packet->value, value, sizeof(uint8_t)*4); #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC); #else @@ -206,14 +211,24 @@ static inline uint8_t mavlink_msg_gopro_get_response_get_cmd_id(const mavlink_me return _MAV_RETURN_uint8_t(msg, 0); } +/** + * @brief Get field status from gopro_get_response message + * + * @return Status + */ +static inline uint8_t mavlink_msg_gopro_get_response_get_status(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + /** * @brief Get field value from gopro_get_response message * * @return Value */ -static inline uint8_t mavlink_msg_gopro_get_response_get_value(const mavlink_message_t* msg) +static inline uint16_t mavlink_msg_gopro_get_response_get_value(const mavlink_message_t* msg, uint8_t *value) { - return _MAV_RETURN_uint8_t(msg, 1); + return _MAV_RETURN_uint8_t_array(msg, value, 4, 2); } /** @@ -226,7 +241,8 @@ static inline void mavlink_msg_gopro_get_response_decode(const mavlink_message_t { #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); + gopro_get_response->status = mavlink_msg_gopro_get_response_get_status(msg); + mavlink_msg_gopro_get_response_get_value(msg, gopro_get_response->value); #else memcpy(gopro_get_response, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN); #endif diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_heartbeat.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_heartbeat.h index 28fe0ec..d8286b1 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_heartbeat.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_heartbeat.h @@ -4,21 +4,25 @@ typedef struct __mavlink_gopro_heartbeat_t { - uint8_t status; ///< Status + uint8_t status; /*< Status*/ + uint8_t capture_mode; /*< Current capture mode*/ + uint8_t flags; /*< additional status bits*/ } mavlink_gopro_heartbeat_t; -#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN 1 -#define MAVLINK_MSG_ID_215_LEN 1 +#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN 3 +#define MAVLINK_MSG_ID_215_LEN 3 -#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC 77 -#define MAVLINK_MSG_ID_215_CRC 77 +#define MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC 101 +#define MAVLINK_MSG_ID_215_CRC 101 #define MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT { \ "GOPRO_HEARTBEAT", \ - 1, \ + 3, \ { { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gopro_heartbeat_t, status) }, \ + { "capture_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_heartbeat_t, capture_mode) }, \ + { "flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_gopro_heartbeat_t, flags) }, \ } \ } @@ -30,19 +34,25 @@ typedef struct __mavlink_gopro_heartbeat_t * @param msg The MAVLink message to compress the data into * * @param status Status + * @param capture_mode Current capture mode + * @param flags additional status bits * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_gopro_heartbeat_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t status) + uint8_t status, uint8_t capture_mode, uint8_t flags) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN]; _mav_put_uint8_t(buf, 0, status); + _mav_put_uint8_t(buf, 1, capture_mode); + _mav_put_uint8_t(buf, 2, flags); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); #else mavlink_gopro_heartbeat_t packet; packet.status = status; + packet.capture_mode = capture_mode; + packet.flags = flags; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); #endif @@ -62,20 +72,26 @@ static inline uint16_t mavlink_msg_gopro_heartbeat_pack(uint8_t system_id, uint8 * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param status Status + * @param capture_mode Current capture mode + * @param flags additional status bits * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_gopro_heartbeat_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint8_t status) + uint8_t status,uint8_t capture_mode,uint8_t flags) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN]; _mav_put_uint8_t(buf, 0, status); + _mav_put_uint8_t(buf, 1, capture_mode); + _mav_put_uint8_t(buf, 2, flags); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); #else mavlink_gopro_heartbeat_t packet; packet.status = status; + packet.capture_mode = capture_mode; + packet.flags = flags; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); #endif @@ -98,7 +114,7 @@ static inline uint16_t mavlink_msg_gopro_heartbeat_pack_chan(uint8_t system_id, */ 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); + return mavlink_msg_gopro_heartbeat_pack(system_id, component_id, msg, gopro_heartbeat->status, gopro_heartbeat->capture_mode, gopro_heartbeat->flags); } /** @@ -112,7 +128,7 @@ static inline uint16_t mavlink_msg_gopro_heartbeat_encode(uint8_t system_id, uin */ 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); + return mavlink_msg_gopro_heartbeat_pack_chan(system_id, component_id, chan, msg, gopro_heartbeat->status, gopro_heartbeat->capture_mode, gopro_heartbeat->flags); } /** @@ -120,14 +136,18 @@ static inline uint16_t mavlink_msg_gopro_heartbeat_encode_chan(uint8_t system_id * @param chan MAVLink channel to send the message * * @param status Status + * @param capture_mode Current capture mode + * @param flags additional status bits */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_gopro_heartbeat_send(mavlink_channel_t chan, uint8_t status) +static inline void mavlink_msg_gopro_heartbeat_send(mavlink_channel_t chan, uint8_t status, uint8_t capture_mode, uint8_t flags) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN]; _mav_put_uint8_t(buf, 0, status); + _mav_put_uint8_t(buf, 1, capture_mode); + _mav_put_uint8_t(buf, 2, flags); #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC); @@ -137,6 +157,8 @@ static inline void mavlink_msg_gopro_heartbeat_send(mavlink_channel_t chan, uint #else mavlink_gopro_heartbeat_t packet; packet.status = status; + packet.capture_mode = capture_mode; + packet.flags = flags; #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, (const char *)&packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC); @@ -154,11 +176,13 @@ static inline void mavlink_msg_gopro_heartbeat_send(mavlink_channel_t chan, uint is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_gopro_heartbeat_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t status) +static inline void mavlink_msg_gopro_heartbeat_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t status, uint8_t capture_mode, uint8_t flags) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; _mav_put_uint8_t(buf, 0, status); + _mav_put_uint8_t(buf, 1, capture_mode); + _mav_put_uint8_t(buf, 2, flags); #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC); @@ -168,6 +192,8 @@ static inline void mavlink_msg_gopro_heartbeat_send_buf(mavlink_message_t *msgbu #else mavlink_gopro_heartbeat_t *packet = (mavlink_gopro_heartbeat_t *)msgbuf; packet->status = status; + packet->capture_mode = capture_mode; + packet->flags = flags; #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GOPRO_HEARTBEAT, (const char *)packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC); @@ -193,6 +219,26 @@ static inline uint8_t mavlink_msg_gopro_heartbeat_get_status(const mavlink_messa return _MAV_RETURN_uint8_t(msg, 0); } +/** + * @brief Get field capture_mode from gopro_heartbeat message + * + * @return Current capture mode + */ +static inline uint8_t mavlink_msg_gopro_heartbeat_get_capture_mode(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + +/** + * @brief Get field flags from gopro_heartbeat message + * + * @return additional status bits + */ +static inline uint8_t mavlink_msg_gopro_heartbeat_get_flags(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 2); +} + /** * @brief Decode a gopro_heartbeat message into a struct * @@ -203,6 +249,8 @@ static inline void mavlink_msg_gopro_heartbeat_decode(const mavlink_message_t* m { #if MAVLINK_NEED_BYTE_SWAP gopro_heartbeat->status = mavlink_msg_gopro_heartbeat_get_status(msg); + gopro_heartbeat->capture_mode = mavlink_msg_gopro_heartbeat_get_capture_mode(msg); + gopro_heartbeat->flags = mavlink_msg_gopro_heartbeat_get_flags(msg); #else memcpy(gopro_heartbeat, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN); #endif diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_request.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_request.h index c05d0f4..3c287dc 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_request.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_request.h @@ -4,19 +4,19 @@ 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 + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t cmd_id; /*< Command ID*/ + uint8_t value[4]; /*< 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_MSG_ID_GOPRO_SET_REQUEST_LEN 7 +#define MAVLINK_MSG_ID_218_LEN 7 +#define MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC 17 +#define MAVLINK_MSG_ID_218_CRC 17 +#define MAVLINK_MSG_GOPRO_SET_REQUEST_FIELD_VALUE_LEN 4 #define MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST { \ "GOPRO_SET_REQUEST", \ @@ -24,7 +24,7 @@ typedef struct __mavlink_gopro_set_request_t { { "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) }, \ + { "value", NULL, MAVLINK_TYPE_UINT8_T, 4, 3, offsetof(mavlink_gopro_set_request_t, value) }, \ } \ } @@ -42,23 +42,21 @@ typedef struct __mavlink_gopro_set_request_t * @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) + uint8_t target_system, uint8_t target_component, uint8_t cmd_id, const uint8_t *value) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_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); - + _mav_put_uint8_t_array(buf, 3, value, 4); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); #else mavlink_gopro_set_request_t packet; packet.target_system = target_system; packet.target_component = target_component; packet.cmd_id = cmd_id; - packet.value = value; - + mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); #endif @@ -84,23 +82,21 @@ static inline uint16_t mavlink_msg_gopro_set_request_pack(uint8_t system_id, uin */ 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) + uint8_t target_system,uint8_t target_component,uint8_t cmd_id,const uint8_t *value) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_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); - + _mav_put_uint8_t_array(buf, 3, value, 4); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); #else mavlink_gopro_set_request_t packet; packet.target_system = target_system; packet.target_component = target_component; packet.cmd_id = cmd_id; - packet.value = value; - + mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); #endif @@ -150,15 +146,14 @@ static inline uint16_t mavlink_msg_gopro_set_request_encode_chan(uint8_t system_ */ #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) +static inline void mavlink_msg_gopro_set_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id, const uint8_t *value) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_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); - + _mav_put_uint8_t_array(buf, 3, value, 4); #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 @@ -169,8 +164,7 @@ static inline void mavlink_msg_gopro_set_request_send(mavlink_channel_t chan, ui packet.target_system = target_system; packet.target_component = target_component; packet.cmd_id = cmd_id; - packet.value = value; - + mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4); #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 @@ -187,15 +181,14 @@ static inline void mavlink_msg_gopro_set_request_send(mavlink_channel_t chan, ui 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) +static inline void mavlink_msg_gopro_set_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t cmd_id, const uint8_t *value) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; _mav_put_uint8_t(buf, 0, target_system); _mav_put_uint8_t(buf, 1, target_component); _mav_put_uint8_t(buf, 2, cmd_id); - _mav_put_uint8_t(buf, 3, value); - + _mav_put_uint8_t_array(buf, 3, value, 4); #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 @@ -206,8 +199,7 @@ static inline void mavlink_msg_gopro_set_request_send_buf(mavlink_message_t *msg packet->target_system = target_system; packet->target_component = target_component; packet->cmd_id = cmd_id; - packet->value = value; - + mav_array_memcpy(packet->value, value, sizeof(uint8_t)*4); #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 @@ -257,9 +249,9 @@ static inline uint8_t mavlink_msg_gopro_set_request_get_cmd_id(const mavlink_mes * * @return Value */ -static inline uint8_t mavlink_msg_gopro_set_request_get_value(const mavlink_message_t* msg) +static inline uint16_t mavlink_msg_gopro_set_request_get_value(const mavlink_message_t* msg, uint8_t *value) { - return _MAV_RETURN_uint8_t(msg, 3); + return _MAV_RETURN_uint8_t_array(msg, value, 4, 3); } /** @@ -274,7 +266,7 @@ static inline void mavlink_msg_gopro_set_request_decode(const mavlink_message_t* 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); + mavlink_msg_gopro_set_request_get_value(msg, gopro_set_request->value); #else memcpy(gopro_set_request, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN); #endif diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_response.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_response.h index d4dee54..a150421 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_response.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_gopro_set_response.h @@ -4,15 +4,15 @@ typedef struct __mavlink_gopro_set_response_t { - uint8_t cmd_id; ///< Command ID - uint8_t result; ///< Result + uint8_t cmd_id; /*< Command ID*/ + uint8_t status; /*< Status*/ } 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_MSG_ID_GOPRO_SET_RESPONSE_CRC 162 +#define MAVLINK_MSG_ID_219_CRC 162 @@ -20,7 +20,7 @@ typedef struct __mavlink_gopro_set_response_t "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) }, \ + { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_gopro_set_response_t, status) }, \ } \ } @@ -32,22 +32,22 @@ typedef struct __mavlink_gopro_set_response_t * @param msg The MAVLink message to compress the data into * * @param cmd_id Command ID - * @param result Result + * @param status Status * @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) + uint8_t cmd_id, uint8_t status) { #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); + _mav_put_uint8_t(buf, 1, status); 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; + packet.status = status; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); #endif @@ -67,23 +67,23 @@ static inline uint16_t mavlink_msg_gopro_set_response_pack(uint8_t system_id, ui * @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 + * @param status Status * @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) + uint8_t cmd_id,uint8_t status) { #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); + _mav_put_uint8_t(buf, 1, status); 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; + packet.status = status; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); #endif @@ -106,7 +106,7 @@ static inline uint16_t mavlink_msg_gopro_set_response_pack_chan(uint8_t system_i */ 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); + return mavlink_msg_gopro_set_response_pack(system_id, component_id, msg, gopro_set_response->cmd_id, gopro_set_response->status); } /** @@ -120,7 +120,7 @@ static inline uint16_t mavlink_msg_gopro_set_response_encode(uint8_t system_id, */ 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); + return mavlink_msg_gopro_set_response_pack_chan(system_id, component_id, chan, msg, gopro_set_response->cmd_id, gopro_set_response->status); } /** @@ -128,16 +128,16 @@ static inline uint16_t mavlink_msg_gopro_set_response_encode_chan(uint8_t system * @param chan MAVLink channel to send the message * * @param cmd_id Command ID - * @param result Result + * @param status Status */ #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) +static inline void mavlink_msg_gopro_set_response_send(mavlink_channel_t chan, uint8_t cmd_id, uint8_t status) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN]; _mav_put_uint8_t(buf, 0, cmd_id); - _mav_put_uint8_t(buf, 1, result); + _mav_put_uint8_t(buf, 1, status); #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); @@ -147,7 +147,7 @@ static inline void mavlink_msg_gopro_set_response_send(mavlink_channel_t chan, u #else mavlink_gopro_set_response_t packet; packet.cmd_id = cmd_id; - packet.result = result; + packet.status = status; #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); @@ -165,12 +165,12 @@ static inline void mavlink_msg_gopro_set_response_send(mavlink_channel_t chan, u 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) +static inline void mavlink_msg_gopro_set_response_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t cmd_id, uint8_t status) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; _mav_put_uint8_t(buf, 0, cmd_id); - _mav_put_uint8_t(buf, 1, result); + _mav_put_uint8_t(buf, 1, status); #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); @@ -180,7 +180,7 @@ static inline void mavlink_msg_gopro_set_response_send_buf(mavlink_message_t *ms #else mavlink_gopro_set_response_t *packet = (mavlink_gopro_set_response_t *)msgbuf; packet->cmd_id = cmd_id; - packet->result = result; + packet->status = status; #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); @@ -207,11 +207,11 @@ static inline uint8_t mavlink_msg_gopro_set_response_get_cmd_id(const mavlink_me } /** - * @brief Get field result from gopro_set_response message + * @brief Get field status from gopro_set_response message * - * @return Result + * @return Status */ -static inline uint8_t mavlink_msg_gopro_set_response_get_result(const mavlink_message_t* msg) +static inline uint8_t mavlink_msg_gopro_set_response_get_status(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 1); } @@ -226,7 +226,7 @@ static inline void mavlink_msg_gopro_set_response_decode(const mavlink_message_t { #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); + gopro_set_response->status = mavlink_msg_gopro_set_response_get_status(msg); #else memcpy(gopro_set_response, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN); #endif diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_hwstatus.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_hwstatus.h index acf031f..f821dc0 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_hwstatus.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_hwstatus.h @@ -4,8 +4,8 @@ typedef struct __mavlink_hwstatus_t { - uint16_t Vcc; ///< board voltage (mV) - uint8_t I2Cerr; ///< I2C error count + uint16_t Vcc; /*< board voltage (mV)*/ + uint8_t I2Cerr; /*< I2C error count*/ } mavlink_hwstatus_t; #define MAVLINK_MSG_ID_HWSTATUS_LEN 3 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_led_control.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_led_control.h index 847e206..42f7c1f 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_led_control.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_led_control.h @@ -4,12 +4,12 @@ typedef struct __mavlink_led_control_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t instance; ///< Instance (LED instance to control or 255 for all LEDs) - uint8_t pattern; ///< Pattern (see LED_PATTERN_ENUM) - uint8_t custom_len; ///< Custom Byte Length - uint8_t custom_bytes[24]; ///< Custom Bytes + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t instance; /*< Instance (LED instance to control or 255 for all LEDs)*/ + uint8_t pattern; /*< Pattern (see LED_PATTERN_ENUM)*/ + uint8_t custom_len; /*< Custom Byte Length*/ + uint8_t custom_bytes[24]; /*< Custom Bytes*/ } mavlink_led_control_t; #define MAVLINK_MSG_ID_LED_CONTROL_LEN 29 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_limits_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_limits_status.h index 5fef937..4f18318 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_limits_status.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_limits_status.h @@ -4,15 +4,15 @@ typedef struct __mavlink_limits_status_t { - uint32_t last_trigger; ///< time of last breach in milliseconds since boot - uint32_t last_action; ///< time of last recovery action in milliseconds since boot - uint32_t last_recovery; ///< time of last successful recovery in milliseconds since boot - uint32_t last_clear; ///< time of last all-clear in milliseconds since boot - uint16_t breach_count; ///< number of fence breaches - uint8_t limits_state; ///< state of AP_Limits, (see enum LimitState, LIMITS_STATE) - uint8_t mods_enabled; ///< AP_Limit_Module bitfield of enabled modules, (see enum moduleid or LIMIT_MODULE) - uint8_t mods_required; ///< AP_Limit_Module bitfield of required modules, (see enum moduleid or LIMIT_MODULE) - uint8_t mods_triggered; ///< AP_Limit_Module bitfield of triggered modules, (see enum moduleid or LIMIT_MODULE) + uint32_t last_trigger; /*< time of last breach in milliseconds since boot*/ + uint32_t last_action; /*< time of last recovery action in milliseconds since boot*/ + uint32_t last_recovery; /*< time of last successful recovery in milliseconds since boot*/ + uint32_t last_clear; /*< time of last all-clear in milliseconds since boot*/ + uint16_t breach_count; /*< number of fence breaches*/ + uint8_t limits_state; /*< state of AP_Limits, (see enum LimitState, LIMITS_STATE)*/ + uint8_t mods_enabled; /*< AP_Limit_Module bitfield of enabled modules, (see enum moduleid or LIMIT_MODULE)*/ + uint8_t mods_required; /*< AP_Limit_Module bitfield of required modules, (see enum moduleid or LIMIT_MODULE)*/ + uint8_t mods_triggered; /*< AP_Limit_Module bitfield of triggered modules, (see enum moduleid or LIMIT_MODULE)*/ } mavlink_limits_status_t; #define MAVLINK_MSG_ID_LIMITS_STATUS_LEN 22 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mag_cal_progress.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mag_cal_progress.h new file mode 100644 index 0000000..a6e7985 --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mag_cal_progress.h @@ -0,0 +1,393 @@ +// MESSAGE MAG_CAL_PROGRESS PACKING + +#define MAVLINK_MSG_ID_MAG_CAL_PROGRESS 191 + +typedef struct __mavlink_mag_cal_progress_t +{ + float direction_x; /*< Body frame direction vector for display*/ + float direction_y; /*< Body frame direction vector for display*/ + float direction_z; /*< Body frame direction vector for display*/ + uint8_t compass_id; /*< Compass being calibrated*/ + uint8_t cal_mask; /*< Bitmask of compasses being calibrated*/ + uint8_t cal_status; /*< Status (see MAG_CAL_STATUS enum)*/ + uint8_t attempt; /*< Attempt number*/ + uint8_t completion_pct; /*< Completion percentage*/ + uint8_t completion_mask[10]; /*< Bitmask of sphere sections (see http://en.wikipedia.org/wiki/Geodesic_grid)*/ +} mavlink_mag_cal_progress_t; + +#define MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN 27 +#define MAVLINK_MSG_ID_191_LEN 27 + +#define MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC 92 +#define MAVLINK_MSG_ID_191_CRC 92 + +#define MAVLINK_MSG_MAG_CAL_PROGRESS_FIELD_COMPLETION_MASK_LEN 10 + +#define MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS { \ + "MAG_CAL_PROGRESS", \ + 9, \ + { { "direction_x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mag_cal_progress_t, direction_x) }, \ + { "direction_y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mag_cal_progress_t, direction_y) }, \ + { "direction_z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mag_cal_progress_t, direction_z) }, \ + { "compass_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_mag_cal_progress_t, compass_id) }, \ + { "cal_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_mag_cal_progress_t, cal_mask) }, \ + { "cal_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_mag_cal_progress_t, cal_status) }, \ + { "attempt", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_mag_cal_progress_t, attempt) }, \ + { "completion_pct", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_mag_cal_progress_t, completion_pct) }, \ + { "completion_mask", NULL, MAVLINK_TYPE_UINT8_T, 10, 17, offsetof(mavlink_mag_cal_progress_t, completion_mask) }, \ + } \ +} + + +/** + * @brief Pack a mag_cal_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 compass_id Compass being calibrated + * @param cal_mask Bitmask of compasses being calibrated + * @param cal_status Status (see MAG_CAL_STATUS enum) + * @param attempt Attempt number + * @param completion_pct Completion percentage + * @param completion_mask Bitmask of sphere sections (see http://en.wikipedia.org/wiki/Geodesic_grid) + * @param direction_x Body frame direction vector for display + * @param direction_y Body frame direction vector for display + * @param direction_z Body frame direction vector for display + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_mag_cal_progress_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t attempt, uint8_t completion_pct, const uint8_t *completion_mask, float direction_x, float direction_y, float direction_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN]; + _mav_put_float(buf, 0, direction_x); + _mav_put_float(buf, 4, direction_y); + _mav_put_float(buf, 8, direction_z); + _mav_put_uint8_t(buf, 12, compass_id); + _mav_put_uint8_t(buf, 13, cal_mask); + _mav_put_uint8_t(buf, 14, cal_status); + _mav_put_uint8_t(buf, 15, attempt); + _mav_put_uint8_t(buf, 16, completion_pct); + _mav_put_uint8_t_array(buf, 17, completion_mask, 10); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#else + mavlink_mag_cal_progress_t packet; + packet.direction_x = direction_x; + packet.direction_y = direction_y; + packet.direction_z = direction_z; + packet.compass_id = compass_id; + packet.cal_mask = cal_mask; + packet.cal_status = cal_status; + packet.attempt = attempt; + packet.completion_pct = completion_pct; + mav_array_memcpy(packet.completion_mask, completion_mask, sizeof(uint8_t)*10); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_MAG_CAL_PROGRESS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#endif +} + +/** + * @brief Pack a mag_cal_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 compass_id Compass being calibrated + * @param cal_mask Bitmask of compasses being calibrated + * @param cal_status Status (see MAG_CAL_STATUS enum) + * @param attempt Attempt number + * @param completion_pct Completion percentage + * @param completion_mask Bitmask of sphere sections (see http://en.wikipedia.org/wiki/Geodesic_grid) + * @param direction_x Body frame direction vector for display + * @param direction_y Body frame direction vector for display + * @param direction_z Body frame direction vector for display + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_mag_cal_progress_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t compass_id,uint8_t cal_mask,uint8_t cal_status,uint8_t attempt,uint8_t completion_pct,const uint8_t *completion_mask,float direction_x,float direction_y,float direction_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN]; + _mav_put_float(buf, 0, direction_x); + _mav_put_float(buf, 4, direction_y); + _mav_put_float(buf, 8, direction_z); + _mav_put_uint8_t(buf, 12, compass_id); + _mav_put_uint8_t(buf, 13, cal_mask); + _mav_put_uint8_t(buf, 14, cal_status); + _mav_put_uint8_t(buf, 15, attempt); + _mav_put_uint8_t(buf, 16, completion_pct); + _mav_put_uint8_t_array(buf, 17, completion_mask, 10); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#else + mavlink_mag_cal_progress_t packet; + packet.direction_x = direction_x; + packet.direction_y = direction_y; + packet.direction_z = direction_z; + packet.compass_id = compass_id; + packet.cal_mask = cal_mask; + packet.cal_status = cal_status; + packet.attempt = attempt; + packet.completion_pct = completion_pct; + mav_array_memcpy(packet.completion_mask, completion_mask, sizeof(uint8_t)*10); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_MAG_CAL_PROGRESS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#endif +} + +/** + * @brief Encode a mag_cal_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 mag_cal_progress C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_mag_cal_progress_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mag_cal_progress_t* mag_cal_progress) +{ + return mavlink_msg_mag_cal_progress_pack(system_id, component_id, msg, mag_cal_progress->compass_id, mag_cal_progress->cal_mask, mag_cal_progress->cal_status, mag_cal_progress->attempt, mag_cal_progress->completion_pct, mag_cal_progress->completion_mask, mag_cal_progress->direction_x, mag_cal_progress->direction_y, mag_cal_progress->direction_z); +} + +/** + * @brief Encode a mag_cal_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 mag_cal_progress C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_mag_cal_progress_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mag_cal_progress_t* mag_cal_progress) +{ + return mavlink_msg_mag_cal_progress_pack_chan(system_id, component_id, chan, msg, mag_cal_progress->compass_id, mag_cal_progress->cal_mask, mag_cal_progress->cal_status, mag_cal_progress->attempt, mag_cal_progress->completion_pct, mag_cal_progress->completion_mask, mag_cal_progress->direction_x, mag_cal_progress->direction_y, mag_cal_progress->direction_z); +} + +/** + * @brief Send a mag_cal_progress message + * @param chan MAVLink channel to send the message + * + * @param compass_id Compass being calibrated + * @param cal_mask Bitmask of compasses being calibrated + * @param cal_status Status (see MAG_CAL_STATUS enum) + * @param attempt Attempt number + * @param completion_pct Completion percentage + * @param completion_mask Bitmask of sphere sections (see http://en.wikipedia.org/wiki/Geodesic_grid) + * @param direction_x Body frame direction vector for display + * @param direction_y Body frame direction vector for display + * @param direction_z Body frame direction vector for display + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_mag_cal_progress_send(mavlink_channel_t chan, uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t attempt, uint8_t completion_pct, const uint8_t *completion_mask, float direction_x, float direction_y, float direction_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN]; + _mav_put_float(buf, 0, direction_x); + _mav_put_float(buf, 4, direction_y); + _mav_put_float(buf, 8, direction_z); + _mav_put_uint8_t(buf, 12, compass_id); + _mav_put_uint8_t(buf, 13, cal_mask); + _mav_put_uint8_t(buf, 14, cal_status); + _mav_put_uint8_t(buf, 15, attempt); + _mav_put_uint8_t(buf, 16, completion_pct); + _mav_put_uint8_t_array(buf, 17, completion_mask, 10); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_PROGRESS, buf, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_PROGRESS, buf, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#endif +#else + mavlink_mag_cal_progress_t packet; + packet.direction_x = direction_x; + packet.direction_y = direction_y; + packet.direction_z = direction_z; + packet.compass_id = compass_id; + packet.cal_mask = cal_mask; + packet.cal_status = cal_status; + packet.attempt = attempt; + packet.completion_pct = completion_pct; + mav_array_memcpy(packet.completion_mask, completion_mask, sizeof(uint8_t)*10); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_PROGRESS, (const char *)&packet, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_MAG_CAL_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_mag_cal_progress_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t attempt, uint8_t completion_pct, const uint8_t *completion_mask, float direction_x, float direction_y, float direction_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_float(buf, 0, direction_x); + _mav_put_float(buf, 4, direction_y); + _mav_put_float(buf, 8, direction_z); + _mav_put_uint8_t(buf, 12, compass_id); + _mav_put_uint8_t(buf, 13, cal_mask); + _mav_put_uint8_t(buf, 14, cal_status); + _mav_put_uint8_t(buf, 15, attempt); + _mav_put_uint8_t(buf, 16, completion_pct); + _mav_put_uint8_t_array(buf, 17, completion_mask, 10); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_PROGRESS, buf, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_PROGRESS, buf, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#endif +#else + mavlink_mag_cal_progress_t *packet = (mavlink_mag_cal_progress_t *)msgbuf; + packet->direction_x = direction_x; + packet->direction_y = direction_y; + packet->direction_z = direction_z; + packet->compass_id = compass_id; + packet->cal_mask = cal_mask; + packet->cal_status = cal_status; + packet->attempt = attempt; + packet->completion_pct = completion_pct; + mav_array_memcpy(packet->completion_mask, completion_mask, sizeof(uint8_t)*10); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_PROGRESS, (const char *)packet, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE MAG_CAL_PROGRESS UNPACKING + + +/** + * @brief Get field compass_id from mag_cal_progress message + * + * @return Compass being calibrated + */ +static inline uint8_t mavlink_msg_mag_cal_progress_get_compass_id(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 12); +} + +/** + * @brief Get field cal_mask from mag_cal_progress message + * + * @return Bitmask of compasses being calibrated + */ +static inline uint8_t mavlink_msg_mag_cal_progress_get_cal_mask(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 13); +} + +/** + * @brief Get field cal_status from mag_cal_progress message + * + * @return Status (see MAG_CAL_STATUS enum) + */ +static inline uint8_t mavlink_msg_mag_cal_progress_get_cal_status(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 14); +} + +/** + * @brief Get field attempt from mag_cal_progress message + * + * @return Attempt number + */ +static inline uint8_t mavlink_msg_mag_cal_progress_get_attempt(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 15); +} + +/** + * @brief Get field completion_pct from mag_cal_progress message + * + * @return Completion percentage + */ +static inline uint8_t mavlink_msg_mag_cal_progress_get_completion_pct(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 16); +} + +/** + * @brief Get field completion_mask from mag_cal_progress message + * + * @return Bitmask of sphere sections (see http://en.wikipedia.org/wiki/Geodesic_grid) + */ +static inline uint16_t mavlink_msg_mag_cal_progress_get_completion_mask(const mavlink_message_t* msg, uint8_t *completion_mask) +{ + return _MAV_RETURN_uint8_t_array(msg, completion_mask, 10, 17); +} + +/** + * @brief Get field direction_x from mag_cal_progress message + * + * @return Body frame direction vector for display + */ +static inline float mavlink_msg_mag_cal_progress_get_direction_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 0); +} + +/** + * @brief Get field direction_y from mag_cal_progress message + * + * @return Body frame direction vector for display + */ +static inline float mavlink_msg_mag_cal_progress_get_direction_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 4); +} + +/** + * @brief Get field direction_z from mag_cal_progress message + * + * @return Body frame direction vector for display + */ +static inline float mavlink_msg_mag_cal_progress_get_direction_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 8); +} + +/** + * @brief Decode a mag_cal_progress message into a struct + * + * @param msg The message to decode + * @param mag_cal_progress C-struct to decode the message contents into + */ +static inline void mavlink_msg_mag_cal_progress_decode(const mavlink_message_t* msg, mavlink_mag_cal_progress_t* mag_cal_progress) +{ +#if MAVLINK_NEED_BYTE_SWAP + mag_cal_progress->direction_x = mavlink_msg_mag_cal_progress_get_direction_x(msg); + mag_cal_progress->direction_y = mavlink_msg_mag_cal_progress_get_direction_y(msg); + mag_cal_progress->direction_z = mavlink_msg_mag_cal_progress_get_direction_z(msg); + mag_cal_progress->compass_id = mavlink_msg_mag_cal_progress_get_compass_id(msg); + mag_cal_progress->cal_mask = mavlink_msg_mag_cal_progress_get_cal_mask(msg); + mag_cal_progress->cal_status = mavlink_msg_mag_cal_progress_get_cal_status(msg); + mag_cal_progress->attempt = mavlink_msg_mag_cal_progress_get_attempt(msg); + mag_cal_progress->completion_pct = mavlink_msg_mag_cal_progress_get_completion_pct(msg); + mavlink_msg_mag_cal_progress_get_completion_mask(msg, mag_cal_progress->completion_mask); +#else + memcpy(mag_cal_progress, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mag_cal_report.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mag_cal_report.h new file mode 100644 index 0000000..27551d6 --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mag_cal_report.h @@ -0,0 +1,521 @@ +// MESSAGE MAG_CAL_REPORT PACKING + +#define MAVLINK_MSG_ID_MAG_CAL_REPORT 192 + +typedef struct __mavlink_mag_cal_report_t +{ + float fitness; /*< RMS milligauss residuals*/ + float ofs_x; /*< X offset*/ + float ofs_y; /*< Y offset*/ + float ofs_z; /*< Z offset*/ + float diag_x; /*< X diagonal (matrix 11)*/ + float diag_y; /*< Y diagonal (matrix 22)*/ + float diag_z; /*< Z diagonal (matrix 33)*/ + float offdiag_x; /*< X off-diagonal (matrix 12 and 21)*/ + float offdiag_y; /*< Y off-diagonal (matrix 13 and 31)*/ + float offdiag_z; /*< Z off-diagonal (matrix 32 and 23)*/ + uint8_t compass_id; /*< Compass being calibrated*/ + uint8_t cal_mask; /*< Bitmask of compasses being calibrated*/ + uint8_t cal_status; /*< Status (see MAG_CAL_STATUS enum)*/ + uint8_t autosaved; /*< 0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters*/ +} mavlink_mag_cal_report_t; + +#define MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN 44 +#define MAVLINK_MSG_ID_192_LEN 44 + +#define MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC 36 +#define MAVLINK_MSG_ID_192_CRC 36 + + + +#define MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT { \ + "MAG_CAL_REPORT", \ + 14, \ + { { "fitness", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mag_cal_report_t, fitness) }, \ + { "ofs_x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mag_cal_report_t, ofs_x) }, \ + { "ofs_y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mag_cal_report_t, ofs_y) }, \ + { "ofs_z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mag_cal_report_t, ofs_z) }, \ + { "diag_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_mag_cal_report_t, diag_x) }, \ + { "diag_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_mag_cal_report_t, diag_y) }, \ + { "diag_z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mag_cal_report_t, diag_z) }, \ + { "offdiag_x", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_mag_cal_report_t, offdiag_x) }, \ + { "offdiag_y", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_mag_cal_report_t, offdiag_y) }, \ + { "offdiag_z", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_mag_cal_report_t, offdiag_z) }, \ + { "compass_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_mag_cal_report_t, compass_id) }, \ + { "cal_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_mag_cal_report_t, cal_mask) }, \ + { "cal_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_mag_cal_report_t, cal_status) }, \ + { "autosaved", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_mag_cal_report_t, autosaved) }, \ + } \ +} + + +/** + * @brief Pack a mag_cal_report message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param compass_id Compass being calibrated + * @param cal_mask Bitmask of compasses being calibrated + * @param cal_status Status (see MAG_CAL_STATUS enum) + * @param autosaved 0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters + * @param fitness RMS milligauss residuals + * @param ofs_x X offset + * @param ofs_y Y offset + * @param ofs_z Z offset + * @param diag_x X diagonal (matrix 11) + * @param diag_y Y diagonal (matrix 22) + * @param diag_z Z diagonal (matrix 33) + * @param offdiag_x X off-diagonal (matrix 12 and 21) + * @param offdiag_y Y off-diagonal (matrix 13 and 31) + * @param offdiag_z Z off-diagonal (matrix 32 and 23) + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_mag_cal_report_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t autosaved, float fitness, float ofs_x, float ofs_y, float ofs_z, float diag_x, float diag_y, float diag_z, float offdiag_x, float offdiag_y, float offdiag_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN]; + _mav_put_float(buf, 0, fitness); + _mav_put_float(buf, 4, ofs_x); + _mav_put_float(buf, 8, ofs_y); + _mav_put_float(buf, 12, ofs_z); + _mav_put_float(buf, 16, diag_x); + _mav_put_float(buf, 20, diag_y); + _mav_put_float(buf, 24, diag_z); + _mav_put_float(buf, 28, offdiag_x); + _mav_put_float(buf, 32, offdiag_y); + _mav_put_float(buf, 36, offdiag_z); + _mav_put_uint8_t(buf, 40, compass_id); + _mav_put_uint8_t(buf, 41, cal_mask); + _mav_put_uint8_t(buf, 42, cal_status); + _mav_put_uint8_t(buf, 43, autosaved); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#else + mavlink_mag_cal_report_t packet; + packet.fitness = fitness; + packet.ofs_x = ofs_x; + packet.ofs_y = ofs_y; + packet.ofs_z = ofs_z; + packet.diag_x = diag_x; + packet.diag_y = diag_y; + packet.diag_z = diag_z; + packet.offdiag_x = offdiag_x; + packet.offdiag_y = offdiag_y; + packet.offdiag_z = offdiag_z; + packet.compass_id = compass_id; + packet.cal_mask = cal_mask; + packet.cal_status = cal_status; + packet.autosaved = autosaved; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_MAG_CAL_REPORT; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#endif +} + +/** + * @brief Pack a mag_cal_report message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param compass_id Compass being calibrated + * @param cal_mask Bitmask of compasses being calibrated + * @param cal_status Status (see MAG_CAL_STATUS enum) + * @param autosaved 0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters + * @param fitness RMS milligauss residuals + * @param ofs_x X offset + * @param ofs_y Y offset + * @param ofs_z Z offset + * @param diag_x X diagonal (matrix 11) + * @param diag_y Y diagonal (matrix 22) + * @param diag_z Z diagonal (matrix 33) + * @param offdiag_x X off-diagonal (matrix 12 and 21) + * @param offdiag_y Y off-diagonal (matrix 13 and 31) + * @param offdiag_z Z off-diagonal (matrix 32 and 23) + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_mag_cal_report_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t compass_id,uint8_t cal_mask,uint8_t cal_status,uint8_t autosaved,float fitness,float ofs_x,float ofs_y,float ofs_z,float diag_x,float diag_y,float diag_z,float offdiag_x,float offdiag_y,float offdiag_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN]; + _mav_put_float(buf, 0, fitness); + _mav_put_float(buf, 4, ofs_x); + _mav_put_float(buf, 8, ofs_y); + _mav_put_float(buf, 12, ofs_z); + _mav_put_float(buf, 16, diag_x); + _mav_put_float(buf, 20, diag_y); + _mav_put_float(buf, 24, diag_z); + _mav_put_float(buf, 28, offdiag_x); + _mav_put_float(buf, 32, offdiag_y); + _mav_put_float(buf, 36, offdiag_z); + _mav_put_uint8_t(buf, 40, compass_id); + _mav_put_uint8_t(buf, 41, cal_mask); + _mav_put_uint8_t(buf, 42, cal_status); + _mav_put_uint8_t(buf, 43, autosaved); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#else + mavlink_mag_cal_report_t packet; + packet.fitness = fitness; + packet.ofs_x = ofs_x; + packet.ofs_y = ofs_y; + packet.ofs_z = ofs_z; + packet.diag_x = diag_x; + packet.diag_y = diag_y; + packet.diag_z = diag_z; + packet.offdiag_x = offdiag_x; + packet.offdiag_y = offdiag_y; + packet.offdiag_z = offdiag_z; + packet.compass_id = compass_id; + packet.cal_mask = cal_mask; + packet.cal_status = cal_status; + packet.autosaved = autosaved; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_MAG_CAL_REPORT; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#endif +} + +/** + * @brief Encode a mag_cal_report struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param mag_cal_report C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_mag_cal_report_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mag_cal_report_t* mag_cal_report) +{ + return mavlink_msg_mag_cal_report_pack(system_id, component_id, msg, mag_cal_report->compass_id, mag_cal_report->cal_mask, mag_cal_report->cal_status, mag_cal_report->autosaved, mag_cal_report->fitness, mag_cal_report->ofs_x, mag_cal_report->ofs_y, mag_cal_report->ofs_z, mag_cal_report->diag_x, mag_cal_report->diag_y, mag_cal_report->diag_z, mag_cal_report->offdiag_x, mag_cal_report->offdiag_y, mag_cal_report->offdiag_z); +} + +/** + * @brief Encode a mag_cal_report struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param mag_cal_report C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_mag_cal_report_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mag_cal_report_t* mag_cal_report) +{ + return mavlink_msg_mag_cal_report_pack_chan(system_id, component_id, chan, msg, mag_cal_report->compass_id, mag_cal_report->cal_mask, mag_cal_report->cal_status, mag_cal_report->autosaved, mag_cal_report->fitness, mag_cal_report->ofs_x, mag_cal_report->ofs_y, mag_cal_report->ofs_z, mag_cal_report->diag_x, mag_cal_report->diag_y, mag_cal_report->diag_z, mag_cal_report->offdiag_x, mag_cal_report->offdiag_y, mag_cal_report->offdiag_z); +} + +/** + * @brief Send a mag_cal_report message + * @param chan MAVLink channel to send the message + * + * @param compass_id Compass being calibrated + * @param cal_mask Bitmask of compasses being calibrated + * @param cal_status Status (see MAG_CAL_STATUS enum) + * @param autosaved 0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters + * @param fitness RMS milligauss residuals + * @param ofs_x X offset + * @param ofs_y Y offset + * @param ofs_z Z offset + * @param diag_x X diagonal (matrix 11) + * @param diag_y Y diagonal (matrix 22) + * @param diag_z Z diagonal (matrix 33) + * @param offdiag_x X off-diagonal (matrix 12 and 21) + * @param offdiag_y Y off-diagonal (matrix 13 and 31) + * @param offdiag_z Z off-diagonal (matrix 32 and 23) + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_mag_cal_report_send(mavlink_channel_t chan, uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t autosaved, float fitness, float ofs_x, float ofs_y, float ofs_z, float diag_x, float diag_y, float diag_z, float offdiag_x, float offdiag_y, float offdiag_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN]; + _mav_put_float(buf, 0, fitness); + _mav_put_float(buf, 4, ofs_x); + _mav_put_float(buf, 8, ofs_y); + _mav_put_float(buf, 12, ofs_z); + _mav_put_float(buf, 16, diag_x); + _mav_put_float(buf, 20, diag_y); + _mav_put_float(buf, 24, diag_z); + _mav_put_float(buf, 28, offdiag_x); + _mav_put_float(buf, 32, offdiag_y); + _mav_put_float(buf, 36, offdiag_z); + _mav_put_uint8_t(buf, 40, compass_id); + _mav_put_uint8_t(buf, 41, cal_mask); + _mav_put_uint8_t(buf, 42, cal_status); + _mav_put_uint8_t(buf, 43, autosaved); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, buf, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, buf, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#endif +#else + mavlink_mag_cal_report_t packet; + packet.fitness = fitness; + packet.ofs_x = ofs_x; + packet.ofs_y = ofs_y; + packet.ofs_z = ofs_z; + packet.diag_x = diag_x; + packet.diag_y = diag_y; + packet.diag_z = diag_z; + packet.offdiag_x = offdiag_x; + packet.offdiag_y = offdiag_y; + packet.offdiag_z = offdiag_z; + packet.compass_id = compass_id; + packet.cal_mask = cal_mask; + packet.cal_status = cal_status; + packet.autosaved = autosaved; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, (const char *)&packet, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, (const char *)&packet, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This varient of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_mag_cal_report_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t autosaved, float fitness, float ofs_x, float ofs_y, float ofs_z, float diag_x, float diag_y, float diag_z, float offdiag_x, float offdiag_y, float offdiag_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_float(buf, 0, fitness); + _mav_put_float(buf, 4, ofs_x); + _mav_put_float(buf, 8, ofs_y); + _mav_put_float(buf, 12, ofs_z); + _mav_put_float(buf, 16, diag_x); + _mav_put_float(buf, 20, diag_y); + _mav_put_float(buf, 24, diag_z); + _mav_put_float(buf, 28, offdiag_x); + _mav_put_float(buf, 32, offdiag_y); + _mav_put_float(buf, 36, offdiag_z); + _mav_put_uint8_t(buf, 40, compass_id); + _mav_put_uint8_t(buf, 41, cal_mask); + _mav_put_uint8_t(buf, 42, cal_status); + _mav_put_uint8_t(buf, 43, autosaved); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, buf, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, buf, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#endif +#else + mavlink_mag_cal_report_t *packet = (mavlink_mag_cal_report_t *)msgbuf; + packet->fitness = fitness; + packet->ofs_x = ofs_x; + packet->ofs_y = ofs_y; + packet->ofs_z = ofs_z; + packet->diag_x = diag_x; + packet->diag_y = diag_y; + packet->diag_z = diag_z; + packet->offdiag_x = offdiag_x; + packet->offdiag_y = offdiag_y; + packet->offdiag_z = offdiag_z; + packet->compass_id = compass_id; + packet->cal_mask = cal_mask; + packet->cal_status = cal_status; + packet->autosaved = autosaved; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, (const char *)packet, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, (const char *)packet, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE MAG_CAL_REPORT UNPACKING + + +/** + * @brief Get field compass_id from mag_cal_report message + * + * @return Compass being calibrated + */ +static inline uint8_t mavlink_msg_mag_cal_report_get_compass_id(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 40); +} + +/** + * @brief Get field cal_mask from mag_cal_report message + * + * @return Bitmask of compasses being calibrated + */ +static inline uint8_t mavlink_msg_mag_cal_report_get_cal_mask(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 41); +} + +/** + * @brief Get field cal_status from mag_cal_report message + * + * @return Status (see MAG_CAL_STATUS enum) + */ +static inline uint8_t mavlink_msg_mag_cal_report_get_cal_status(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 42); +} + +/** + * @brief Get field autosaved from mag_cal_report message + * + * @return 0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters + */ +static inline uint8_t mavlink_msg_mag_cal_report_get_autosaved(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 43); +} + +/** + * @brief Get field fitness from mag_cal_report message + * + * @return RMS milligauss residuals + */ +static inline float mavlink_msg_mag_cal_report_get_fitness(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 0); +} + +/** + * @brief Get field ofs_x from mag_cal_report message + * + * @return X offset + */ +static inline float mavlink_msg_mag_cal_report_get_ofs_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 4); +} + +/** + * @brief Get field ofs_y from mag_cal_report message + * + * @return Y offset + */ +static inline float mavlink_msg_mag_cal_report_get_ofs_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 8); +} + +/** + * @brief Get field ofs_z from mag_cal_report message + * + * @return Z offset + */ +static inline float mavlink_msg_mag_cal_report_get_ofs_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 12); +} + +/** + * @brief Get field diag_x from mag_cal_report message + * + * @return X diagonal (matrix 11) + */ +static inline float mavlink_msg_mag_cal_report_get_diag_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 16); +} + +/** + * @brief Get field diag_y from mag_cal_report message + * + * @return Y diagonal (matrix 22) + */ +static inline float mavlink_msg_mag_cal_report_get_diag_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 20); +} + +/** + * @brief Get field diag_z from mag_cal_report message + * + * @return Z diagonal (matrix 33) + */ +static inline float mavlink_msg_mag_cal_report_get_diag_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 24); +} + +/** + * @brief Get field offdiag_x from mag_cal_report message + * + * @return X off-diagonal (matrix 12 and 21) + */ +static inline float mavlink_msg_mag_cal_report_get_offdiag_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 28); +} + +/** + * @brief Get field offdiag_y from mag_cal_report message + * + * @return Y off-diagonal (matrix 13 and 31) + */ +static inline float mavlink_msg_mag_cal_report_get_offdiag_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 32); +} + +/** + * @brief Get field offdiag_z from mag_cal_report message + * + * @return Z off-diagonal (matrix 32 and 23) + */ +static inline float mavlink_msg_mag_cal_report_get_offdiag_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 36); +} + +/** + * @brief Decode a mag_cal_report message into a struct + * + * @param msg The message to decode + * @param mag_cal_report C-struct to decode the message contents into + */ +static inline void mavlink_msg_mag_cal_report_decode(const mavlink_message_t* msg, mavlink_mag_cal_report_t* mag_cal_report) +{ +#if MAVLINK_NEED_BYTE_SWAP + mag_cal_report->fitness = mavlink_msg_mag_cal_report_get_fitness(msg); + mag_cal_report->ofs_x = mavlink_msg_mag_cal_report_get_ofs_x(msg); + mag_cal_report->ofs_y = mavlink_msg_mag_cal_report_get_ofs_y(msg); + mag_cal_report->ofs_z = mavlink_msg_mag_cal_report_get_ofs_z(msg); + mag_cal_report->diag_x = mavlink_msg_mag_cal_report_get_diag_x(msg); + mag_cal_report->diag_y = mavlink_msg_mag_cal_report_get_diag_y(msg); + mag_cal_report->diag_z = mavlink_msg_mag_cal_report_get_diag_z(msg); + mag_cal_report->offdiag_x = mavlink_msg_mag_cal_report_get_offdiag_x(msg); + mag_cal_report->offdiag_y = mavlink_msg_mag_cal_report_get_offdiag_y(msg); + mag_cal_report->offdiag_z = mavlink_msg_mag_cal_report_get_offdiag_z(msg); + mag_cal_report->compass_id = mavlink_msg_mag_cal_report_get_compass_id(msg); + mag_cal_report->cal_mask = mavlink_msg_mag_cal_report_get_cal_mask(msg); + mag_cal_report->cal_status = mavlink_msg_mag_cal_report_get_cal_status(msg); + mag_cal_report->autosaved = mavlink_msg_mag_cal_report_get_autosaved(msg); +#else + memcpy(mag_cal_report, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_meminfo.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_meminfo.h index c64b2e9..9ceee51 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_meminfo.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_meminfo.h @@ -4,8 +4,8 @@ typedef struct __mavlink_meminfo_t { - uint16_t brkval; ///< heap top - uint16_t freemem; ///< free memory + uint16_t brkval; /*< heap top*/ + uint16_t freemem; /*< free memory*/ } mavlink_meminfo_t; #define MAVLINK_MSG_ID_MEMINFO_LEN 4 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_configure.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_configure.h index 350bb0b..802a01f 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_configure.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_configure.h @@ -4,12 +4,12 @@ typedef struct __mavlink_mount_configure_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t mount_mode; ///< mount operating mode (see MAV_MOUNT_MODE enum) - uint8_t stab_roll; ///< (1 = yes, 0 = no) - uint8_t stab_pitch; ///< (1 = yes, 0 = no) - uint8_t stab_yaw; ///< (1 = yes, 0 = no) + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t mount_mode; /*< mount operating mode (see MAV_MOUNT_MODE enum)*/ + uint8_t stab_roll; /*< (1 = yes, 0 = no)*/ + uint8_t stab_pitch; /*< (1 = yes, 0 = no)*/ + uint8_t stab_yaw; /*< (1 = yes, 0 = no)*/ } mavlink_mount_configure_t; #define MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN 6 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_control.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_control.h index 72d6e24..bf9d2b2 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_control.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_control.h @@ -4,12 +4,12 @@ typedef struct __mavlink_mount_control_t { - int32_t input_a; ///< pitch(deg*100) or lat, depending on mount mode - int32_t input_b; ///< roll(deg*100) or lon depending on mount mode - int32_t input_c; ///< yaw(deg*100) or alt (in cm) depending on mount mode - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t save_position; ///< if "1" it will save current trimmed position on EEPROM (just valid for NEUTRAL and LANDING) + int32_t input_a; /*< pitch(deg*100) or lat, depending on mount mode*/ + int32_t input_b; /*< roll(deg*100) or lon depending on mount mode*/ + int32_t input_c; /*< yaw(deg*100) or alt (in cm) depending on mount mode*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t save_position; /*< if "1" it will save current trimmed position on EEPROM (just valid for NEUTRAL and LANDING)*/ } mavlink_mount_control_t; #define MAVLINK_MSG_ID_MOUNT_CONTROL_LEN 15 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_status.h index 5c4fa0c..ec545bd 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_status.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_status.h @@ -4,11 +4,11 @@ typedef struct __mavlink_mount_status_t { - int32_t pointing_a; ///< pitch(deg*100) - int32_t pointing_b; ///< roll(deg*100) - int32_t pointing_c; ///< yaw(deg*100) - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + int32_t pointing_a; /*< pitch(deg*100)*/ + int32_t pointing_b; /*< roll(deg*100)*/ + int32_t pointing_c; /*< yaw(deg*100)*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_mount_status_t; #define MAVLINK_MSG_ID_MOUNT_STATUS_LEN 14 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_pid_tuning.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_pid_tuning.h index 0066498..4af993b 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_pid_tuning.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_pid_tuning.h @@ -4,13 +4,13 @@ typedef struct __mavlink_pid_tuning_t { - float desired; ///< desired rate (degrees/s) - float achieved; ///< achieved rate (degrees/s) - float FF; ///< FF component - float P; ///< P component - float I; ///< I component - float D; ///< D component - uint8_t axis; ///< axis + float desired; /*< desired rate (degrees/s)*/ + float achieved; /*< achieved rate (degrees/s)*/ + float FF; /*< FF component*/ + float P; /*< P component*/ + float I; /*< I component*/ + float D; /*< D component*/ + uint8_t axis; /*< axis*/ } mavlink_pid_tuning_t; #define MAVLINK_MSG_ID_PID_TUNING_LEN 25 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_radio.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_radio.h index 830eb46..1d3133e 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_radio.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_radio.h @@ -4,13 +4,13 @@ typedef struct __mavlink_radio_t { - uint16_t rxerrors; ///< receive errors - uint16_t fixed; ///< count of error corrected packets - uint8_t rssi; ///< local signal strength - uint8_t remrssi; ///< remote signal strength - uint8_t txbuf; ///< how full the tx buffer is as a percentage - uint8_t noise; ///< background noise level - uint8_t remnoise; ///< remote background noise level + uint16_t rxerrors; /*< receive errors*/ + uint16_t fixed; /*< count of error corrected packets*/ + uint8_t rssi; /*< local signal strength*/ + uint8_t remrssi; /*< remote signal strength*/ + uint8_t txbuf; /*< how full the tx buffer is as a percentage*/ + uint8_t noise; /*< background noise level*/ + uint8_t remnoise; /*< remote background noise level*/ } mavlink_radio_t; #define MAVLINK_MSG_ID_RADIO_LEN 9 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rally_fetch_point.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rally_fetch_point.h index 4598251..7c00a6d 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rally_fetch_point.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rally_fetch_point.h @@ -4,9 +4,9 @@ typedef struct __mavlink_rally_fetch_point_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t idx; ///< point index (first point is 0) + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t idx; /*< point index (first point is 0)*/ } mavlink_rally_fetch_point_t; #define MAVLINK_MSG_ID_RALLY_FETCH_POINT_LEN 3 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rally_point.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rally_point.h index b44e764..89a2cd9 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rally_point.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rally_point.h @@ -4,16 +4,16 @@ typedef struct __mavlink_rally_point_t { - int32_t lat; ///< Latitude of point in degrees * 1E7 - int32_t lng; ///< Longitude of point in degrees * 1E7 - int16_t alt; ///< Transit / loiter altitude in meters relative to home - int16_t break_alt; ///< Break altitude in meters relative to home - uint16_t land_dir; ///< Heading to aim for when landing. In centi-degrees. - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t idx; ///< point index (first point is 0) - uint8_t count; ///< total number of points (for sanity checking) - uint8_t flags; ///< See RALLY_FLAGS enum for definition of the bitmask. + int32_t lat; /*< Latitude of point in degrees * 1E7*/ + int32_t lng; /*< Longitude of point in degrees * 1E7*/ + int16_t alt; /*< Transit / loiter altitude in meters relative to home*/ + int16_t break_alt; /*< Break altitude in meters relative to home*/ + uint16_t land_dir; /*< Heading to aim for when landing. In centi-degrees.*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t idx; /*< point index (first point is 0)*/ + uint8_t count; /*< total number of points (for sanity checking)*/ + uint8_t flags; /*< See RALLY_FLAGS enum for definition of the bitmask.*/ } mavlink_rally_point_t; #define MAVLINK_MSG_ID_RALLY_POINT_LEN 19 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rangefinder.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rangefinder.h index 464ce8a..821e6d8 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rangefinder.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rangefinder.h @@ -4,8 +4,8 @@ typedef struct __mavlink_rangefinder_t { - float distance; ///< distance in meters - float voltage; ///< raw voltage if available, zero otherwise + float distance; /*< distance in meters*/ + float voltage; /*< raw voltage if available, zero otherwise*/ } mavlink_rangefinder_t; #define MAVLINK_MSG_ID_RANGEFINDER_LEN 8 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_remote_log_block_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_remote_log_block_status.h new file mode 100644 index 0000000..48ab62e --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_remote_log_block_status.h @@ -0,0 +1,281 @@ +// MESSAGE REMOTE_LOG_BLOCK_STATUS PACKING + +#define MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS 185 + +typedef struct __mavlink_remote_log_block_status_t +{ + uint32_t seqno; /*< log data block sequence number*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t status; /*< log data block status*/ +} mavlink_remote_log_block_status_t; + +#define MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN 7 +#define MAVLINK_MSG_ID_185_LEN 7 + +#define MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_CRC 186 +#define MAVLINK_MSG_ID_185_CRC 186 + + + +#define MAVLINK_MESSAGE_INFO_REMOTE_LOG_BLOCK_STATUS { \ + "REMOTE_LOG_BLOCK_STATUS", \ + 4, \ + { { "seqno", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_remote_log_block_status_t, seqno) }, \ + { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_remote_log_block_status_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_remote_log_block_status_t, target_component) }, \ + { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_remote_log_block_status_t, status) }, \ + } \ +} + + +/** + * @brief Pack a remote_log_block_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 + * @param seqno log data block sequence number + * @param status log data block status + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_remote_log_block_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint32_t seqno, uint8_t status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, seqno); + _mav_put_uint8_t(buf, 4, target_system); + _mav_put_uint8_t(buf, 5, target_component); + _mav_put_uint8_t(buf, 6, status); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#else + mavlink_remote_log_block_status_t packet; + packet.seqno = seqno; + packet.target_system = target_system; + packet.target_component = target_component; + packet.status = status; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#endif +} + +/** + * @brief Pack a remote_log_block_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 + * @param seqno log data block sequence number + * @param status log data block status + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_remote_log_block_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,uint32_t seqno,uint8_t status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, seqno); + _mav_put_uint8_t(buf, 4, target_system); + _mav_put_uint8_t(buf, 5, target_component); + _mav_put_uint8_t(buf, 6, status); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#else + mavlink_remote_log_block_status_t packet; + packet.seqno = seqno; + packet.target_system = target_system; + packet.target_component = target_component; + packet.status = status; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#endif +} + +/** + * @brief Encode a remote_log_block_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 remote_log_block_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_remote_log_block_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_remote_log_block_status_t* remote_log_block_status) +{ + return mavlink_msg_remote_log_block_status_pack(system_id, component_id, msg, remote_log_block_status->target_system, remote_log_block_status->target_component, remote_log_block_status->seqno, remote_log_block_status->status); +} + +/** + * @brief Encode a remote_log_block_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 remote_log_block_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_remote_log_block_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_remote_log_block_status_t* remote_log_block_status) +{ + return mavlink_msg_remote_log_block_status_pack_chan(system_id, component_id, chan, msg, remote_log_block_status->target_system, remote_log_block_status->target_component, remote_log_block_status->seqno, remote_log_block_status->status); +} + +/** + * @brief Send a remote_log_block_status message + * @param chan MAVLink channel to send the message + * + * @param target_system System ID + * @param target_component Component ID + * @param seqno log data block sequence number + * @param status log data block status + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_remote_log_block_status_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t seqno, uint8_t status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, seqno); + _mav_put_uint8_t(buf, 4, target_system); + _mav_put_uint8_t(buf, 5, target_component); + _mav_put_uint8_t(buf, 6, status); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS, buf, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS, buf, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#endif +#else + mavlink_remote_log_block_status_t packet; + packet.seqno = seqno; + packet.target_system = target_system; + packet.target_component = target_component; + packet.status = status; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS, (const char *)&packet, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS, (const char *)&packet, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_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_remote_log_block_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t seqno, uint8_t status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, seqno); + _mav_put_uint8_t(buf, 4, target_system); + _mav_put_uint8_t(buf, 5, target_component); + _mav_put_uint8_t(buf, 6, status); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS, buf, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS, buf, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#endif +#else + mavlink_remote_log_block_status_t *packet = (mavlink_remote_log_block_status_t *)msgbuf; + packet->seqno = seqno; + packet->target_system = target_system; + packet->target_component = target_component; + packet->status = status; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS, (const char *)packet, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS, (const char *)packet, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE REMOTE_LOG_BLOCK_STATUS UNPACKING + + +/** + * @brief Get field target_system from remote_log_block_status message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_remote_log_block_status_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 4); +} + +/** + * @brief Get field target_component from remote_log_block_status message + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_remote_log_block_status_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 5); +} + +/** + * @brief Get field seqno from remote_log_block_status message + * + * @return log data block sequence number + */ +static inline uint32_t mavlink_msg_remote_log_block_status_get_seqno(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Get field status from remote_log_block_status message + * + * @return log data block status + */ +static inline uint8_t mavlink_msg_remote_log_block_status_get_status(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 6); +} + +/** + * @brief Decode a remote_log_block_status message into a struct + * + * @param msg The message to decode + * @param remote_log_block_status C-struct to decode the message contents into + */ +static inline void mavlink_msg_remote_log_block_status_decode(const mavlink_message_t* msg, mavlink_remote_log_block_status_t* remote_log_block_status) +{ +#if MAVLINK_NEED_BYTE_SWAP + remote_log_block_status->seqno = mavlink_msg_remote_log_block_status_get_seqno(msg); + remote_log_block_status->target_system = mavlink_msg_remote_log_block_status_get_target_system(msg); + remote_log_block_status->target_component = mavlink_msg_remote_log_block_status_get_target_component(msg); + remote_log_block_status->status = mavlink_msg_remote_log_block_status_get_status(msg); +#else + memcpy(remote_log_block_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_remote_log_data_block.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_remote_log_data_block.h new file mode 100644 index 0000000..73c0242 --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_remote_log_data_block.h @@ -0,0 +1,273 @@ +// MESSAGE REMOTE_LOG_DATA_BLOCK PACKING + +#define MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK 184 + +typedef struct __mavlink_remote_log_data_block_t +{ + uint32_t seqno; /*< log data block sequence number*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t data[200]; /*< log data block*/ +} mavlink_remote_log_data_block_t; + +#define MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN 206 +#define MAVLINK_MSG_ID_184_LEN 206 + +#define MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_CRC 159 +#define MAVLINK_MSG_ID_184_CRC 159 + +#define MAVLINK_MSG_REMOTE_LOG_DATA_BLOCK_FIELD_DATA_LEN 200 + +#define MAVLINK_MESSAGE_INFO_REMOTE_LOG_DATA_BLOCK { \ + "REMOTE_LOG_DATA_BLOCK", \ + 4, \ + { { "seqno", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_remote_log_data_block_t, seqno) }, \ + { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_remote_log_data_block_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_remote_log_data_block_t, target_component) }, \ + { "data", NULL, MAVLINK_TYPE_UINT8_T, 200, 6, offsetof(mavlink_remote_log_data_block_t, data) }, \ + } \ +} + + +/** + * @brief Pack a remote_log_data_block 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 seqno log data block sequence number + * @param data log data block + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_remote_log_data_block_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint32_t seqno, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN]; + _mav_put_uint32_t(buf, 0, seqno); + _mav_put_uint8_t(buf, 4, target_system); + _mav_put_uint8_t(buf, 5, target_component); + _mav_put_uint8_t_array(buf, 6, data, 200); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#else + mavlink_remote_log_data_block_t packet; + packet.seqno = seqno; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*200); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#endif +} + +/** + * @brief Pack a remote_log_data_block 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 seqno log data block sequence number + * @param data log data block + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_remote_log_data_block_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 seqno,const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN]; + _mav_put_uint32_t(buf, 0, seqno); + _mav_put_uint8_t(buf, 4, target_system); + _mav_put_uint8_t(buf, 5, target_component); + _mav_put_uint8_t_array(buf, 6, data, 200); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#else + mavlink_remote_log_data_block_t packet; + packet.seqno = seqno; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*200); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#endif +} + +/** + * @brief Encode a remote_log_data_block 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 remote_log_data_block C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_remote_log_data_block_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_remote_log_data_block_t* remote_log_data_block) +{ + return mavlink_msg_remote_log_data_block_pack(system_id, component_id, msg, remote_log_data_block->target_system, remote_log_data_block->target_component, remote_log_data_block->seqno, remote_log_data_block->data); +} + +/** + * @brief Encode a remote_log_data_block 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 remote_log_data_block C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_remote_log_data_block_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_remote_log_data_block_t* remote_log_data_block) +{ + return mavlink_msg_remote_log_data_block_pack_chan(system_id, component_id, chan, msg, remote_log_data_block->target_system, remote_log_data_block->target_component, remote_log_data_block->seqno, remote_log_data_block->data); +} + +/** + * @brief Send a remote_log_data_block message + * @param chan MAVLink channel to send the message + * + * @param target_system System ID + * @param target_component Component ID + * @param seqno log data block sequence number + * @param data log data block + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_remote_log_data_block_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t seqno, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN]; + _mav_put_uint32_t(buf, 0, seqno); + _mav_put_uint8_t(buf, 4, target_system); + _mav_put_uint8_t(buf, 5, target_component); + _mav_put_uint8_t_array(buf, 6, data, 200); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK, buf, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK, buf, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#endif +#else + mavlink_remote_log_data_block_t packet; + packet.seqno = seqno; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*200); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK, (const char *)&packet, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK, (const char *)&packet, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_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_remote_log_data_block_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t seqno, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, seqno); + _mav_put_uint8_t(buf, 4, target_system); + _mav_put_uint8_t(buf, 5, target_component); + _mav_put_uint8_t_array(buf, 6, data, 200); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK, buf, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK, buf, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#endif +#else + mavlink_remote_log_data_block_t *packet = (mavlink_remote_log_data_block_t *)msgbuf; + packet->seqno = seqno; + packet->target_system = target_system; + packet->target_component = target_component; + mav_array_memcpy(packet->data, data, sizeof(uint8_t)*200); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK, (const char *)packet, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK, (const char *)packet, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE REMOTE_LOG_DATA_BLOCK UNPACKING + + +/** + * @brief Get field target_system from remote_log_data_block message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_remote_log_data_block_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 4); +} + +/** + * @brief Get field target_component from remote_log_data_block message + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_remote_log_data_block_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 5); +} + +/** + * @brief Get field seqno from remote_log_data_block message + * + * @return log data block sequence number + */ +static inline uint32_t mavlink_msg_remote_log_data_block_get_seqno(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Get field data from remote_log_data_block message + * + * @return log data block + */ +static inline uint16_t mavlink_msg_remote_log_data_block_get_data(const mavlink_message_t* msg, uint8_t *data) +{ + return _MAV_RETURN_uint8_t_array(msg, data, 200, 6); +} + +/** + * @brief Decode a remote_log_data_block message into a struct + * + * @param msg The message to decode + * @param remote_log_data_block C-struct to decode the message contents into + */ +static inline void mavlink_msg_remote_log_data_block_decode(const mavlink_message_t* msg, mavlink_remote_log_data_block_t* remote_log_data_block) +{ +#if MAVLINK_NEED_BYTE_SWAP + remote_log_data_block->seqno = mavlink_msg_remote_log_data_block_get_seqno(msg); + remote_log_data_block->target_system = mavlink_msg_remote_log_data_block_get_target_system(msg); + remote_log_data_block->target_component = mavlink_msg_remote_log_data_block_get_target_component(msg); + mavlink_msg_remote_log_data_block_get_data(msg, remote_log_data_block->data); +#else + memcpy(remote_log_data_block, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rpm.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rpm.h new file mode 100644 index 0000000..81d1178 --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_rpm.h @@ -0,0 +1,233 @@ +// MESSAGE RPM PACKING + +#define MAVLINK_MSG_ID_RPM 226 + +typedef struct __mavlink_rpm_t +{ + float rpm1; /*< RPM Sensor1*/ + float rpm2; /*< RPM Sensor2*/ +} mavlink_rpm_t; + +#define MAVLINK_MSG_ID_RPM_LEN 8 +#define MAVLINK_MSG_ID_226_LEN 8 + +#define MAVLINK_MSG_ID_RPM_CRC 207 +#define MAVLINK_MSG_ID_226_CRC 207 + + + +#define MAVLINK_MESSAGE_INFO_RPM { \ + "RPM", \ + 2, \ + { { "rpm1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_rpm_t, rpm1) }, \ + { "rpm2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_rpm_t, rpm2) }, \ + } \ +} + + +/** + * @brief Pack a rpm 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 rpm1 RPM Sensor1 + * @param rpm2 RPM Sensor2 + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_rpm_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + float rpm1, float rpm2) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_RPM_LEN]; + _mav_put_float(buf, 0, rpm1); + _mav_put_float(buf, 4, rpm2); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RPM_LEN); +#else + mavlink_rpm_t packet; + packet.rpm1 = rpm1; + packet.rpm2 = rpm2; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RPM_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_RPM; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RPM_LEN, MAVLINK_MSG_ID_RPM_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RPM_LEN); +#endif +} + +/** + * @brief Pack a rpm 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 rpm1 RPM Sensor1 + * @param rpm2 RPM Sensor2 + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_rpm_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + float rpm1,float rpm2) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_RPM_LEN]; + _mav_put_float(buf, 0, rpm1); + _mav_put_float(buf, 4, rpm2); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RPM_LEN); +#else + mavlink_rpm_t packet; + packet.rpm1 = rpm1; + packet.rpm2 = rpm2; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RPM_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_RPM; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RPM_LEN, MAVLINK_MSG_ID_RPM_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RPM_LEN); +#endif +} + +/** + * @brief Encode a rpm 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 rpm C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_rpm_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_rpm_t* rpm) +{ + return mavlink_msg_rpm_pack(system_id, component_id, msg, rpm->rpm1, rpm->rpm2); +} + +/** + * @brief Encode a rpm 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 rpm C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_rpm_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_rpm_t* rpm) +{ + return mavlink_msg_rpm_pack_chan(system_id, component_id, chan, msg, rpm->rpm1, rpm->rpm2); +} + +/** + * @brief Send a rpm message + * @param chan MAVLink channel to send the message + * + * @param rpm1 RPM Sensor1 + * @param rpm2 RPM Sensor2 + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_rpm_send(mavlink_channel_t chan, float rpm1, float rpm2) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_RPM_LEN]; + _mav_put_float(buf, 0, rpm1); + _mav_put_float(buf, 4, rpm2); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RPM, buf, MAVLINK_MSG_ID_RPM_LEN, MAVLINK_MSG_ID_RPM_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RPM, buf, MAVLINK_MSG_ID_RPM_LEN); +#endif +#else + mavlink_rpm_t packet; + packet.rpm1 = rpm1; + packet.rpm2 = rpm2; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RPM, (const char *)&packet, MAVLINK_MSG_ID_RPM_LEN, MAVLINK_MSG_ID_RPM_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RPM, (const char *)&packet, MAVLINK_MSG_ID_RPM_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_RPM_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_rpm_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float rpm1, float rpm2) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_float(buf, 0, rpm1); + _mav_put_float(buf, 4, rpm2); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RPM, buf, MAVLINK_MSG_ID_RPM_LEN, MAVLINK_MSG_ID_RPM_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RPM, buf, MAVLINK_MSG_ID_RPM_LEN); +#endif +#else + mavlink_rpm_t *packet = (mavlink_rpm_t *)msgbuf; + packet->rpm1 = rpm1; + packet->rpm2 = rpm2; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RPM, (const char *)packet, MAVLINK_MSG_ID_RPM_LEN, MAVLINK_MSG_ID_RPM_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RPM, (const char *)packet, MAVLINK_MSG_ID_RPM_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE RPM UNPACKING + + +/** + * @brief Get field rpm1 from rpm message + * + * @return RPM Sensor1 + */ +static inline float mavlink_msg_rpm_get_rpm1(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 0); +} + +/** + * @brief Get field rpm2 from rpm message + * + * @return RPM Sensor2 + */ +static inline float mavlink_msg_rpm_get_rpm2(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 4); +} + +/** + * @brief Decode a rpm message into a struct + * + * @param msg The message to decode + * @param rpm C-struct to decode the message contents into + */ +static inline void mavlink_msg_rpm_decode(const mavlink_message_t* msg, mavlink_rpm_t* rpm) +{ +#if MAVLINK_NEED_BYTE_SWAP + rpm->rpm1 = mavlink_msg_rpm_get_rpm1(msg); + rpm->rpm2 = mavlink_msg_rpm_get_rpm2(msg); +#else + memcpy(rpm, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RPM_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_sensor_offsets.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_sensor_offsets.h index d18f31c..7342bac 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_sensor_offsets.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_sensor_offsets.h @@ -4,18 +4,18 @@ typedef struct __mavlink_sensor_offsets_t { - float mag_declination; ///< magnetic declination (radians) - int32_t raw_press; ///< raw pressure from barometer - int32_t raw_temp; ///< raw temperature from barometer - float gyro_cal_x; ///< gyro X calibration - float gyro_cal_y; ///< gyro Y calibration - float gyro_cal_z; ///< gyro Z calibration - float accel_cal_x; ///< accel X calibration - float accel_cal_y; ///< accel Y calibration - float accel_cal_z; ///< accel Z calibration - int16_t mag_ofs_x; ///< magnetometer X offset - int16_t mag_ofs_y; ///< magnetometer Y offset - int16_t mag_ofs_z; ///< magnetometer Z offset + float mag_declination; /*< magnetic declination (radians)*/ + int32_t raw_press; /*< raw pressure from barometer*/ + int32_t raw_temp; /*< raw temperature from barometer*/ + float gyro_cal_x; /*< gyro X calibration*/ + float gyro_cal_y; /*< gyro Y calibration*/ + float gyro_cal_z; /*< gyro Z calibration*/ + float accel_cal_x; /*< accel X calibration*/ + float accel_cal_y; /*< accel Y calibration*/ + float accel_cal_z; /*< accel Z calibration*/ + int16_t mag_ofs_x; /*< magnetometer X offset*/ + int16_t mag_ofs_y; /*< magnetometer Y offset*/ + int16_t mag_ofs_z; /*< magnetometer Z offset*/ } mavlink_sensor_offsets_t; #define MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN 42 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_set_mag_offsets.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_set_mag_offsets.h index fc6aa71..0779d06 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_set_mag_offsets.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_set_mag_offsets.h @@ -4,11 +4,11 @@ typedef struct __mavlink_set_mag_offsets_t { - int16_t mag_ofs_x; ///< magnetometer X offset - int16_t mag_ofs_y; ///< magnetometer Y offset - int16_t mag_ofs_z; ///< magnetometer Z offset - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + int16_t mag_ofs_x; /*< magnetometer X offset*/ + int16_t mag_ofs_y; /*< magnetometer Y offset*/ + int16_t mag_ofs_z; /*< magnetometer Z offset*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_set_mag_offsets_t; #define MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN 8 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_simstate.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_simstate.h index 48cfb6f..81fd478 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_simstate.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_simstate.h @@ -4,17 +4,17 @@ typedef struct __mavlink_simstate_t { - float roll; ///< Roll angle (rad) - float pitch; ///< Pitch angle (rad) - float yaw; ///< Yaw angle (rad) - float xacc; ///< X acceleration m/s/s - float yacc; ///< Y acceleration m/s/s - float zacc; ///< Z acceleration m/s/s - float xgyro; ///< Angular speed around X axis rad/s - float ygyro; ///< Angular speed around Y axis rad/s - float zgyro; ///< Angular speed around Z axis rad/s - int32_t lat; ///< Latitude in degrees * 1E7 - int32_t lng; ///< Longitude in degrees * 1E7 + float roll; /*< Roll angle (rad)*/ + float pitch; /*< Pitch angle (rad)*/ + float yaw; /*< Yaw angle (rad)*/ + float xacc; /*< X acceleration m/s/s*/ + float yacc; /*< Y acceleration m/s/s*/ + float zacc; /*< Z acceleration m/s/s*/ + float xgyro; /*< Angular speed around X axis rad/s*/ + float ygyro; /*< Angular speed around Y axis rad/s*/ + float zgyro; /*< Angular speed around Z axis rad/s*/ + int32_t lat; /*< Latitude in degrees * 1E7*/ + int32_t lng; /*< Longitude in degrees * 1E7*/ } mavlink_simstate_t; #define MAVLINK_MSG_ID_SIMSTATE_LEN 44 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_wind.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_wind.h index 5d5edc4..6b40319 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_wind.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/mavlink_msg_wind.h @@ -4,9 +4,9 @@ typedef struct __mavlink_wind_t { - float direction; ///< wind direction that wind is coming from (degrees) - float speed; ///< wind speed in ground plane (m/s) - float speed_z; ///< vertical wind speed (m/s) + float direction; /*< wind direction that wind is coming from (degrees)*/ + float speed; /*< wind speed in ground plane (m/s)*/ + float speed_z; /*< vertical wind speed (m/s)*/ } mavlink_wind_t; #define MAVLINK_MSG_ID_WIND_LEN 12 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/testsuite.h b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/testsuite.h index 7d98709..e28836b 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/testsuite.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/ardupilotmega/testsuite.h @@ -1612,86 +1612,36 @@ static void mavlink_test_autopilot_version_request(uint8_t system_id, uint8_t co MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); } -static void mavlink_test_led_control(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) +static void mavlink_test_remote_log_data_block(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_led_control_t packet_in = { - 5,72,139,206,17,{ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107 } + mavlink_remote_log_data_block_t packet_in = { + 963497464,17,84,{ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 } }; - mavlink_led_control_t packet1, packet2; + mavlink_remote_log_data_block_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); + packet1.seqno = packet_in.seqno; packet1.target_system = packet_in.target_system; packet1.target_component = packet_in.target_component; - packet1.instance = packet_in.instance; - packet1.pattern = packet_in.pattern; - packet1.custom_len = packet_in.custom_len; - - mav_array_memcpy(packet1.custom_bytes, packet_in.custom_bytes, sizeof(uint8_t)*24); - - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_led_control_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_led_control_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_led_control_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.instance , packet1.pattern , packet1.custom_len , packet1.custom_bytes ); - mavlink_msg_led_control_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_led_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.instance , packet1.pattern , packet1.custom_len , packet1.custom_bytes ); - mavlink_msg_led_control_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; imsgid = MAVLINK_MSG_ID_ADSB_VEHICLE; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN); +#endif +} + +/** + * @brief Pack a adsb_vehicle 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 ICAO_address ICAO address + * @param lat Latitude, expressed as degrees * 1E7 + * @param lon Longitude, expressed as degrees * 1E7 + * @param altitude_type Type from ADSB_ALTITUDE_TYPE enum + * @param altitude Altitude(ASL) in millimeters + * @param heading Course over ground in centidegrees + * @param hor_velocity The horizontal velocity in centimeters/second + * @param ver_velocity The vertical velocity in centimeters/second, positive is up + * @param callsign The callsign, 8+null + * @param emitter_type Type from ADSB_EMITTER_TYPE enum + * @param tslc Time since last communication in seconds + * @param flags Flags to indicate various statuses including valid data fields + * @param squawk Squawk code + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_adsb_vehicle_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint32_t ICAO_address,int32_t lat,int32_t lon,uint8_t altitude_type,int32_t altitude,uint16_t heading,uint16_t hor_velocity,int16_t ver_velocity,const char *callsign,uint8_t emitter_type,uint8_t tslc,uint16_t flags,uint16_t squawk) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ADSB_VEHICLE_LEN]; + _mav_put_uint32_t(buf, 0, ICAO_address); + _mav_put_int32_t(buf, 4, lat); + _mav_put_int32_t(buf, 8, lon); + _mav_put_int32_t(buf, 12, altitude); + _mav_put_uint16_t(buf, 16, heading); + _mav_put_uint16_t(buf, 18, hor_velocity); + _mav_put_int16_t(buf, 20, ver_velocity); + _mav_put_uint16_t(buf, 22, flags); + _mav_put_uint16_t(buf, 24, squawk); + _mav_put_uint8_t(buf, 26, altitude_type); + _mav_put_uint8_t(buf, 36, emitter_type); + _mav_put_uint8_t(buf, 37, tslc); + _mav_put_char_array(buf, 27, callsign, 9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN); +#else + mavlink_adsb_vehicle_t packet; + packet.ICAO_address = ICAO_address; + packet.lat = lat; + packet.lon = lon; + packet.altitude = altitude; + packet.heading = heading; + packet.hor_velocity = hor_velocity; + packet.ver_velocity = ver_velocity; + packet.flags = flags; + packet.squawk = squawk; + packet.altitude_type = altitude_type; + packet.emitter_type = emitter_type; + packet.tslc = tslc; + mav_array_memcpy(packet.callsign, callsign, sizeof(char)*9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ADSB_VEHICLE; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN); +#endif +} + +/** + * @brief Encode a adsb_vehicle 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 adsb_vehicle C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_adsb_vehicle_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_adsb_vehicle_t* adsb_vehicle) +{ + return mavlink_msg_adsb_vehicle_pack(system_id, component_id, msg, adsb_vehicle->ICAO_address, adsb_vehicle->lat, adsb_vehicle->lon, adsb_vehicle->altitude_type, adsb_vehicle->altitude, adsb_vehicle->heading, adsb_vehicle->hor_velocity, adsb_vehicle->ver_velocity, adsb_vehicle->callsign, adsb_vehicle->emitter_type, adsb_vehicle->tslc, adsb_vehicle->flags, adsb_vehicle->squawk); +} + +/** + * @brief Encode a adsb_vehicle 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 adsb_vehicle C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_adsb_vehicle_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_adsb_vehicle_t* adsb_vehicle) +{ + return mavlink_msg_adsb_vehicle_pack_chan(system_id, component_id, chan, msg, adsb_vehicle->ICAO_address, adsb_vehicle->lat, adsb_vehicle->lon, adsb_vehicle->altitude_type, adsb_vehicle->altitude, adsb_vehicle->heading, adsb_vehicle->hor_velocity, adsb_vehicle->ver_velocity, adsb_vehicle->callsign, adsb_vehicle->emitter_type, adsb_vehicle->tslc, adsb_vehicle->flags, adsb_vehicle->squawk); +} + +/** + * @brief Send a adsb_vehicle message + * @param chan MAVLink channel to send the message + * + * @param ICAO_address ICAO address + * @param lat Latitude, expressed as degrees * 1E7 + * @param lon Longitude, expressed as degrees * 1E7 + * @param altitude_type Type from ADSB_ALTITUDE_TYPE enum + * @param altitude Altitude(ASL) in millimeters + * @param heading Course over ground in centidegrees + * @param hor_velocity The horizontal velocity in centimeters/second + * @param ver_velocity The vertical velocity in centimeters/second, positive is up + * @param callsign The callsign, 8+null + * @param emitter_type Type from ADSB_EMITTER_TYPE enum + * @param tslc Time since last communication in seconds + * @param flags Flags to indicate various statuses including valid data fields + * @param squawk Squawk code + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_adsb_vehicle_send(mavlink_channel_t chan, uint32_t ICAO_address, int32_t lat, int32_t lon, uint8_t altitude_type, int32_t altitude, uint16_t heading, uint16_t hor_velocity, int16_t ver_velocity, const char *callsign, uint8_t emitter_type, uint8_t tslc, uint16_t flags, uint16_t squawk) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ADSB_VEHICLE_LEN]; + _mav_put_uint32_t(buf, 0, ICAO_address); + _mav_put_int32_t(buf, 4, lat); + _mav_put_int32_t(buf, 8, lon); + _mav_put_int32_t(buf, 12, altitude); + _mav_put_uint16_t(buf, 16, heading); + _mav_put_uint16_t(buf, 18, hor_velocity); + _mav_put_int16_t(buf, 20, ver_velocity); + _mav_put_uint16_t(buf, 22, flags); + _mav_put_uint16_t(buf, 24, squawk); + _mav_put_uint8_t(buf, 26, altitude_type); + _mav_put_uint8_t(buf, 36, emitter_type); + _mav_put_uint8_t(buf, 37, tslc); + _mav_put_char_array(buf, 27, callsign, 9); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, buf, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, buf, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN); +#endif +#else + mavlink_adsb_vehicle_t packet; + packet.ICAO_address = ICAO_address; + packet.lat = lat; + packet.lon = lon; + packet.altitude = altitude; + packet.heading = heading; + packet.hor_velocity = hor_velocity; + packet.ver_velocity = ver_velocity; + packet.flags = flags; + packet.squawk = squawk; + packet.altitude_type = altitude_type; + packet.emitter_type = emitter_type; + packet.tslc = tslc; + mav_array_memcpy(packet.callsign, callsign, sizeof(char)*9); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, (const char *)&packet, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, (const char *)&packet, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_ADSB_VEHICLE_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_adsb_vehicle_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t ICAO_address, int32_t lat, int32_t lon, uint8_t altitude_type, int32_t altitude, uint16_t heading, uint16_t hor_velocity, int16_t ver_velocity, const char *callsign, uint8_t emitter_type, uint8_t tslc, uint16_t flags, uint16_t squawk) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, ICAO_address); + _mav_put_int32_t(buf, 4, lat); + _mav_put_int32_t(buf, 8, lon); + _mav_put_int32_t(buf, 12, altitude); + _mav_put_uint16_t(buf, 16, heading); + _mav_put_uint16_t(buf, 18, hor_velocity); + _mav_put_int16_t(buf, 20, ver_velocity); + _mav_put_uint16_t(buf, 22, flags); + _mav_put_uint16_t(buf, 24, squawk); + _mav_put_uint8_t(buf, 26, altitude_type); + _mav_put_uint8_t(buf, 36, emitter_type); + _mav_put_uint8_t(buf, 37, tslc); + _mav_put_char_array(buf, 27, callsign, 9); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, buf, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, buf, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN); +#endif +#else + mavlink_adsb_vehicle_t *packet = (mavlink_adsb_vehicle_t *)msgbuf; + packet->ICAO_address = ICAO_address; + packet->lat = lat; + packet->lon = lon; + packet->altitude = altitude; + packet->heading = heading; + packet->hor_velocity = hor_velocity; + packet->ver_velocity = ver_velocity; + packet->flags = flags; + packet->squawk = squawk; + packet->altitude_type = altitude_type; + packet->emitter_type = emitter_type; + packet->tslc = tslc; + mav_array_memcpy(packet->callsign, callsign, sizeof(char)*9); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, (const char *)packet, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, (const char *)packet, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE ADSB_VEHICLE UNPACKING + + +/** + * @brief Get field ICAO_address from adsb_vehicle message + * + * @return ICAO address + */ +static inline uint32_t mavlink_msg_adsb_vehicle_get_ICAO_address(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Get field lat from adsb_vehicle message + * + * @return Latitude, expressed as degrees * 1E7 + */ +static inline int32_t mavlink_msg_adsb_vehicle_get_lat(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 4); +} + +/** + * @brief Get field lon from adsb_vehicle message + * + * @return Longitude, expressed as degrees * 1E7 + */ +static inline int32_t mavlink_msg_adsb_vehicle_get_lon(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 8); +} + +/** + * @brief Get field altitude_type from adsb_vehicle message + * + * @return Type from ADSB_ALTITUDE_TYPE enum + */ +static inline uint8_t mavlink_msg_adsb_vehicle_get_altitude_type(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 26); +} + +/** + * @brief Get field altitude from adsb_vehicle message + * + * @return Altitude(ASL) in millimeters + */ +static inline int32_t mavlink_msg_adsb_vehicle_get_altitude(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 12); +} + +/** + * @brief Get field heading from adsb_vehicle message + * + * @return Course over ground in centidegrees + */ +static inline uint16_t mavlink_msg_adsb_vehicle_get_heading(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 16); +} + +/** + * @brief Get field hor_velocity from adsb_vehicle message + * + * @return The horizontal velocity in centimeters/second + */ +static inline uint16_t mavlink_msg_adsb_vehicle_get_hor_velocity(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 18); +} + +/** + * @brief Get field ver_velocity from adsb_vehicle message + * + * @return The vertical velocity in centimeters/second, positive is up + */ +static inline int16_t mavlink_msg_adsb_vehicle_get_ver_velocity(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int16_t(msg, 20); +} + +/** + * @brief Get field callsign from adsb_vehicle message + * + * @return The callsign, 8+null + */ +static inline uint16_t mavlink_msg_adsb_vehicle_get_callsign(const mavlink_message_t* msg, char *callsign) +{ + return _MAV_RETURN_char_array(msg, callsign, 9, 27); +} + +/** + * @brief Get field emitter_type from adsb_vehicle message + * + * @return Type from ADSB_EMITTER_TYPE enum + */ +static inline uint8_t mavlink_msg_adsb_vehicle_get_emitter_type(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 36); +} + +/** + * @brief Get field tslc from adsb_vehicle message + * + * @return Time since last communication in seconds + */ +static inline uint8_t mavlink_msg_adsb_vehicle_get_tslc(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 37); +} + +/** + * @brief Get field flags from adsb_vehicle message + * + * @return Flags to indicate various statuses including valid data fields + */ +static inline uint16_t mavlink_msg_adsb_vehicle_get_flags(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 22); +} + +/** + * @brief Get field squawk from adsb_vehicle message + * + * @return Squawk code + */ +static inline uint16_t mavlink_msg_adsb_vehicle_get_squawk(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 24); +} + +/** + * @brief Decode a adsb_vehicle message into a struct + * + * @param msg The message to decode + * @param adsb_vehicle C-struct to decode the message contents into + */ +static inline void mavlink_msg_adsb_vehicle_decode(const mavlink_message_t* msg, mavlink_adsb_vehicle_t* adsb_vehicle) +{ +#if MAVLINK_NEED_BYTE_SWAP + adsb_vehicle->ICAO_address = mavlink_msg_adsb_vehicle_get_ICAO_address(msg); + adsb_vehicle->lat = mavlink_msg_adsb_vehicle_get_lat(msg); + adsb_vehicle->lon = mavlink_msg_adsb_vehicle_get_lon(msg); + adsb_vehicle->altitude = mavlink_msg_adsb_vehicle_get_altitude(msg); + adsb_vehicle->heading = mavlink_msg_adsb_vehicle_get_heading(msg); + adsb_vehicle->hor_velocity = mavlink_msg_adsb_vehicle_get_hor_velocity(msg); + adsb_vehicle->ver_velocity = mavlink_msg_adsb_vehicle_get_ver_velocity(msg); + adsb_vehicle->flags = mavlink_msg_adsb_vehicle_get_flags(msg); + adsb_vehicle->squawk = mavlink_msg_adsb_vehicle_get_squawk(msg); + adsb_vehicle->altitude_type = mavlink_msg_adsb_vehicle_get_altitude_type(msg); + mavlink_msg_adsb_vehicle_get_callsign(msg, adsb_vehicle->callsign); + adsb_vehicle->emitter_type = mavlink_msg_adsb_vehicle_get_emitter_type(msg); + adsb_vehicle->tslc = mavlink_msg_adsb_vehicle_get_tslc(msg); +#else + memcpy(adsb_vehicle, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_ADSB_VEHICLE_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_altitude.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_altitude.h new file mode 100644 index 0000000..2ed8cb8 --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_altitude.h @@ -0,0 +1,353 @@ +// MESSAGE ALTITUDE PACKING + +#define MAVLINK_MSG_ID_ALTITUDE 141 + +typedef struct __mavlink_altitude_t +{ + uint64_t time_usec; /*< Timestamp (milliseconds since system boot)*/ + float altitude_monotonic; /*< This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights.*/ + float altitude_amsl; /*< This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output AMSL by default and not the WGS84 altitude.*/ + float altitude_local; /*< This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive.*/ + float altitude_relative; /*< This is the altitude above the home position. It resets on each change of the current home position.*/ + float altitude_terrain; /*< This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown.*/ + float bottom_clearance; /*< This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available.*/ +} mavlink_altitude_t; + +#define MAVLINK_MSG_ID_ALTITUDE_LEN 32 +#define MAVLINK_MSG_ID_141_LEN 32 + +#define MAVLINK_MSG_ID_ALTITUDE_CRC 47 +#define MAVLINK_MSG_ID_141_CRC 47 + + + +#define MAVLINK_MESSAGE_INFO_ALTITUDE { \ + "ALTITUDE", \ + 7, \ + { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_altitude_t, time_usec) }, \ + { "altitude_monotonic", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_altitude_t, altitude_monotonic) }, \ + { "altitude_amsl", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_altitude_t, altitude_amsl) }, \ + { "altitude_local", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_altitude_t, altitude_local) }, \ + { "altitude_relative", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_altitude_t, altitude_relative) }, \ + { "altitude_terrain", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_altitude_t, altitude_terrain) }, \ + { "bottom_clearance", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_altitude_t, bottom_clearance) }, \ + } \ +} + + +/** + * @brief Pack a altitude 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 time_usec Timestamp (milliseconds since system boot) + * @param altitude_monotonic This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights. + * @param altitude_amsl This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output AMSL by default and not the WGS84 altitude. + * @param altitude_local This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive. + * @param altitude_relative This is the altitude above the home position. It resets on each change of the current home position. + * @param altitude_terrain This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown. + * @param bottom_clearance This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_altitude_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint64_t time_usec, float altitude_monotonic, float altitude_amsl, float altitude_local, float altitude_relative, float altitude_terrain, float bottom_clearance) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ALTITUDE_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, altitude_monotonic); + _mav_put_float(buf, 12, altitude_amsl); + _mav_put_float(buf, 16, altitude_local); + _mav_put_float(buf, 20, altitude_relative); + _mav_put_float(buf, 24, altitude_terrain); + _mav_put_float(buf, 28, bottom_clearance); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ALTITUDE_LEN); +#else + mavlink_altitude_t packet; + packet.time_usec = time_usec; + packet.altitude_monotonic = altitude_monotonic; + packet.altitude_amsl = altitude_amsl; + packet.altitude_local = altitude_local; + packet.altitude_relative = altitude_relative; + packet.altitude_terrain = altitude_terrain; + packet.bottom_clearance = bottom_clearance; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ALTITUDE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ALTITUDE; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ALTITUDE_LEN, MAVLINK_MSG_ID_ALTITUDE_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ALTITUDE_LEN); +#endif +} + +/** + * @brief Pack a altitude 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 time_usec Timestamp (milliseconds since system boot) + * @param altitude_monotonic This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights. + * @param altitude_amsl This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output AMSL by default and not the WGS84 altitude. + * @param altitude_local This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive. + * @param altitude_relative This is the altitude above the home position. It resets on each change of the current home position. + * @param altitude_terrain This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown. + * @param bottom_clearance This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_altitude_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint64_t time_usec,float altitude_monotonic,float altitude_amsl,float altitude_local,float altitude_relative,float altitude_terrain,float bottom_clearance) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ALTITUDE_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, altitude_monotonic); + _mav_put_float(buf, 12, altitude_amsl); + _mav_put_float(buf, 16, altitude_local); + _mav_put_float(buf, 20, altitude_relative); + _mav_put_float(buf, 24, altitude_terrain); + _mav_put_float(buf, 28, bottom_clearance); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ALTITUDE_LEN); +#else + mavlink_altitude_t packet; + packet.time_usec = time_usec; + packet.altitude_monotonic = altitude_monotonic; + packet.altitude_amsl = altitude_amsl; + packet.altitude_local = altitude_local; + packet.altitude_relative = altitude_relative; + packet.altitude_terrain = altitude_terrain; + packet.bottom_clearance = bottom_clearance; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ALTITUDE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ALTITUDE; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ALTITUDE_LEN, MAVLINK_MSG_ID_ALTITUDE_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ALTITUDE_LEN); +#endif +} + +/** + * @brief Encode a altitude 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 altitude C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_altitude_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_altitude_t* altitude) +{ + return mavlink_msg_altitude_pack(system_id, component_id, msg, altitude->time_usec, altitude->altitude_monotonic, altitude->altitude_amsl, altitude->altitude_local, altitude->altitude_relative, altitude->altitude_terrain, altitude->bottom_clearance); +} + +/** + * @brief Encode a altitude 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 altitude C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_altitude_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_altitude_t* altitude) +{ + return mavlink_msg_altitude_pack_chan(system_id, component_id, chan, msg, altitude->time_usec, altitude->altitude_monotonic, altitude->altitude_amsl, altitude->altitude_local, altitude->altitude_relative, altitude->altitude_terrain, altitude->bottom_clearance); +} + +/** + * @brief Send a altitude message + * @param chan MAVLink channel to send the message + * + * @param time_usec Timestamp (milliseconds since system boot) + * @param altitude_monotonic This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights. + * @param altitude_amsl This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output AMSL by default and not the WGS84 altitude. + * @param altitude_local This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive. + * @param altitude_relative This is the altitude above the home position. It resets on each change of the current home position. + * @param altitude_terrain This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown. + * @param bottom_clearance This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_altitude_send(mavlink_channel_t chan, uint64_t time_usec, float altitude_monotonic, float altitude_amsl, float altitude_local, float altitude_relative, float altitude_terrain, float bottom_clearance) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ALTITUDE_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, altitude_monotonic); + _mav_put_float(buf, 12, altitude_amsl); + _mav_put_float(buf, 16, altitude_local); + _mav_put_float(buf, 20, altitude_relative); + _mav_put_float(buf, 24, altitude_terrain); + _mav_put_float(buf, 28, bottom_clearance); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDE, buf, MAVLINK_MSG_ID_ALTITUDE_LEN, MAVLINK_MSG_ID_ALTITUDE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDE, buf, MAVLINK_MSG_ID_ALTITUDE_LEN); +#endif +#else + mavlink_altitude_t packet; + packet.time_usec = time_usec; + packet.altitude_monotonic = altitude_monotonic; + packet.altitude_amsl = altitude_amsl; + packet.altitude_local = altitude_local; + packet.altitude_relative = altitude_relative; + packet.altitude_terrain = altitude_terrain; + packet.bottom_clearance = bottom_clearance; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDE, (const char *)&packet, MAVLINK_MSG_ID_ALTITUDE_LEN, MAVLINK_MSG_ID_ALTITUDE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDE, (const char *)&packet, MAVLINK_MSG_ID_ALTITUDE_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_ALTITUDE_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_altitude_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, float altitude_monotonic, float altitude_amsl, float altitude_local, float altitude_relative, float altitude_terrain, float bottom_clearance) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, altitude_monotonic); + _mav_put_float(buf, 12, altitude_amsl); + _mav_put_float(buf, 16, altitude_local); + _mav_put_float(buf, 20, altitude_relative); + _mav_put_float(buf, 24, altitude_terrain); + _mav_put_float(buf, 28, bottom_clearance); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDE, buf, MAVLINK_MSG_ID_ALTITUDE_LEN, MAVLINK_MSG_ID_ALTITUDE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDE, buf, MAVLINK_MSG_ID_ALTITUDE_LEN); +#endif +#else + mavlink_altitude_t *packet = (mavlink_altitude_t *)msgbuf; + packet->time_usec = time_usec; + packet->altitude_monotonic = altitude_monotonic; + packet->altitude_amsl = altitude_amsl; + packet->altitude_local = altitude_local; + packet->altitude_relative = altitude_relative; + packet->altitude_terrain = altitude_terrain; + packet->bottom_clearance = bottom_clearance; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDE, (const char *)packet, MAVLINK_MSG_ID_ALTITUDE_LEN, MAVLINK_MSG_ID_ALTITUDE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDE, (const char *)packet, MAVLINK_MSG_ID_ALTITUDE_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE ALTITUDE UNPACKING + + +/** + * @brief Get field time_usec from altitude message + * + * @return Timestamp (milliseconds since system boot) + */ +static inline uint64_t mavlink_msg_altitude_get_time_usec(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint64_t(msg, 0); +} + +/** + * @brief Get field altitude_monotonic from altitude message + * + * @return This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights. + */ +static inline float mavlink_msg_altitude_get_altitude_monotonic(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 8); +} + +/** + * @brief Get field altitude_amsl from altitude message + * + * @return This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output AMSL by default and not the WGS84 altitude. + */ +static inline float mavlink_msg_altitude_get_altitude_amsl(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 12); +} + +/** + * @brief Get field altitude_local from altitude message + * + * @return This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive. + */ +static inline float mavlink_msg_altitude_get_altitude_local(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 16); +} + +/** + * @brief Get field altitude_relative from altitude message + * + * @return This is the altitude above the home position. It resets on each change of the current home position. + */ +static inline float mavlink_msg_altitude_get_altitude_relative(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 20); +} + +/** + * @brief Get field altitude_terrain from altitude message + * + * @return This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown. + */ +static inline float mavlink_msg_altitude_get_altitude_terrain(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 24); +} + +/** + * @brief Get field bottom_clearance from altitude message + * + * @return This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available. + */ +static inline float mavlink_msg_altitude_get_bottom_clearance(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 28); +} + +/** + * @brief Decode a altitude message into a struct + * + * @param msg The message to decode + * @param altitude C-struct to decode the message contents into + */ +static inline void mavlink_msg_altitude_decode(const mavlink_message_t* msg, mavlink_altitude_t* altitude) +{ +#if MAVLINK_NEED_BYTE_SWAP + altitude->time_usec = mavlink_msg_altitude_get_time_usec(msg); + altitude->altitude_monotonic = mavlink_msg_altitude_get_altitude_monotonic(msg); + altitude->altitude_amsl = mavlink_msg_altitude_get_altitude_amsl(msg); + altitude->altitude_local = mavlink_msg_altitude_get_altitude_local(msg); + altitude->altitude_relative = mavlink_msg_altitude_get_altitude_relative(msg); + altitude->altitude_terrain = mavlink_msg_altitude_get_altitude_terrain(msg); + altitude->bottom_clearance = mavlink_msg_altitude_get_bottom_clearance(msg); +#else + memcpy(altitude, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_ALTITUDE_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_att_pos_mocap.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_att_pos_mocap.h index f776883..581a243 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_att_pos_mocap.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_att_pos_mocap.h @@ -4,11 +4,11 @@ typedef struct __mavlink_att_pos_mocap_t { - uint64_t time_usec; ///< Timestamp (micros since boot or Unix epoch) - float q[4]; ///< Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - float x; ///< X position in meters (NED) - float y; ///< Y position in meters (NED) - float z; ///< Z position in meters (NED) + uint64_t time_usec; /*< Timestamp (micros since boot or Unix epoch)*/ + float q[4]; /*< Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)*/ + float x; /*< X position in meters (NED)*/ + float y; /*< Y position in meters (NED)*/ + float z; /*< Z position in meters (NED)*/ } mavlink_att_pos_mocap_t; #define MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN 36 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude.h index ff2f104..ca9f5ac 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude.h @@ -4,13 +4,13 @@ typedef struct __mavlink_attitude_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - float roll; ///< Roll angle (rad, -pi..+pi) - float pitch; ///< Pitch angle (rad, -pi..+pi) - float yaw; ///< Yaw angle (rad, -pi..+pi) - float rollspeed; ///< Roll angular speed (rad/s) - float pitchspeed; ///< Pitch angular speed (rad/s) - float yawspeed; ///< Yaw angular speed (rad/s) + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + float roll; /*< Roll angle (rad, -pi..+pi)*/ + float pitch; /*< Pitch angle (rad, -pi..+pi)*/ + float yaw; /*< Yaw angle (rad, -pi..+pi)*/ + float rollspeed; /*< Roll angular speed (rad/s)*/ + float pitchspeed; /*< Pitch angular speed (rad/s)*/ + float yawspeed; /*< Yaw angular speed (rad/s)*/ } mavlink_attitude_t; #define MAVLINK_MSG_ID_ATTITUDE_LEN 28 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_quaternion.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_quaternion.h index 35170a7..df362b4 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_quaternion.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_quaternion.h @@ -4,14 +4,14 @@ typedef struct __mavlink_attitude_quaternion_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - float q1; ///< Quaternion component 1, w (1 in null-rotation) - float q2; ///< Quaternion component 2, x (0 in null-rotation) - float q3; ///< Quaternion component 3, y (0 in null-rotation) - float q4; ///< Quaternion component 4, z (0 in null-rotation) - float rollspeed; ///< Roll angular speed (rad/s) - float pitchspeed; ///< Pitch angular speed (rad/s) - float yawspeed; ///< Yaw angular speed (rad/s) + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + float q1; /*< Quaternion component 1, w (1 in null-rotation)*/ + float q2; /*< Quaternion component 2, x (0 in null-rotation)*/ + float q3; /*< Quaternion component 3, y (0 in null-rotation)*/ + float q4; /*< Quaternion component 4, z (0 in null-rotation)*/ + float rollspeed; /*< Roll angular speed (rad/s)*/ + float pitchspeed; /*< Pitch angular speed (rad/s)*/ + float yawspeed; /*< Yaw angular speed (rad/s)*/ } mavlink_attitude_quaternion_t; #define MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN 32 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_quaternion_cov.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_quaternion_cov.h index 38b8f24..dc99d9d 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_quaternion_cov.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_quaternion_cov.h @@ -4,12 +4,12 @@ typedef struct __mavlink_attitude_quaternion_cov_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - float q[4]; ///< Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation) - float rollspeed; ///< Roll angular speed (rad/s) - float pitchspeed; ///< Pitch angular speed (rad/s) - float yawspeed; ///< Yaw angular speed (rad/s) - float covariance[9]; ///< Attitude covariance + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + float q[4]; /*< Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)*/ + float rollspeed; /*< Roll angular speed (rad/s)*/ + float pitchspeed; /*< Pitch angular speed (rad/s)*/ + float yawspeed; /*< Yaw angular speed (rad/s)*/ + float covariance[9]; /*< Attitude covariance*/ } mavlink_attitude_quaternion_cov_t; #define MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN 68 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_target.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_target.h index 7c4b1c7..5313fb0 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_target.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_attitude_target.h @@ -4,13 +4,13 @@ typedef struct __mavlink_attitude_target_t { - uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot - float q[4]; ///< Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - float body_roll_rate; ///< Body roll rate in radians per second - float body_pitch_rate; ///< Body roll rate in radians per second - float body_yaw_rate; ///< Body roll rate in radians per second - float thrust; ///< Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) - uint8_t type_mask; ///< Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude + uint32_t time_boot_ms; /*< Timestamp in milliseconds since system boot*/ + float q[4]; /*< Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)*/ + float body_roll_rate; /*< Body roll rate in radians per second*/ + float body_pitch_rate; /*< Body roll rate in radians per second*/ + float body_yaw_rate; /*< Body roll rate in radians per second*/ + float thrust; /*< Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)*/ + uint8_t type_mask; /*< Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude*/ } mavlink_attitude_target_t; #define MAVLINK_MSG_ID_ATTITUDE_TARGET_LEN 37 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_auth_key.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_auth_key.h index f31b6bb..4c6c114 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_auth_key.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_auth_key.h @@ -4,7 +4,7 @@ typedef struct __mavlink_auth_key_t { - char key[32]; ///< key + char key[32]; /*< key*/ } mavlink_auth_key_t; #define MAVLINK_MSG_ID_AUTH_KEY_LEN 32 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_autopilot_version.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_autopilot_version.h index 5012503..7cef9ea 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_autopilot_version.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_autopilot_version.h @@ -4,17 +4,17 @@ typedef struct __mavlink_autopilot_version_t { - uint64_t capabilities; ///< bitmask of capabilities (see MAV_PROTOCOL_CAPABILITY enum) - uint64_t uid; ///< UID if provided by hardware - uint32_t flight_sw_version; ///< Firmware version number - uint32_t middleware_sw_version; ///< Middleware version number - uint32_t os_sw_version; ///< Operating system version number - uint32_t board_version; ///< HW / board version (last 8 bytes should be silicon ID, if any) - uint16_t vendor_id; ///< ID of the board vendor - uint16_t product_id; ///< ID of the product - uint8_t flight_custom_version[8]; ///< Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. - uint8_t middleware_custom_version[8]; ///< Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. - uint8_t os_custom_version[8]; ///< Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. + uint64_t capabilities; /*< bitmask of capabilities (see MAV_PROTOCOL_CAPABILITY enum)*/ + uint64_t uid; /*< UID if provided by hardware*/ + uint32_t flight_sw_version; /*< Firmware version number*/ + uint32_t middleware_sw_version; /*< Middleware version number*/ + uint32_t os_sw_version; /*< Operating system version number*/ + uint32_t board_version; /*< HW / board version (last 8 bytes should be silicon ID, if any)*/ + uint16_t vendor_id; /*< ID of the board vendor*/ + uint16_t product_id; /*< ID of the product*/ + uint8_t flight_custom_version[8]; /*< Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.*/ + uint8_t middleware_custom_version[8]; /*< Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.*/ + uint8_t os_custom_version[8]; /*< Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.*/ } mavlink_autopilot_version_t; #define MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN 60 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_battery_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_battery_status.h index 12371e6..9311a7d 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_battery_status.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_battery_status.h @@ -4,15 +4,15 @@ typedef struct __mavlink_battery_status_t { - int32_t current_consumed; ///< Consumed charge, in milliampere hours (1 = 1 mAh), -1: autopilot does not provide mAh consumption estimate - int32_t energy_consumed; ///< Consumed energy, in 100*Joules (intergrated U*I*dt) (1 = 100 Joule), -1: autopilot does not provide energy consumption estimate - int16_t temperature; ///< Temperature of the battery in centi-degrees celsius. INT16_MAX for unknown temperature. - uint16_t voltages[10]; ///< Battery voltage of cells, in millivolts (1 = 1 millivolt) - int16_t current_battery; ///< Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current - uint8_t id; ///< Battery ID - uint8_t battery_function; ///< Function of the battery - uint8_t type; ///< Type (chemistry) of the battery - int8_t battery_remaining; ///< Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot does not estimate the remaining battery + int32_t current_consumed; /*< Consumed charge, in milliampere hours (1 = 1 mAh), -1: autopilot does not provide mAh consumption estimate*/ + int32_t energy_consumed; /*< Consumed energy, in 100*Joules (intergrated U*I*dt) (1 = 100 Joule), -1: autopilot does not provide energy consumption estimate*/ + int16_t temperature; /*< Temperature of the battery in centi-degrees celsius. INT16_MAX for unknown temperature.*/ + uint16_t voltages[10]; /*< Battery voltage of cells, in millivolts (1 = 1 millivolt). Cells above the valid cell count for this battery should have the UINT16_MAX value.*/ + int16_t current_battery; /*< Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current*/ + uint8_t id; /*< Battery ID*/ + uint8_t battery_function; /*< Function of the battery*/ + uint8_t type; /*< Type (chemistry) of the battery*/ + int8_t battery_remaining; /*< Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot does not estimate the remaining battery*/ } mavlink_battery_status_t; #define MAVLINK_MSG_ID_BATTERY_STATUS_LEN 36 @@ -49,7 +49,7 @@ typedef struct __mavlink_battery_status_t * @param battery_function Function of the battery * @param type Type (chemistry) of the battery * @param temperature Temperature of the battery in centi-degrees celsius. INT16_MAX for unknown temperature. - * @param voltages Battery voltage of cells, in millivolts (1 = 1 millivolt) + * @param voltages Battery voltage of cells, in millivolts (1 = 1 millivolt). Cells above the valid cell count for this battery should have the UINT16_MAX value. * @param current_battery Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current * @param current_consumed Consumed charge, in milliampere hours (1 = 1 mAh), -1: autopilot does not provide mAh consumption estimate * @param energy_consumed Consumed energy, in 100*Joules (intergrated U*I*dt) (1 = 100 Joule), -1: autopilot does not provide energy consumption estimate @@ -103,7 +103,7 @@ static inline uint16_t mavlink_msg_battery_status_pack(uint8_t system_id, uint8_ * @param battery_function Function of the battery * @param type Type (chemistry) of the battery * @param temperature Temperature of the battery in centi-degrees celsius. INT16_MAX for unknown temperature. - * @param voltages Battery voltage of cells, in millivolts (1 = 1 millivolt) + * @param voltages Battery voltage of cells, in millivolts (1 = 1 millivolt). Cells above the valid cell count for this battery should have the UINT16_MAX value. * @param current_battery Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current * @param current_consumed Consumed charge, in milliampere hours (1 = 1 mAh), -1: autopilot does not provide mAh consumption estimate * @param energy_consumed Consumed energy, in 100*Joules (intergrated U*I*dt) (1 = 100 Joule), -1: autopilot does not provide energy consumption estimate @@ -183,7 +183,7 @@ static inline uint16_t mavlink_msg_battery_status_encode_chan(uint8_t system_id, * @param battery_function Function of the battery * @param type Type (chemistry) of the battery * @param temperature Temperature of the battery in centi-degrees celsius. INT16_MAX for unknown temperature. - * @param voltages Battery voltage of cells, in millivolts (1 = 1 millivolt) + * @param voltages Battery voltage of cells, in millivolts (1 = 1 millivolt). Cells above the valid cell count for this battery should have the UINT16_MAX value. * @param current_battery Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current * @param current_consumed Consumed charge, in milliampere hours (1 = 1 mAh), -1: autopilot does not provide mAh consumption estimate * @param energy_consumed Consumed energy, in 100*Joules (intergrated U*I*dt) (1 = 100 Joule), -1: autopilot does not provide energy consumption estimate @@ -322,7 +322,7 @@ static inline int16_t mavlink_msg_battery_status_get_temperature(const mavlink_m /** * @brief Get field voltages from battery_status message * - * @return Battery voltage of cells, in millivolts (1 = 1 millivolt) + * @return Battery voltage of cells, in millivolts (1 = 1 millivolt). Cells above the valid cell count for this battery should have the UINT16_MAX value. */ static inline uint16_t mavlink_msg_battery_status_get_voltages(const mavlink_message_t* msg, uint16_t *voltages) { diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_camera_trigger.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_camera_trigger.h new file mode 100644 index 0000000..d724d9d --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_camera_trigger.h @@ -0,0 +1,233 @@ +// MESSAGE CAMERA_TRIGGER PACKING + +#define MAVLINK_MSG_ID_CAMERA_TRIGGER 112 + +typedef struct __mavlink_camera_trigger_t +{ + uint64_t time_usec; /*< Timestamp for the image frame in microseconds*/ + uint32_t seq; /*< Image frame sequence*/ +} mavlink_camera_trigger_t; + +#define MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN 12 +#define MAVLINK_MSG_ID_112_LEN 12 + +#define MAVLINK_MSG_ID_CAMERA_TRIGGER_CRC 174 +#define MAVLINK_MSG_ID_112_CRC 174 + + + +#define MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER { \ + "CAMERA_TRIGGER", \ + 2, \ + { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_camera_trigger_t, time_usec) }, \ + { "seq", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_camera_trigger_t, seq) }, \ + } \ +} + + +/** + * @brief Pack a camera_trigger 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 time_usec Timestamp for the image frame in microseconds + * @param seq Image frame sequence + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_camera_trigger_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint64_t time_usec, uint32_t seq) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_uint32_t(buf, 8, seq); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#else + mavlink_camera_trigger_t packet; + packet.time_usec = time_usec; + packet.seq = seq; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_CAMERA_TRIGGER; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN, MAVLINK_MSG_ID_CAMERA_TRIGGER_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#endif +} + +/** + * @brief Pack a camera_trigger 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 time_usec Timestamp for the image frame in microseconds + * @param seq Image frame sequence + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_camera_trigger_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint64_t time_usec,uint32_t seq) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_uint32_t(buf, 8, seq); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#else + mavlink_camera_trigger_t packet; + packet.time_usec = time_usec; + packet.seq = seq; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_CAMERA_TRIGGER; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN, MAVLINK_MSG_ID_CAMERA_TRIGGER_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#endif +} + +/** + * @brief Encode a camera_trigger 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 camera_trigger C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_camera_trigger_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_camera_trigger_t* camera_trigger) +{ + return mavlink_msg_camera_trigger_pack(system_id, component_id, msg, camera_trigger->time_usec, camera_trigger->seq); +} + +/** + * @brief Encode a camera_trigger 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 camera_trigger C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_camera_trigger_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_camera_trigger_t* camera_trigger) +{ + return mavlink_msg_camera_trigger_pack_chan(system_id, component_id, chan, msg, camera_trigger->time_usec, camera_trigger->seq); +} + +/** + * @brief Send a camera_trigger message + * @param chan MAVLink channel to send the message + * + * @param time_usec Timestamp for the image frame in microseconds + * @param seq Image frame sequence + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_camera_trigger_send(mavlink_channel_t chan, uint64_t time_usec, uint32_t seq) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_uint32_t(buf, 8, seq); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRIGGER, buf, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN, MAVLINK_MSG_ID_CAMERA_TRIGGER_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRIGGER, buf, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#endif +#else + mavlink_camera_trigger_t packet; + packet.time_usec = time_usec; + packet.seq = seq; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRIGGER, (const char *)&packet, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN, MAVLINK_MSG_ID_CAMERA_TRIGGER_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRIGGER, (const char *)&packet, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_CAMERA_TRIGGER_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_camera_trigger_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint32_t seq) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_uint32_t(buf, 8, seq); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRIGGER, buf, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN, MAVLINK_MSG_ID_CAMERA_TRIGGER_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRIGGER, buf, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#endif +#else + mavlink_camera_trigger_t *packet = (mavlink_camera_trigger_t *)msgbuf; + packet->time_usec = time_usec; + packet->seq = seq; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRIGGER, (const char *)packet, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN, MAVLINK_MSG_ID_CAMERA_TRIGGER_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_TRIGGER, (const char *)packet, MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE CAMERA_TRIGGER UNPACKING + + +/** + * @brief Get field time_usec from camera_trigger message + * + * @return Timestamp for the image frame in microseconds + */ +static inline uint64_t mavlink_msg_camera_trigger_get_time_usec(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint64_t(msg, 0); +} + +/** + * @brief Get field seq from camera_trigger message + * + * @return Image frame sequence + */ +static inline uint32_t mavlink_msg_camera_trigger_get_seq(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 8); +} + +/** + * @brief Decode a camera_trigger message into a struct + * + * @param msg The message to decode + * @param camera_trigger C-struct to decode the message contents into + */ +static inline void mavlink_msg_camera_trigger_decode(const mavlink_message_t* msg, mavlink_camera_trigger_t* camera_trigger) +{ +#if MAVLINK_NEED_BYTE_SWAP + camera_trigger->time_usec = mavlink_msg_camera_trigger_get_time_usec(msg); + camera_trigger->seq = mavlink_msg_camera_trigger_get_seq(msg); +#else + memcpy(camera_trigger, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_CAMERA_TRIGGER_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_change_operator_control.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_change_operator_control.h index 3f0987f..7a86a91 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_change_operator_control.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_change_operator_control.h @@ -4,10 +4,10 @@ typedef struct __mavlink_change_operator_control_t { - uint8_t target_system; ///< System the GCS requests control for - uint8_t control_request; ///< 0: request control of this MAV, 1: Release control of this MAV - uint8_t version; ///< 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch. - char passkey[25]; ///< Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-" + uint8_t target_system; /*< System the GCS requests control for*/ + uint8_t control_request; /*< 0: request control of this MAV, 1: Release control of this MAV*/ + uint8_t version; /*< 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.*/ + char passkey[25]; /*< Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"*/ } mavlink_change_operator_control_t; #define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN 28 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_change_operator_control_ack.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_change_operator_control_ack.h index 768e7ed..309fa04 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_change_operator_control_ack.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_change_operator_control_ack.h @@ -4,9 +4,9 @@ typedef struct __mavlink_change_operator_control_ack_t { - uint8_t gcs_system_id; ///< ID of the GCS this message - uint8_t control_request; ///< 0: request control of this MAV, 1: Release control of this MAV - uint8_t ack; ///< 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control + uint8_t gcs_system_id; /*< ID of the GCS this message */ + uint8_t control_request; /*< 0: request control of this MAV, 1: Release control of this MAV*/ + uint8_t ack; /*< 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control*/ } mavlink_change_operator_control_ack_t; #define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN 3 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_ack.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_ack.h index d3d1630..2caebb0 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_ack.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_ack.h @@ -4,8 +4,8 @@ typedef struct __mavlink_command_ack_t { - uint16_t command; ///< Command ID, as defined by MAV_CMD enum. - uint8_t result; ///< See MAV_RESULT enum + uint16_t command; /*< Command ID, as defined by MAV_CMD enum.*/ + uint8_t result; /*< See MAV_RESULT enum*/ } mavlink_command_ack_t; #define MAVLINK_MSG_ID_COMMAND_ACK_LEN 3 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_int.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_int.h index 4713d01..9f4e6f9 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_int.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_int.h @@ -4,19 +4,19 @@ typedef struct __mavlink_command_int_t { - float param1; ///< PARAM1, see MAV_CMD enum - float param2; ///< PARAM2, see MAV_CMD enum - float param3; ///< PARAM3, see MAV_CMD enum - float param4; ///< PARAM4, see MAV_CMD enum - int32_t x; ///< PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 - int32_t y; ///< PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 - float z; ///< PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. - uint16_t command; ///< The scheduled action for the mission item. see MAV_CMD in common.xml MAVLink specs - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t frame; ///< The coordinate system of the COMMAND. see MAV_FRAME in mavlink_types.h - uint8_t current; ///< false:0, true:1 - uint8_t autocontinue; ///< autocontinue to next wp + float param1; /*< PARAM1, see MAV_CMD enum*/ + float param2; /*< PARAM2, see MAV_CMD enum*/ + float param3; /*< PARAM3, see MAV_CMD enum*/ + float param4; /*< PARAM4, see MAV_CMD enum*/ + int32_t x; /*< PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7*/ + int32_t y; /*< PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7*/ + float z; /*< PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.*/ + uint16_t command; /*< The scheduled action for the mission item. see MAV_CMD in common.xml MAVLink specs*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t frame; /*< The coordinate system of the COMMAND. see MAV_FRAME in mavlink_types.h*/ + uint8_t current; /*< false:0, true:1*/ + uint8_t autocontinue; /*< autocontinue to next wp*/ } mavlink_command_int_t; #define MAVLINK_MSG_ID_COMMAND_INT_LEN 35 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_long.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_long.h index 161896b..7c7f1c0 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_long.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_command_long.h @@ -4,17 +4,17 @@ typedef struct __mavlink_command_long_t { - float param1; ///< Parameter 1, as defined by MAV_CMD enum. - float param2; ///< Parameter 2, as defined by MAV_CMD enum. - float param3; ///< Parameter 3, as defined by MAV_CMD enum. - float param4; ///< Parameter 4, as defined by MAV_CMD enum. - float param5; ///< Parameter 5, as defined by MAV_CMD enum. - float param6; ///< Parameter 6, as defined by MAV_CMD enum. - float param7; ///< Parameter 7, as defined by MAV_CMD enum. - uint16_t command; ///< Command ID, as defined by MAV_CMD enum. - uint8_t target_system; ///< System which should execute the command - uint8_t target_component; ///< Component which should execute the command, 0 for all components - uint8_t confirmation; ///< 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) + float param1; /*< Parameter 1, as defined by MAV_CMD enum.*/ + float param2; /*< Parameter 2, as defined by MAV_CMD enum.*/ + float param3; /*< Parameter 3, as defined by MAV_CMD enum.*/ + float param4; /*< Parameter 4, as defined by MAV_CMD enum.*/ + float param5; /*< Parameter 5, as defined by MAV_CMD enum.*/ + float param6; /*< Parameter 6, as defined by MAV_CMD enum.*/ + float param7; /*< Parameter 7, as defined by MAV_CMD enum.*/ + uint16_t command; /*< Command ID, as defined by MAV_CMD enum.*/ + uint8_t target_system; /*< System which should execute the command*/ + uint8_t target_component; /*< Component which should execute the command, 0 for all components*/ + uint8_t confirmation; /*< 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)*/ } mavlink_command_long_t; #define MAVLINK_MSG_ID_COMMAND_LONG_LEN 33 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_control_system_state.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_control_system_state.h new file mode 100644 index 0000000..e06a68f --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_control_system_state.h @@ -0,0 +1,587 @@ +// MESSAGE CONTROL_SYSTEM_STATE PACKING + +#define MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE 146 + +typedef struct __mavlink_control_system_state_t +{ + uint64_t time_usec; /*< Timestamp (micros since boot or Unix epoch)*/ + float x_acc; /*< X acceleration in body frame*/ + float y_acc; /*< Y acceleration in body frame*/ + float z_acc; /*< Z acceleration in body frame*/ + float x_vel; /*< X velocity in body frame*/ + float y_vel; /*< Y velocity in body frame*/ + float z_vel; /*< Z velocity in body frame*/ + float x_pos; /*< X position in local frame*/ + float y_pos; /*< Y position in local frame*/ + float z_pos; /*< Z position in local frame*/ + float airspeed; /*< Airspeed, set to -1 if unknown*/ + float vel_variance[3]; /*< Variance of body velocity estimate*/ + float pos_variance[3]; /*< Variance in local position*/ + float q[4]; /*< The attitude, represented as Quaternion*/ + float roll_rate; /*< Angular rate in roll axis*/ + float pitch_rate; /*< Angular rate in pitch axis*/ + float yaw_rate; /*< Angular rate in yaw axis*/ +} mavlink_control_system_state_t; + +#define MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN 100 +#define MAVLINK_MSG_ID_146_LEN 100 + +#define MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_CRC 103 +#define MAVLINK_MSG_ID_146_CRC 103 + +#define MAVLINK_MSG_CONTROL_SYSTEM_STATE_FIELD_VEL_VARIANCE_LEN 3 +#define MAVLINK_MSG_CONTROL_SYSTEM_STATE_FIELD_POS_VARIANCE_LEN 3 +#define MAVLINK_MSG_CONTROL_SYSTEM_STATE_FIELD_Q_LEN 4 + +#define MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE { \ + "CONTROL_SYSTEM_STATE", \ + 17, \ + { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_control_system_state_t, time_usec) }, \ + { "x_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_control_system_state_t, x_acc) }, \ + { "y_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_control_system_state_t, y_acc) }, \ + { "z_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_control_system_state_t, z_acc) }, \ + { "x_vel", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_control_system_state_t, x_vel) }, \ + { "y_vel", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_control_system_state_t, y_vel) }, \ + { "z_vel", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_control_system_state_t, z_vel) }, \ + { "x_pos", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_control_system_state_t, x_pos) }, \ + { "y_pos", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_control_system_state_t, y_pos) }, \ + { "z_pos", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_control_system_state_t, z_pos) }, \ + { "airspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_control_system_state_t, airspeed) }, \ + { "vel_variance", NULL, MAVLINK_TYPE_FLOAT, 3, 48, offsetof(mavlink_control_system_state_t, vel_variance) }, \ + { "pos_variance", NULL, MAVLINK_TYPE_FLOAT, 3, 60, offsetof(mavlink_control_system_state_t, pos_variance) }, \ + { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 72, offsetof(mavlink_control_system_state_t, q) }, \ + { "roll_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 88, offsetof(mavlink_control_system_state_t, roll_rate) }, \ + { "pitch_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 92, offsetof(mavlink_control_system_state_t, pitch_rate) }, \ + { "yaw_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 96, offsetof(mavlink_control_system_state_t, yaw_rate) }, \ + } \ +} + + +/** + * @brief Pack a control_system_state 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 time_usec Timestamp (micros since boot or Unix epoch) + * @param x_acc X acceleration in body frame + * @param y_acc Y acceleration in body frame + * @param z_acc Z acceleration in body frame + * @param x_vel X velocity in body frame + * @param y_vel Y velocity in body frame + * @param z_vel Z velocity in body frame + * @param x_pos X position in local frame + * @param y_pos Y position in local frame + * @param z_pos Z position in local frame + * @param airspeed Airspeed, set to -1 if unknown + * @param vel_variance Variance of body velocity estimate + * @param pos_variance Variance in local position + * @param q The attitude, represented as Quaternion + * @param roll_rate Angular rate in roll axis + * @param pitch_rate Angular rate in pitch axis + * @param yaw_rate Angular rate in yaw axis + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_control_system_state_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint64_t time_usec, float x_acc, float y_acc, float z_acc, float x_vel, float y_vel, float z_vel, float x_pos, float y_pos, float z_pos, float airspeed, const float *vel_variance, const float *pos_variance, const float *q, float roll_rate, float pitch_rate, float yaw_rate) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, x_acc); + _mav_put_float(buf, 12, y_acc); + _mav_put_float(buf, 16, z_acc); + _mav_put_float(buf, 20, x_vel); + _mav_put_float(buf, 24, y_vel); + _mav_put_float(buf, 28, z_vel); + _mav_put_float(buf, 32, x_pos); + _mav_put_float(buf, 36, y_pos); + _mav_put_float(buf, 40, z_pos); + _mav_put_float(buf, 44, airspeed); + _mav_put_float(buf, 88, roll_rate); + _mav_put_float(buf, 92, pitch_rate); + _mav_put_float(buf, 96, yaw_rate); + _mav_put_float_array(buf, 48, vel_variance, 3); + _mav_put_float_array(buf, 60, pos_variance, 3); + _mav_put_float_array(buf, 72, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#else + mavlink_control_system_state_t packet; + packet.time_usec = time_usec; + packet.x_acc = x_acc; + packet.y_acc = y_acc; + packet.z_acc = z_acc; + packet.x_vel = x_vel; + packet.y_vel = y_vel; + packet.z_vel = z_vel; + packet.x_pos = x_pos; + packet.y_pos = y_pos; + packet.z_pos = z_pos; + packet.airspeed = airspeed; + packet.roll_rate = roll_rate; + packet.pitch_rate = pitch_rate; + packet.yaw_rate = yaw_rate; + mav_array_memcpy(packet.vel_variance, vel_variance, sizeof(float)*3); + mav_array_memcpy(packet.pos_variance, pos_variance, sizeof(float)*3); + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#endif +} + +/** + * @brief Pack a control_system_state 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 time_usec Timestamp (micros since boot or Unix epoch) + * @param x_acc X acceleration in body frame + * @param y_acc Y acceleration in body frame + * @param z_acc Z acceleration in body frame + * @param x_vel X velocity in body frame + * @param y_vel Y velocity in body frame + * @param z_vel Z velocity in body frame + * @param x_pos X position in local frame + * @param y_pos Y position in local frame + * @param z_pos Z position in local frame + * @param airspeed Airspeed, set to -1 if unknown + * @param vel_variance Variance of body velocity estimate + * @param pos_variance Variance in local position + * @param q The attitude, represented as Quaternion + * @param roll_rate Angular rate in roll axis + * @param pitch_rate Angular rate in pitch axis + * @param yaw_rate Angular rate in yaw axis + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_control_system_state_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint64_t time_usec,float x_acc,float y_acc,float z_acc,float x_vel,float y_vel,float z_vel,float x_pos,float y_pos,float z_pos,float airspeed,const float *vel_variance,const float *pos_variance,const float *q,float roll_rate,float pitch_rate,float yaw_rate) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, x_acc); + _mav_put_float(buf, 12, y_acc); + _mav_put_float(buf, 16, z_acc); + _mav_put_float(buf, 20, x_vel); + _mav_put_float(buf, 24, y_vel); + _mav_put_float(buf, 28, z_vel); + _mav_put_float(buf, 32, x_pos); + _mav_put_float(buf, 36, y_pos); + _mav_put_float(buf, 40, z_pos); + _mav_put_float(buf, 44, airspeed); + _mav_put_float(buf, 88, roll_rate); + _mav_put_float(buf, 92, pitch_rate); + _mav_put_float(buf, 96, yaw_rate); + _mav_put_float_array(buf, 48, vel_variance, 3); + _mav_put_float_array(buf, 60, pos_variance, 3); + _mav_put_float_array(buf, 72, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#else + mavlink_control_system_state_t packet; + packet.time_usec = time_usec; + packet.x_acc = x_acc; + packet.y_acc = y_acc; + packet.z_acc = z_acc; + packet.x_vel = x_vel; + packet.y_vel = y_vel; + packet.z_vel = z_vel; + packet.x_pos = x_pos; + packet.y_pos = y_pos; + packet.z_pos = z_pos; + packet.airspeed = airspeed; + packet.roll_rate = roll_rate; + packet.pitch_rate = pitch_rate; + packet.yaw_rate = yaw_rate; + mav_array_memcpy(packet.vel_variance, vel_variance, sizeof(float)*3); + mav_array_memcpy(packet.pos_variance, pos_variance, sizeof(float)*3); + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#endif +} + +/** + * @brief Encode a control_system_state 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 control_system_state C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_control_system_state_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_control_system_state_t* control_system_state) +{ + return mavlink_msg_control_system_state_pack(system_id, component_id, msg, control_system_state->time_usec, control_system_state->x_acc, control_system_state->y_acc, control_system_state->z_acc, control_system_state->x_vel, control_system_state->y_vel, control_system_state->z_vel, control_system_state->x_pos, control_system_state->y_pos, control_system_state->z_pos, control_system_state->airspeed, control_system_state->vel_variance, control_system_state->pos_variance, control_system_state->q, control_system_state->roll_rate, control_system_state->pitch_rate, control_system_state->yaw_rate); +} + +/** + * @brief Encode a control_system_state 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 control_system_state C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_control_system_state_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_control_system_state_t* control_system_state) +{ + return mavlink_msg_control_system_state_pack_chan(system_id, component_id, chan, msg, control_system_state->time_usec, control_system_state->x_acc, control_system_state->y_acc, control_system_state->z_acc, control_system_state->x_vel, control_system_state->y_vel, control_system_state->z_vel, control_system_state->x_pos, control_system_state->y_pos, control_system_state->z_pos, control_system_state->airspeed, control_system_state->vel_variance, control_system_state->pos_variance, control_system_state->q, control_system_state->roll_rate, control_system_state->pitch_rate, control_system_state->yaw_rate); +} + +/** + * @brief Send a control_system_state message + * @param chan MAVLink channel to send the message + * + * @param time_usec Timestamp (micros since boot or Unix epoch) + * @param x_acc X acceleration in body frame + * @param y_acc Y acceleration in body frame + * @param z_acc Z acceleration in body frame + * @param x_vel X velocity in body frame + * @param y_vel Y velocity in body frame + * @param z_vel Z velocity in body frame + * @param x_pos X position in local frame + * @param y_pos Y position in local frame + * @param z_pos Z position in local frame + * @param airspeed Airspeed, set to -1 if unknown + * @param vel_variance Variance of body velocity estimate + * @param pos_variance Variance in local position + * @param q The attitude, represented as Quaternion + * @param roll_rate Angular rate in roll axis + * @param pitch_rate Angular rate in pitch axis + * @param yaw_rate Angular rate in yaw axis + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_control_system_state_send(mavlink_channel_t chan, uint64_t time_usec, float x_acc, float y_acc, float z_acc, float x_vel, float y_vel, float z_vel, float x_pos, float y_pos, float z_pos, float airspeed, const float *vel_variance, const float *pos_variance, const float *q, float roll_rate, float pitch_rate, float yaw_rate) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, x_acc); + _mav_put_float(buf, 12, y_acc); + _mav_put_float(buf, 16, z_acc); + _mav_put_float(buf, 20, x_vel); + _mav_put_float(buf, 24, y_vel); + _mav_put_float(buf, 28, z_vel); + _mav_put_float(buf, 32, x_pos); + _mav_put_float(buf, 36, y_pos); + _mav_put_float(buf, 40, z_pos); + _mav_put_float(buf, 44, airspeed); + _mav_put_float(buf, 88, roll_rate); + _mav_put_float(buf, 92, pitch_rate); + _mav_put_float(buf, 96, yaw_rate); + _mav_put_float_array(buf, 48, vel_variance, 3); + _mav_put_float_array(buf, 60, pos_variance, 3); + _mav_put_float_array(buf, 72, q, 4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE, buf, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE, buf, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#endif +#else + mavlink_control_system_state_t packet; + packet.time_usec = time_usec; + packet.x_acc = x_acc; + packet.y_acc = y_acc; + packet.z_acc = z_acc; + packet.x_vel = x_vel; + packet.y_vel = y_vel; + packet.z_vel = z_vel; + packet.x_pos = x_pos; + packet.y_pos = y_pos; + packet.z_pos = z_pos; + packet.airspeed = airspeed; + packet.roll_rate = roll_rate; + packet.pitch_rate = pitch_rate; + packet.yaw_rate = yaw_rate; + mav_array_memcpy(packet.vel_variance, vel_variance, sizeof(float)*3); + mav_array_memcpy(packet.pos_variance, pos_variance, sizeof(float)*3); + mav_array_memcpy(packet.q, q, sizeof(float)*4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE, (const char *)&packet, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE, (const char *)&packet, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_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_control_system_state_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, float x_acc, float y_acc, float z_acc, float x_vel, float y_vel, float z_vel, float x_pos, float y_pos, float z_pos, float airspeed, const float *vel_variance, const float *pos_variance, const float *q, float roll_rate, float pitch_rate, float yaw_rate) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, x_acc); + _mav_put_float(buf, 12, y_acc); + _mav_put_float(buf, 16, z_acc); + _mav_put_float(buf, 20, x_vel); + _mav_put_float(buf, 24, y_vel); + _mav_put_float(buf, 28, z_vel); + _mav_put_float(buf, 32, x_pos); + _mav_put_float(buf, 36, y_pos); + _mav_put_float(buf, 40, z_pos); + _mav_put_float(buf, 44, airspeed); + _mav_put_float(buf, 88, roll_rate); + _mav_put_float(buf, 92, pitch_rate); + _mav_put_float(buf, 96, yaw_rate); + _mav_put_float_array(buf, 48, vel_variance, 3); + _mav_put_float_array(buf, 60, pos_variance, 3); + _mav_put_float_array(buf, 72, q, 4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE, buf, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE, buf, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#endif +#else + mavlink_control_system_state_t *packet = (mavlink_control_system_state_t *)msgbuf; + packet->time_usec = time_usec; + packet->x_acc = x_acc; + packet->y_acc = y_acc; + packet->z_acc = z_acc; + packet->x_vel = x_vel; + packet->y_vel = y_vel; + packet->z_vel = z_vel; + packet->x_pos = x_pos; + packet->y_pos = y_pos; + packet->z_pos = z_pos; + packet->airspeed = airspeed; + packet->roll_rate = roll_rate; + packet->pitch_rate = pitch_rate; + packet->yaw_rate = yaw_rate; + mav_array_memcpy(packet->vel_variance, vel_variance, sizeof(float)*3); + mav_array_memcpy(packet->pos_variance, pos_variance, sizeof(float)*3); + mav_array_memcpy(packet->q, q, sizeof(float)*4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE, (const char *)packet, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE, (const char *)packet, MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE CONTROL_SYSTEM_STATE UNPACKING + + +/** + * @brief Get field time_usec from control_system_state message + * + * @return Timestamp (micros since boot or Unix epoch) + */ +static inline uint64_t mavlink_msg_control_system_state_get_time_usec(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint64_t(msg, 0); +} + +/** + * @brief Get field x_acc from control_system_state message + * + * @return X acceleration in body frame + */ +static inline float mavlink_msg_control_system_state_get_x_acc(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 8); +} + +/** + * @brief Get field y_acc from control_system_state message + * + * @return Y acceleration in body frame + */ +static inline float mavlink_msg_control_system_state_get_y_acc(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 12); +} + +/** + * @brief Get field z_acc from control_system_state message + * + * @return Z acceleration in body frame + */ +static inline float mavlink_msg_control_system_state_get_z_acc(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 16); +} + +/** + * @brief Get field x_vel from control_system_state message + * + * @return X velocity in body frame + */ +static inline float mavlink_msg_control_system_state_get_x_vel(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 20); +} + +/** + * @brief Get field y_vel from control_system_state message + * + * @return Y velocity in body frame + */ +static inline float mavlink_msg_control_system_state_get_y_vel(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 24); +} + +/** + * @brief Get field z_vel from control_system_state message + * + * @return Z velocity in body frame + */ +static inline float mavlink_msg_control_system_state_get_z_vel(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 28); +} + +/** + * @brief Get field x_pos from control_system_state message + * + * @return X position in local frame + */ +static inline float mavlink_msg_control_system_state_get_x_pos(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 32); +} + +/** + * @brief Get field y_pos from control_system_state message + * + * @return Y position in local frame + */ +static inline float mavlink_msg_control_system_state_get_y_pos(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 36); +} + +/** + * @brief Get field z_pos from control_system_state message + * + * @return Z position in local frame + */ +static inline float mavlink_msg_control_system_state_get_z_pos(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 40); +} + +/** + * @brief Get field airspeed from control_system_state message + * + * @return Airspeed, set to -1 if unknown + */ +static inline float mavlink_msg_control_system_state_get_airspeed(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 44); +} + +/** + * @brief Get field vel_variance from control_system_state message + * + * @return Variance of body velocity estimate + */ +static inline uint16_t mavlink_msg_control_system_state_get_vel_variance(const mavlink_message_t* msg, float *vel_variance) +{ + return _MAV_RETURN_float_array(msg, vel_variance, 3, 48); +} + +/** + * @brief Get field pos_variance from control_system_state message + * + * @return Variance in local position + */ +static inline uint16_t mavlink_msg_control_system_state_get_pos_variance(const mavlink_message_t* msg, float *pos_variance) +{ + return _MAV_RETURN_float_array(msg, pos_variance, 3, 60); +} + +/** + * @brief Get field q from control_system_state message + * + * @return The attitude, represented as Quaternion + */ +static inline uint16_t mavlink_msg_control_system_state_get_q(const mavlink_message_t* msg, float *q) +{ + return _MAV_RETURN_float_array(msg, q, 4, 72); +} + +/** + * @brief Get field roll_rate from control_system_state message + * + * @return Angular rate in roll axis + */ +static inline float mavlink_msg_control_system_state_get_roll_rate(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 88); +} + +/** + * @brief Get field pitch_rate from control_system_state message + * + * @return Angular rate in pitch axis + */ +static inline float mavlink_msg_control_system_state_get_pitch_rate(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 92); +} + +/** + * @brief Get field yaw_rate from control_system_state message + * + * @return Angular rate in yaw axis + */ +static inline float mavlink_msg_control_system_state_get_yaw_rate(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 96); +} + +/** + * @brief Decode a control_system_state message into a struct + * + * @param msg The message to decode + * @param control_system_state C-struct to decode the message contents into + */ +static inline void mavlink_msg_control_system_state_decode(const mavlink_message_t* msg, mavlink_control_system_state_t* control_system_state) +{ +#if MAVLINK_NEED_BYTE_SWAP + control_system_state->time_usec = mavlink_msg_control_system_state_get_time_usec(msg); + control_system_state->x_acc = mavlink_msg_control_system_state_get_x_acc(msg); + control_system_state->y_acc = mavlink_msg_control_system_state_get_y_acc(msg); + control_system_state->z_acc = mavlink_msg_control_system_state_get_z_acc(msg); + control_system_state->x_vel = mavlink_msg_control_system_state_get_x_vel(msg); + control_system_state->y_vel = mavlink_msg_control_system_state_get_y_vel(msg); + control_system_state->z_vel = mavlink_msg_control_system_state_get_z_vel(msg); + control_system_state->x_pos = mavlink_msg_control_system_state_get_x_pos(msg); + control_system_state->y_pos = mavlink_msg_control_system_state_get_y_pos(msg); + control_system_state->z_pos = mavlink_msg_control_system_state_get_z_pos(msg); + control_system_state->airspeed = mavlink_msg_control_system_state_get_airspeed(msg); + mavlink_msg_control_system_state_get_vel_variance(msg, control_system_state->vel_variance); + mavlink_msg_control_system_state_get_pos_variance(msg, control_system_state->pos_variance); + mavlink_msg_control_system_state_get_q(msg, control_system_state->q); + control_system_state->roll_rate = mavlink_msg_control_system_state_get_roll_rate(msg); + control_system_state->pitch_rate = mavlink_msg_control_system_state_get_pitch_rate(msg); + control_system_state->yaw_rate = mavlink_msg_control_system_state_get_yaw_rate(msg); +#else + memcpy(control_system_state, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_data_stream.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_data_stream.h index 640ffeb..0e12a60 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_data_stream.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_data_stream.h @@ -4,9 +4,9 @@ typedef struct __mavlink_data_stream_t { - uint16_t message_rate; ///< The requested interval between two messages of this type - uint8_t stream_id; ///< The ID of the requested data stream - uint8_t on_off; ///< 1 stream is enabled, 0 stream is stopped. + uint16_t message_rate; /*< The message rate*/ + uint8_t stream_id; /*< The ID of the requested data stream*/ + uint8_t on_off; /*< 1 stream is enabled, 0 stream is stopped.*/ } mavlink_data_stream_t; #define MAVLINK_MSG_ID_DATA_STREAM_LEN 4 @@ -34,7 +34,7 @@ typedef struct __mavlink_data_stream_t * @param msg The MAVLink message to compress the data into * * @param stream_id The ID of the requested data stream - * @param message_rate The requested interval between two messages of this type + * @param message_rate The message rate * @param on_off 1 stream is enabled, 0 stream is stopped. * @return length of the message in bytes (excluding serial stream start sign) */ @@ -72,7 +72,7 @@ static inline uint16_t mavlink_msg_data_stream_pack(uint8_t system_id, uint8_t c * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param stream_id The ID of the requested data stream - * @param message_rate The requested interval between two messages of this type + * @param message_rate The message rate * @param on_off 1 stream is enabled, 0 stream is stopped. * @return length of the message in bytes (excluding serial stream start sign) */ @@ -136,7 +136,7 @@ static inline uint16_t mavlink_msg_data_stream_encode_chan(uint8_t system_id, ui * @param chan MAVLink channel to send the message * * @param stream_id The ID of the requested data stream - * @param message_rate The requested interval between two messages of this type + * @param message_rate The message rate * @param on_off 1 stream is enabled, 0 stream is stopped. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -222,7 +222,7 @@ static inline uint8_t mavlink_msg_data_stream_get_stream_id(const mavlink_messag /** * @brief Get field message_rate from data_stream message * - * @return The requested interval between two messages of this type + * @return The message rate */ static inline uint16_t mavlink_msg_data_stream_get_message_rate(const mavlink_message_t* msg) { diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_data_transmission_handshake.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_data_transmission_handshake.h index d84a737..c6b037a 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_data_transmission_handshake.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_data_transmission_handshake.h @@ -4,13 +4,13 @@ typedef struct __mavlink_data_transmission_handshake_t { - uint32_t size; ///< total data size in bytes (set on ACK only) - uint16_t width; ///< Width of a matrix or image - uint16_t height; ///< Height of a matrix or image - uint16_t packets; ///< number of packets beeing sent (set on ACK only) - uint8_t type; ///< type of requested/acknowledged data (as defined in ENUM DATA_TYPES in mavlink/include/mavlink_types.h) - uint8_t payload; ///< payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only) - uint8_t jpg_quality; ///< JPEG quality out of [1,100] + uint32_t size; /*< total data size in bytes (set on ACK only)*/ + uint16_t width; /*< Width of a matrix or image*/ + uint16_t height; /*< Height of a matrix or image*/ + uint16_t packets; /*< number of packets beeing sent (set on ACK only)*/ + uint8_t type; /*< type of requested/acknowledged data (as defined in ENUM DATA_TYPES in mavlink/include/mavlink_types.h)*/ + uint8_t payload; /*< payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)*/ + uint8_t jpg_quality; /*< JPEG quality out of [1,100]*/ } mavlink_data_transmission_handshake_t; #define MAVLINK_MSG_ID_DATA_TRANSMISSION_HANDSHAKE_LEN 13 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_debug.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_debug.h index 2102af8..56928ab 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_debug.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_debug.h @@ -4,9 +4,9 @@ typedef struct __mavlink_debug_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - float value; ///< DEBUG value - uint8_t ind; ///< index of debug variable + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + float value; /*< DEBUG value*/ + uint8_t ind; /*< index of debug variable*/ } mavlink_debug_t; #define MAVLINK_MSG_ID_DEBUG_LEN 9 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_debug_vect.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_debug_vect.h index 67c339e..96ac477 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_debug_vect.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_debug_vect.h @@ -4,11 +4,11 @@ typedef struct __mavlink_debug_vect_t { - uint64_t time_usec; ///< Timestamp - float x; ///< x - float y; ///< y - float z; ///< z - char name[10]; ///< Name + uint64_t time_usec; /*< Timestamp*/ + float x; /*< x*/ + float y; /*< y*/ + float z; /*< z*/ + char name[10]; /*< Name*/ } mavlink_debug_vect_t; #define MAVLINK_MSG_ID_DEBUG_VECT_LEN 30 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_distance_sensor.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_distance_sensor.h index 8743b64..dc91ce2 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_distance_sensor.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_distance_sensor.h @@ -4,14 +4,14 @@ typedef struct __mavlink_distance_sensor_t { - uint32_t time_boot_ms; ///< Time since system boot - uint16_t min_distance; ///< Minimum distance the sensor can measure in centimeters - uint16_t max_distance; ///< Maximum distance the sensor can measure in centimeters - uint16_t current_distance; ///< Current distance reading - uint8_t type; ///< Type from MAV_DISTANCE_SENSOR enum. - uint8_t id; ///< Onboard ID of the sensor - uint8_t orientation; ///< Direction the sensor faces from FIXME enum. - uint8_t covariance; ///< Measurement covariance in centimeters, 0 for unknown / invalid readings + uint32_t time_boot_ms; /*< Time since system boot*/ + uint16_t min_distance; /*< Minimum distance the sensor can measure in centimeters*/ + uint16_t max_distance; /*< Maximum distance the sensor can measure in centimeters*/ + uint16_t current_distance; /*< Current distance reading*/ + uint8_t type; /*< Type from MAV_DISTANCE_SENSOR enum.*/ + uint8_t id; /*< Onboard ID of the sensor*/ + uint8_t orientation; /*< Direction the sensor faces from MAV_SENSOR_ORIENTATION enum.*/ + uint8_t covariance; /*< Measurement covariance in centimeters, 0 for unknown / invalid readings*/ } mavlink_distance_sensor_t; #define MAVLINK_MSG_ID_DISTANCE_SENSOR_LEN 14 @@ -49,7 +49,7 @@ typedef struct __mavlink_distance_sensor_t * @param current_distance Current distance reading * @param type Type from MAV_DISTANCE_SENSOR enum. * @param id Onboard ID of the sensor - * @param orientation Direction the sensor faces from FIXME enum. + * @param orientation Direction the sensor faces from MAV_SENSOR_ORIENTATION enum. * @param covariance Measurement covariance in centimeters, 0 for unknown / invalid readings * @return length of the message in bytes (excluding serial stream start sign) */ @@ -102,7 +102,7 @@ static inline uint16_t mavlink_msg_distance_sensor_pack(uint8_t system_id, uint8 * @param current_distance Current distance reading * @param type Type from MAV_DISTANCE_SENSOR enum. * @param id Onboard ID of the sensor - * @param orientation Direction the sensor faces from FIXME enum. + * @param orientation Direction the sensor faces from MAV_SENSOR_ORIENTATION enum. * @param covariance Measurement covariance in centimeters, 0 for unknown / invalid readings * @return length of the message in bytes (excluding serial stream start sign) */ @@ -181,7 +181,7 @@ static inline uint16_t mavlink_msg_distance_sensor_encode_chan(uint8_t system_id * @param current_distance Current distance reading * @param type Type from MAV_DISTANCE_SENSOR enum. * @param id Onboard ID of the sensor - * @param orientation Direction the sensor faces from FIXME enum. + * @param orientation Direction the sensor faces from MAV_SENSOR_ORIENTATION enum. * @param covariance Measurement covariance in centimeters, 0 for unknown / invalid readings */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -337,7 +337,7 @@ static inline uint8_t mavlink_msg_distance_sensor_get_id(const mavlink_message_t /** * @brief Get field orientation from distance_sensor message * - * @return Direction the sensor faces from FIXME enum. + * @return Direction the sensor faces from MAV_SENSOR_ORIENTATION enum. */ static inline uint8_t mavlink_msg_distance_sensor_get_orientation(const mavlink_message_t* msg) { diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_encapsulated_data.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_encapsulated_data.h index dacd7c9..216738b 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_encapsulated_data.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_encapsulated_data.h @@ -4,8 +4,8 @@ typedef struct __mavlink_encapsulated_data_t { - uint16_t seqnr; ///< sequence number (starting with 0 on every transmission) - uint8_t data[253]; ///< image data bytes + uint16_t seqnr; /*< sequence number (starting with 0 on every transmission)*/ + uint8_t data[253]; /*< image data bytes*/ } mavlink_encapsulated_data_t; #define MAVLINK_MSG_ID_ENCAPSULATED_DATA_LEN 255 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_extended_sys_state.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_extended_sys_state.h new file mode 100644 index 0000000..b3c4886 --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_extended_sys_state.h @@ -0,0 +1,233 @@ +// MESSAGE EXTENDED_SYS_STATE PACKING + +#define MAVLINK_MSG_ID_EXTENDED_SYS_STATE 245 + +typedef struct __mavlink_extended_sys_state_t +{ + uint8_t vtol_state; /*< The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration.*/ + uint8_t landed_state; /*< The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown.*/ +} mavlink_extended_sys_state_t; + +#define MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN 2 +#define MAVLINK_MSG_ID_245_LEN 2 + +#define MAVLINK_MSG_ID_EXTENDED_SYS_STATE_CRC 130 +#define MAVLINK_MSG_ID_245_CRC 130 + + + +#define MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE { \ + "EXTENDED_SYS_STATE", \ + 2, \ + { { "vtol_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_extended_sys_state_t, vtol_state) }, \ + { "landed_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_extended_sys_state_t, landed_state) }, \ + } \ +} + + +/** + * @brief Pack a extended_sys_state 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 vtol_state The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration. + * @param landed_state The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_extended_sys_state_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t vtol_state, uint8_t landed_state) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN]; + _mav_put_uint8_t(buf, 0, vtol_state); + _mav_put_uint8_t(buf, 1, landed_state); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#else + mavlink_extended_sys_state_t packet; + packet.vtol_state = vtol_state; + packet.landed_state = landed_state; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_EXTENDED_SYS_STATE; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#endif +} + +/** + * @brief Pack a extended_sys_state 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 vtol_state The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration. + * @param landed_state The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_extended_sys_state_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t vtol_state,uint8_t landed_state) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN]; + _mav_put_uint8_t(buf, 0, vtol_state); + _mav_put_uint8_t(buf, 1, landed_state); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#else + mavlink_extended_sys_state_t packet; + packet.vtol_state = vtol_state; + packet.landed_state = landed_state; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_EXTENDED_SYS_STATE; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#endif +} + +/** + * @brief Encode a extended_sys_state 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 extended_sys_state C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_extended_sys_state_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_extended_sys_state_t* extended_sys_state) +{ + return mavlink_msg_extended_sys_state_pack(system_id, component_id, msg, extended_sys_state->vtol_state, extended_sys_state->landed_state); +} + +/** + * @brief Encode a extended_sys_state 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 extended_sys_state C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_extended_sys_state_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_extended_sys_state_t* extended_sys_state) +{ + return mavlink_msg_extended_sys_state_pack_chan(system_id, component_id, chan, msg, extended_sys_state->vtol_state, extended_sys_state->landed_state); +} + +/** + * @brief Send a extended_sys_state message + * @param chan MAVLink channel to send the message + * + * @param vtol_state The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration. + * @param landed_state The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_extended_sys_state_send(mavlink_channel_t chan, uint8_t vtol_state, uint8_t landed_state) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN]; + _mav_put_uint8_t(buf, 0, vtol_state); + _mav_put_uint8_t(buf, 1, landed_state); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EXTENDED_SYS_STATE, buf, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EXTENDED_SYS_STATE, buf, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#endif +#else + mavlink_extended_sys_state_t packet; + packet.vtol_state = vtol_state; + packet.landed_state = landed_state; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EXTENDED_SYS_STATE, (const char *)&packet, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EXTENDED_SYS_STATE, (const char *)&packet, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_EXTENDED_SYS_STATE_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_extended_sys_state_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t vtol_state, uint8_t landed_state) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint8_t(buf, 0, vtol_state); + _mav_put_uint8_t(buf, 1, landed_state); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EXTENDED_SYS_STATE, buf, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EXTENDED_SYS_STATE, buf, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#endif +#else + mavlink_extended_sys_state_t *packet = (mavlink_extended_sys_state_t *)msgbuf; + packet->vtol_state = vtol_state; + packet->landed_state = landed_state; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EXTENDED_SYS_STATE, (const char *)packet, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EXTENDED_SYS_STATE, (const char *)packet, MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE EXTENDED_SYS_STATE UNPACKING + + +/** + * @brief Get field vtol_state from extended_sys_state message + * + * @return The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration. + */ +static inline uint8_t mavlink_msg_extended_sys_state_get_vtol_state(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 0); +} + +/** + * @brief Get field landed_state from extended_sys_state message + * + * @return The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown. + */ +static inline uint8_t mavlink_msg_extended_sys_state_get_landed_state(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + +/** + * @brief Decode a extended_sys_state message into a struct + * + * @param msg The message to decode + * @param extended_sys_state C-struct to decode the message contents into + */ +static inline void mavlink_msg_extended_sys_state_decode(const mavlink_message_t* msg, mavlink_extended_sys_state_t* extended_sys_state) +{ +#if MAVLINK_NEED_BYTE_SWAP + extended_sys_state->vtol_state = mavlink_msg_extended_sys_state_get_vtol_state(msg); + extended_sys_state->landed_state = mavlink_msg_extended_sys_state_get_landed_state(msg); +#else + memcpy(extended_sys_state, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_EXTENDED_SYS_STATE_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_file_transfer_protocol.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_file_transfer_protocol.h index f77cd94..72865a9 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_file_transfer_protocol.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_file_transfer_protocol.h @@ -4,10 +4,10 @@ typedef struct __mavlink_file_transfer_protocol_t { - uint8_t target_network; ///< Network ID (0 for broadcast) - uint8_t target_system; ///< System ID (0 for broadcast) - uint8_t target_component; ///< Component ID (0 for broadcast) - uint8_t payload[251]; ///< Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. + uint8_t target_network; /*< Network ID (0 for broadcast)*/ + uint8_t target_system; /*< System ID (0 for broadcast)*/ + uint8_t target_component; /*< Component ID (0 for broadcast)*/ + uint8_t payload[251]; /*< Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification.*/ } mavlink_file_transfer_protocol_t; #define MAVLINK_MSG_ID_FILE_TRANSFER_PROTOCOL_LEN 254 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_position_int.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_position_int.h index f51b782..35255a2 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_position_int.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_position_int.h @@ -4,15 +4,15 @@ typedef struct __mavlink_global_position_int_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - int32_t lat; ///< Latitude, expressed as * 1E7 - int32_t lon; ///< Longitude, expressed as * 1E7 - int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well) - int32_t relative_alt; ///< Altitude above ground in meters, expressed as * 1000 (millimeters) - int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100 - int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100 - int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100 - uint16_t hdg; ///< Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + int32_t lat; /*< Latitude, expressed as degrees * 1E7*/ + int32_t lon; /*< Longitude, expressed as degrees * 1E7*/ + int32_t alt; /*< Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well)*/ + int32_t relative_alt; /*< Altitude above ground in meters, expressed as * 1000 (millimeters)*/ + int16_t vx; /*< Ground X Speed (Latitude, positive north), expressed as m/s * 100*/ + int16_t vy; /*< Ground Y Speed (Longitude, positive east), expressed as m/s * 100*/ + int16_t vz; /*< Ground Z Speed (Altitude, positive down), expressed as m/s * 100*/ + uint16_t hdg; /*< Vehicle heading (yaw angle) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX*/ } mavlink_global_position_int_t; #define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN 28 @@ -46,14 +46,14 @@ typedef struct __mavlink_global_position_int_t * @param msg The MAVLink message to compress the data into * * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param lat Latitude, expressed as * 1E7 - * @param lon Longitude, expressed as * 1E7 + * @param lat Latitude, expressed as degrees * 1E7 + * @param lon Longitude, expressed as degrees * 1E7 * @param alt Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well) * @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters) - * @param vx Ground X Speed (Latitude), expressed as m/s * 100 - * @param vy Ground Y Speed (Longitude), expressed as m/s * 100 - * @param vz Ground Z Speed (Altitude), expressed as m/s * 100 - * @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX + * @param vx Ground X Speed (Latitude, positive north), expressed as m/s * 100 + * @param vy Ground Y Speed (Longitude, positive east), expressed as m/s * 100 + * @param vz Ground Z Speed (Altitude, positive down), expressed as m/s * 100 + * @param hdg Vehicle heading (yaw angle) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -102,14 +102,14 @@ static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, u * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param lat Latitude, expressed as * 1E7 - * @param lon Longitude, expressed as * 1E7 + * @param lat Latitude, expressed as degrees * 1E7 + * @param lon Longitude, expressed as degrees * 1E7 * @param alt Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well) * @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters) - * @param vx Ground X Speed (Latitude), expressed as m/s * 100 - * @param vy Ground Y Speed (Longitude), expressed as m/s * 100 - * @param vz Ground Z Speed (Altitude), expressed as m/s * 100 - * @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX + * @param vx Ground X Speed (Latitude, positive north), expressed as m/s * 100 + * @param vy Ground Y Speed (Longitude, positive east), expressed as m/s * 100 + * @param vz Ground Z Speed (Altitude, positive down), expressed as m/s * 100 + * @param hdg Vehicle heading (yaw angle) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_global_position_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -184,14 +184,14 @@ static inline uint16_t mavlink_msg_global_position_int_encode_chan(uint8_t syste * @param chan MAVLink channel to send the message * * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param lat Latitude, expressed as * 1E7 - * @param lon Longitude, expressed as * 1E7 + * @param lat Latitude, expressed as degrees * 1E7 + * @param lon Longitude, expressed as degrees * 1E7 * @param alt Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well) * @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters) - * @param vx Ground X Speed (Latitude), expressed as m/s * 100 - * @param vy Ground Y Speed (Longitude), expressed as m/s * 100 - * @param vz Ground Z Speed (Altitude), expressed as m/s * 100 - * @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX + * @param vx Ground X Speed (Latitude, positive north), expressed as m/s * 100 + * @param vy Ground Y Speed (Longitude, positive east), expressed as m/s * 100 + * @param vz Ground Z Speed (Altitude, positive down), expressed as m/s * 100 + * @param hdg Vehicle heading (yaw angle) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -300,7 +300,7 @@ static inline uint32_t mavlink_msg_global_position_int_get_time_boot_ms(const ma /** * @brief Get field lat from global_position_int message * - * @return Latitude, expressed as * 1E7 + * @return Latitude, expressed as degrees * 1E7 */ static inline int32_t mavlink_msg_global_position_int_get_lat(const mavlink_message_t* msg) { @@ -310,7 +310,7 @@ static inline int32_t mavlink_msg_global_position_int_get_lat(const mavlink_mess /** * @brief Get field lon from global_position_int message * - * @return Longitude, expressed as * 1E7 + * @return Longitude, expressed as degrees * 1E7 */ static inline int32_t mavlink_msg_global_position_int_get_lon(const mavlink_message_t* msg) { @@ -340,7 +340,7 @@ static inline int32_t mavlink_msg_global_position_int_get_relative_alt(const mav /** * @brief Get field vx from global_position_int message * - * @return Ground X Speed (Latitude), expressed as m/s * 100 + * @return Ground X Speed (Latitude, positive north), expressed as m/s * 100 */ static inline int16_t mavlink_msg_global_position_int_get_vx(const mavlink_message_t* msg) { @@ -350,7 +350,7 @@ static inline int16_t mavlink_msg_global_position_int_get_vx(const mavlink_messa /** * @brief Get field vy from global_position_int message * - * @return Ground Y Speed (Longitude), expressed as m/s * 100 + * @return Ground Y Speed (Longitude, positive east), expressed as m/s * 100 */ static inline int16_t mavlink_msg_global_position_int_get_vy(const mavlink_message_t* msg) { @@ -360,7 +360,7 @@ static inline int16_t mavlink_msg_global_position_int_get_vy(const mavlink_messa /** * @brief Get field vz from global_position_int message * - * @return Ground Z Speed (Altitude), expressed as m/s * 100 + * @return Ground Z Speed (Altitude, positive down), expressed as m/s * 100 */ static inline int16_t mavlink_msg_global_position_int_get_vz(const mavlink_message_t* msg) { @@ -370,7 +370,7 @@ static inline int16_t mavlink_msg_global_position_int_get_vz(const mavlink_messa /** * @brief Get field hdg from global_position_int message * - * @return Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX + * @return Vehicle heading (yaw angle) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX */ static inline uint16_t mavlink_msg_global_position_int_get_hdg(const mavlink_message_t* msg) { diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_position_int_cov.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_position_int_cov.h index 4d053ba..49c43c9 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_position_int_cov.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_position_int_cov.h @@ -4,17 +4,17 @@ typedef struct __mavlink_global_position_int_cov_t { - uint64_t time_utc; ///< Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - int32_t lat; ///< Latitude, expressed as degrees * 1E7 - int32_t lon; ///< Longitude, expressed as degrees * 1E7 - int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters), above MSL - int32_t relative_alt; ///< Altitude above ground in meters, expressed as * 1000 (millimeters) - float vx; ///< Ground X Speed (Latitude), expressed as m/s - float vy; ///< Ground Y Speed (Longitude), expressed as m/s - float vz; ///< Ground Z Speed (Altitude), expressed as m/s - float covariance[36]; ///< Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.) - uint8_t estimator_type; ///< Class id of the estimator this estimate originated from. + uint64_t time_utc; /*< Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver.*/ + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + int32_t lat; /*< Latitude, expressed as degrees * 1E7*/ + int32_t lon; /*< Longitude, expressed as degrees * 1E7*/ + int32_t alt; /*< Altitude in meters, expressed as * 1000 (millimeters), above MSL*/ + int32_t relative_alt; /*< Altitude above ground in meters, expressed as * 1000 (millimeters)*/ + float vx; /*< Ground X Speed (Latitude), expressed as m/s*/ + float vy; /*< Ground Y Speed (Longitude), expressed as m/s*/ + float vz; /*< Ground Z Speed (Altitude), expressed as m/s*/ + float covariance[36]; /*< Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.)*/ + uint8_t estimator_type; /*< Class id of the estimator this estimate originated from.*/ } mavlink_global_position_int_cov_t; #define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN 185 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_vision_position_estimate.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_vision_position_estimate.h index b2b75d7..1a1e92c 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_vision_position_estimate.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_global_vision_position_estimate.h @@ -4,13 +4,13 @@ typedef struct __mavlink_global_vision_position_estimate_t { - uint64_t usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot) - float x; ///< Global X position - float y; ///< Global Y position - float z; ///< Global Z position - float roll; ///< Roll angle in rad - float pitch; ///< Pitch angle in rad - float yaw; ///< Yaw angle in rad + uint64_t usec; /*< Timestamp (microseconds, synced to UNIX time or since system boot)*/ + float x; /*< Global X position*/ + float y; /*< Global Y position*/ + float z; /*< Global Z position*/ + float roll; /*< Roll angle in rad*/ + float pitch; /*< Pitch angle in rad*/ + float yaw; /*< Yaw angle in rad*/ } mavlink_global_vision_position_estimate_t; #define MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN 32 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps2_raw.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps2_raw.h index 9101b24..f068d49 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps2_raw.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps2_raw.h @@ -4,18 +4,18 @@ typedef struct __mavlink_gps2_raw_t { - uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot) - int32_t lat; ///< Latitude (WGS84), in degrees * 1E7 - int32_t lon; ///< Longitude (WGS84), in degrees * 1E7 - int32_t alt; ///< Altitude (AMSL, not WGS84), in meters * 1000 (positive for up) - uint32_t dgps_age; ///< Age of DGPS info - uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX - uint16_t epv; ///< GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX - uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX - uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS fix, 5: RTK Fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. - uint8_t satellites_visible; ///< Number of satellites visible. If unknown, set to 255 - uint8_t dgps_numch; ///< Number of DGPS satellites + uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/ + int32_t lat; /*< Latitude (WGS84), in degrees * 1E7*/ + int32_t lon; /*< Longitude (WGS84), in degrees * 1E7*/ + int32_t alt; /*< Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)*/ + uint32_t dgps_age; /*< Age of DGPS info*/ + uint16_t eph; /*< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX*/ + uint16_t epv; /*< GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX*/ + uint16_t vel; /*< GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX*/ + uint16_t cog; /*< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX*/ + uint8_t fix_type; /*< 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS fix, 5: RTK Fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.*/ + uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to 255*/ + uint8_t dgps_numch; /*< Number of DGPS satellites*/ } mavlink_gps2_raw_t; #define MAVLINK_MSG_ID_GPS2_RAW_LEN 35 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps2_rtk.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps2_rtk.h index 4c2d93c..66ce52f 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps2_rtk.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps2_rtk.h @@ -4,19 +4,19 @@ typedef struct __mavlink_gps2_rtk_t { - uint32_t time_last_baseline_ms; ///< Time since boot of last baseline message received in ms. - uint32_t tow; ///< GPS Time of Week of last baseline - int32_t baseline_a_mm; ///< Current baseline in ECEF x or NED north component in mm. - int32_t baseline_b_mm; ///< Current baseline in ECEF y or NED east component in mm. - int32_t baseline_c_mm; ///< Current baseline in ECEF z or NED down component in mm. - uint32_t accuracy; ///< Current estimate of baseline accuracy. - int32_t iar_num_hypotheses; ///< Current number of integer ambiguity hypotheses. - uint16_t wn; ///< GPS Week Number of last baseline - uint8_t rtk_receiver_id; ///< Identification of connected RTK receiver. - uint8_t rtk_health; ///< GPS-specific health report for RTK data. - uint8_t rtk_rate; ///< Rate of baseline messages being received by GPS, in HZ - uint8_t nsats; ///< Current number of sats used for RTK calculation. - uint8_t baseline_coords_type; ///< Coordinate system of baseline. 0 == ECEF, 1 == NED + uint32_t time_last_baseline_ms; /*< Time since boot of last baseline message received in ms.*/ + uint32_t tow; /*< GPS Time of Week of last baseline*/ + int32_t baseline_a_mm; /*< Current baseline in ECEF x or NED north component in mm.*/ + int32_t baseline_b_mm; /*< Current baseline in ECEF y or NED east component in mm.*/ + int32_t baseline_c_mm; /*< Current baseline in ECEF z or NED down component in mm.*/ + uint32_t accuracy; /*< Current estimate of baseline accuracy.*/ + int32_t iar_num_hypotheses; /*< Current number of integer ambiguity hypotheses.*/ + uint16_t wn; /*< GPS Week Number of last baseline*/ + uint8_t rtk_receiver_id; /*< Identification of connected RTK receiver.*/ + uint8_t rtk_health; /*< GPS-specific health report for RTK data.*/ + uint8_t rtk_rate; /*< Rate of baseline messages being received by GPS, in HZ*/ + uint8_t nsats; /*< Current number of sats used for RTK calculation.*/ + uint8_t baseline_coords_type; /*< Coordinate system of baseline. 0 == ECEF, 1 == NED*/ } mavlink_gps2_rtk_t; #define MAVLINK_MSG_ID_GPS2_RTK_LEN 35 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_global_origin.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_global_origin.h index 5ae4c9b..58048c1 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_global_origin.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_global_origin.h @@ -4,9 +4,9 @@ typedef struct __mavlink_gps_global_origin_t { - int32_t latitude; ///< Latitude (WGS84), in degrees * 1E7 - int32_t longitude; ///< Longitude (WGS84), in degrees * 1E7 - int32_t altitude; ///< Altitude (AMSL), in meters * 1000 (positive for up) + int32_t latitude; /*< Latitude (WGS84), in degrees * 1E7*/ + int32_t longitude; /*< Longitude (WGS84), in degrees * 1E7*/ + int32_t altitude; /*< Altitude (AMSL), in meters * 1000 (positive for up)*/ } mavlink_gps_global_origin_t; #define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN 12 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_inject_data.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_inject_data.h index 362e2d7..1eca5d8 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_inject_data.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_inject_data.h @@ -4,10 +4,10 @@ typedef struct __mavlink_gps_inject_data_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t len; ///< data length - uint8_t data[110]; ///< raw data (110 is enough for 12 satellites of RTCMv2) + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t len; /*< data length*/ + uint8_t data[110]; /*< raw data (110 is enough for 12 satellites of RTCMv2)*/ } mavlink_gps_inject_data_t; #define MAVLINK_MSG_ID_GPS_INJECT_DATA_LEN 113 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_raw_int.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_raw_int.h index b66171d..feb5d13 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_raw_int.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_raw_int.h @@ -4,16 +4,16 @@ typedef struct __mavlink_gps_raw_int_t { - uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot) - int32_t lat; ///< Latitude (WGS84), in degrees * 1E7 - int32_t lon; ///< Longitude (WGS84), in degrees * 1E7 - int32_t alt; ///< Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude. - uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX - uint16_t epv; ///< GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX - uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX - uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. - uint8_t satellites_visible; ///< Number of satellites visible. If unknown, set to 255 + uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/ + int32_t lat; /*< Latitude (WGS84), in degrees * 1E7*/ + int32_t lon; /*< Longitude (WGS84), in degrees * 1E7*/ + int32_t alt; /*< Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude.*/ + uint16_t eph; /*< GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX*/ + uint16_t epv; /*< GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX*/ + uint16_t vel; /*< GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX*/ + uint16_t cog; /*< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX*/ + uint8_t fix_type; /*< 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.*/ + uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to 255*/ } mavlink_gps_raw_int_t; #define MAVLINK_MSG_ID_GPS_RAW_INT_LEN 30 @@ -52,8 +52,8 @@ typedef struct __mavlink_gps_raw_int_t * @param lat Latitude (WGS84), in degrees * 1E7 * @param lon Longitude (WGS84), in degrees * 1E7 * @param alt Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude. - * @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX * @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX * @param satellites_visible Number of satellites visible. If unknown, set to 255 @@ -111,8 +111,8 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t c * @param lat Latitude (WGS84), in degrees * 1E7 * @param lon Longitude (WGS84), in degrees * 1E7 * @param alt Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude. - * @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX * @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX * @param satellites_visible Number of satellites visible. If unknown, set to 255 @@ -196,8 +196,8 @@ static inline uint16_t mavlink_msg_gps_raw_int_encode_chan(uint8_t system_id, ui * @param lat Latitude (WGS84), in degrees * 1E7 * @param lon Longitude (WGS84), in degrees * 1E7 * @param alt Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude. - * @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX * @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX * @param satellites_visible Number of satellites visible. If unknown, set to 255 @@ -353,7 +353,7 @@ static inline int32_t mavlink_msg_gps_raw_int_get_alt(const mavlink_message_t* m /** * @brief Get field eph from gps_raw_int message * - * @return GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX + * @return GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX */ static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t* msg) { @@ -363,7 +363,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t* /** * @brief Get field epv from gps_raw_int message * - * @return GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX + * @return GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX */ static inline uint16_t mavlink_msg_gps_raw_int_get_epv(const mavlink_message_t* msg) { diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_rtk.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_rtk.h index 31052ec..b627d89 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_rtk.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_rtk.h @@ -4,19 +4,19 @@ typedef struct __mavlink_gps_rtk_t { - uint32_t time_last_baseline_ms; ///< Time since boot of last baseline message received in ms. - uint32_t tow; ///< GPS Time of Week of last baseline - int32_t baseline_a_mm; ///< Current baseline in ECEF x or NED north component in mm. - int32_t baseline_b_mm; ///< Current baseline in ECEF y or NED east component in mm. - int32_t baseline_c_mm; ///< Current baseline in ECEF z or NED down component in mm. - uint32_t accuracy; ///< Current estimate of baseline accuracy. - int32_t iar_num_hypotheses; ///< Current number of integer ambiguity hypotheses. - uint16_t wn; ///< GPS Week Number of last baseline - uint8_t rtk_receiver_id; ///< Identification of connected RTK receiver. - uint8_t rtk_health; ///< GPS-specific health report for RTK data. - uint8_t rtk_rate; ///< Rate of baseline messages being received by GPS, in HZ - uint8_t nsats; ///< Current number of sats used for RTK calculation. - uint8_t baseline_coords_type; ///< Coordinate system of baseline. 0 == ECEF, 1 == NED + uint32_t time_last_baseline_ms; /*< Time since boot of last baseline message received in ms.*/ + uint32_t tow; /*< GPS Time of Week of last baseline*/ + int32_t baseline_a_mm; /*< Current baseline in ECEF x or NED north component in mm.*/ + int32_t baseline_b_mm; /*< Current baseline in ECEF y or NED east component in mm.*/ + int32_t baseline_c_mm; /*< Current baseline in ECEF z or NED down component in mm.*/ + uint32_t accuracy; /*< Current estimate of baseline accuracy.*/ + int32_t iar_num_hypotheses; /*< Current number of integer ambiguity hypotheses.*/ + uint16_t wn; /*< GPS Week Number of last baseline*/ + uint8_t rtk_receiver_id; /*< Identification of connected RTK receiver.*/ + uint8_t rtk_health; /*< GPS-specific health report for RTK data.*/ + uint8_t rtk_rate; /*< Rate of baseline messages being received by GPS, in HZ*/ + uint8_t nsats; /*< Current number of sats used for RTK calculation.*/ + uint8_t baseline_coords_type; /*< Coordinate system of baseline. 0 == ECEF, 1 == NED*/ } mavlink_gps_rtk_t; #define MAVLINK_MSG_ID_GPS_RTK_LEN 35 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_status.h index 10659d0..3e279b4 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_status.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_gps_status.h @@ -4,12 +4,12 @@ typedef struct __mavlink_gps_status_t { - uint8_t satellites_visible; ///< Number of satellites visible - uint8_t satellite_prn[20]; ///< Global satellite ID - uint8_t satellite_used[20]; ///< 0: Satellite not used, 1: used for localization - uint8_t satellite_elevation[20]; ///< Elevation (0: right on top of receiver, 90: on the horizon) of satellite - uint8_t satellite_azimuth[20]; ///< Direction of satellite, 0: 0 deg, 255: 360 deg. - uint8_t satellite_snr[20]; ///< Signal to noise ratio of satellite + uint8_t satellites_visible; /*< Number of satellites visible*/ + uint8_t satellite_prn[20]; /*< Global satellite ID*/ + uint8_t satellite_used[20]; /*< 0: Satellite not used, 1: used for localization*/ + uint8_t satellite_elevation[20]; /*< Elevation (0: right on top of receiver, 90: on the horizon) of satellite*/ + uint8_t satellite_azimuth[20]; /*< Direction of satellite, 0: 0 deg, 255: 360 deg.*/ + uint8_t satellite_snr[20]; /*< Signal to noise ratio of satellite*/ } mavlink_gps_status_t; #define MAVLINK_MSG_ID_GPS_STATUS_LEN 101 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_heartbeat.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_heartbeat.h index 733886b..682b4d8 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_heartbeat.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_heartbeat.h @@ -4,12 +4,12 @@ typedef struct __mavlink_heartbeat_t { - uint32_t custom_mode; ///< A bitfield for use for autopilot-specific flags. - uint8_t type; ///< Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM) - uint8_t autopilot; ///< Autopilot type / class. defined in MAV_AUTOPILOT ENUM - uint8_t base_mode; ///< System mode bitfield, see MAV_MODE_FLAG ENUM in mavlink/include/mavlink_types.h - uint8_t system_status; ///< System status flag, see MAV_STATE ENUM - uint8_t mavlink_version; ///< MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version + uint32_t custom_mode; /*< A bitfield for use for autopilot-specific flags.*/ + uint8_t type; /*< Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)*/ + uint8_t autopilot; /*< Autopilot type / class. defined in MAV_AUTOPILOT ENUM*/ + uint8_t base_mode; /*< System mode bitfield, see MAV_MODE_FLAG ENUM in mavlink/include/mavlink_types.h*/ + uint8_t system_status; /*< System status flag, see MAV_STATE ENUM*/ + uint8_t mavlink_version; /*< MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version*/ } mavlink_heartbeat_t; #define MAVLINK_MSG_ID_HEARTBEAT_LEN 9 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_highres_imu.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_highres_imu.h index 2749cb0..654953d 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_highres_imu.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_highres_imu.h @@ -4,21 +4,21 @@ typedef struct __mavlink_highres_imu_t { - uint64_t time_usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot) - float xacc; ///< X acceleration (m/s^2) - float yacc; ///< Y acceleration (m/s^2) - float zacc; ///< Z acceleration (m/s^2) - float xgyro; ///< Angular speed around X axis (rad / sec) - float ygyro; ///< Angular speed around Y axis (rad / sec) - float zgyro; ///< Angular speed around Z axis (rad / sec) - float xmag; ///< X Magnetic field (Gauss) - float ymag; ///< Y Magnetic field (Gauss) - float zmag; ///< Z Magnetic field (Gauss) - float abs_pressure; ///< Absolute pressure in millibar - float diff_pressure; ///< Differential pressure in millibar - float pressure_alt; ///< Altitude calculated from pressure - float temperature; ///< Temperature in degrees celsius - uint16_t fields_updated; ///< Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature + uint64_t time_usec; /*< Timestamp (microseconds, synced to UNIX time or since system boot)*/ + float xacc; /*< X acceleration (m/s^2)*/ + float yacc; /*< Y acceleration (m/s^2)*/ + float zacc; /*< Z acceleration (m/s^2)*/ + float xgyro; /*< Angular speed around X axis (rad / sec)*/ + float ygyro; /*< Angular speed around Y axis (rad / sec)*/ + float zgyro; /*< Angular speed around Z axis (rad / sec)*/ + float xmag; /*< X Magnetic field (Gauss)*/ + float ymag; /*< Y Magnetic field (Gauss)*/ + float zmag; /*< Z Magnetic field (Gauss)*/ + float abs_pressure; /*< Absolute pressure in millibar*/ + float diff_pressure; /*< Differential pressure in millibar*/ + float pressure_alt; /*< Altitude calculated from pressure*/ + float temperature; /*< Temperature in degrees celsius*/ + uint16_t fields_updated; /*< Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature*/ } mavlink_highres_imu_t; #define MAVLINK_MSG_ID_HIGHRES_IMU_LEN 62 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_controls.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_controls.h index f7507b1..4d586af 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_controls.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_controls.h @@ -4,17 +4,17 @@ typedef struct __mavlink_hil_controls_t { - uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot) - float roll_ailerons; ///< Control output -1 .. 1 - float pitch_elevator; ///< Control output -1 .. 1 - float yaw_rudder; ///< Control output -1 .. 1 - float throttle; ///< Throttle 0 .. 1 - float aux1; ///< Aux 1, -1 .. 1 - float aux2; ///< Aux 2, -1 .. 1 - float aux3; ///< Aux 3, -1 .. 1 - float aux4; ///< Aux 4, -1 .. 1 - uint8_t mode; ///< System mode (MAV_MODE) - uint8_t nav_mode; ///< Navigation mode (MAV_NAV_MODE) + uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/ + float roll_ailerons; /*< Control output -1 .. 1*/ + float pitch_elevator; /*< Control output -1 .. 1*/ + float yaw_rudder; /*< Control output -1 .. 1*/ + float throttle; /*< Throttle 0 .. 1*/ + float aux1; /*< Aux 1, -1 .. 1*/ + float aux2; /*< Aux 2, -1 .. 1*/ + float aux3; /*< Aux 3, -1 .. 1*/ + float aux4; /*< Aux 4, -1 .. 1*/ + uint8_t mode; /*< System mode (MAV_MODE)*/ + uint8_t nav_mode; /*< Navigation mode (MAV_NAV_MODE)*/ } mavlink_hil_controls_t; #define MAVLINK_MSG_ID_HIL_CONTROLS_LEN 42 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_gps.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_gps.h index c140a70..aef125c 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_gps.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_gps.h @@ -4,19 +4,19 @@ typedef struct __mavlink_hil_gps_t { - uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot) - int32_t lat; ///< Latitude (WGS84), in degrees * 1E7 - int32_t lon; ///< Longitude (WGS84), in degrees * 1E7 - int32_t alt; ///< Altitude (AMSL, not WGS84), in meters * 1000 (positive for up) - uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535 - uint16_t epv; ///< GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: 65535 - uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: 65535 - int16_t vn; ///< GPS velocity in cm/s in NORTH direction in earth-fixed NED frame - int16_t ve; ///< GPS velocity in cm/s in EAST direction in earth-fixed NED frame - int16_t vd; ///< GPS velocity in cm/s in DOWN direction in earth-fixed NED frame - uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535 - uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. - uint8_t satellites_visible; ///< Number of satellites visible. If unknown, set to 255 + uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/ + int32_t lat; /*< Latitude (WGS84), in degrees * 1E7*/ + int32_t lon; /*< Longitude (WGS84), in degrees * 1E7*/ + int32_t alt; /*< Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)*/ + uint16_t eph; /*< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535*/ + uint16_t epv; /*< GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: 65535*/ + uint16_t vel; /*< GPS ground speed (m/s * 100). If unknown, set to: 65535*/ + int16_t vn; /*< GPS velocity in cm/s in NORTH direction in earth-fixed NED frame*/ + int16_t ve; /*< GPS velocity in cm/s in EAST direction in earth-fixed NED frame*/ + int16_t vd; /*< GPS velocity in cm/s in DOWN direction in earth-fixed NED frame*/ + uint16_t cog; /*< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535*/ + uint8_t fix_type; /*< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.*/ + uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to 255*/ } mavlink_hil_gps_t; #define MAVLINK_MSG_ID_HIL_GPS_LEN 36 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_optical_flow.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_optical_flow.h index 7acb0b8..27abb05 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_optical_flow.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_optical_flow.h @@ -4,18 +4,18 @@ typedef struct __mavlink_hil_optical_flow_t { - uint64_t time_usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot) - uint32_t integration_time_us; ///< Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. - float integrated_x; ///< Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) - float integrated_y; ///< Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) - float integrated_xgyro; ///< RH rotation around X axis (rad) - float integrated_ygyro; ///< RH rotation around Y axis (rad) - float integrated_zgyro; ///< RH rotation around Z axis (rad) - uint32_t time_delta_distance_us; ///< Time in microseconds since the distance was sampled. - float distance; ///< Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance. - int16_t temperature; ///< Temperature * 100 in centi-degrees Celsius - uint8_t sensor_id; ///< Sensor ID - uint8_t quality; ///< Optical flow quality / confidence. 0: no valid flow, 255: maximum quality + uint64_t time_usec; /*< Timestamp (microseconds, synced to UNIX time or since system boot)*/ + uint32_t integration_time_us; /*< Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the.*/ + float integrated_x; /*< Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)*/ + float integrated_y; /*< Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)*/ + float integrated_xgyro; /*< RH rotation around X axis (rad)*/ + float integrated_ygyro; /*< RH rotation around Y axis (rad)*/ + float integrated_zgyro; /*< RH rotation around Z axis (rad)*/ + uint32_t time_delta_distance_us; /*< Time in microseconds since the distance was sampled.*/ + float distance; /*< Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance.*/ + int16_t temperature; /*< Temperature * 100 in centi-degrees Celsius*/ + uint8_t sensor_id; /*< Sensor ID*/ + uint8_t quality; /*< Optical flow quality / confidence. 0: no valid flow, 255: maximum quality*/ } mavlink_hil_optical_flow_t; #define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN 44 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_rc_inputs_raw.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_rc_inputs_raw.h index 227cd9d..be30cd4 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_rc_inputs_raw.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_rc_inputs_raw.h @@ -4,20 +4,20 @@ typedef struct __mavlink_hil_rc_inputs_raw_t { - uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot) - uint16_t chan1_raw; ///< RC channel 1 value, in microseconds - uint16_t chan2_raw; ///< RC channel 2 value, in microseconds - uint16_t chan3_raw; ///< RC channel 3 value, in microseconds - uint16_t chan4_raw; ///< RC channel 4 value, in microseconds - uint16_t chan5_raw; ///< RC channel 5 value, in microseconds - uint16_t chan6_raw; ///< RC channel 6 value, in microseconds - uint16_t chan7_raw; ///< RC channel 7 value, in microseconds - uint16_t chan8_raw; ///< RC channel 8 value, in microseconds - uint16_t chan9_raw; ///< RC channel 9 value, in microseconds - uint16_t chan10_raw; ///< RC channel 10 value, in microseconds - uint16_t chan11_raw; ///< RC channel 11 value, in microseconds - uint16_t chan12_raw; ///< RC channel 12 value, in microseconds - uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 255: 100% + uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/ + uint16_t chan1_raw; /*< RC channel 1 value, in microseconds*/ + uint16_t chan2_raw; /*< RC channel 2 value, in microseconds*/ + uint16_t chan3_raw; /*< RC channel 3 value, in microseconds*/ + uint16_t chan4_raw; /*< RC channel 4 value, in microseconds*/ + uint16_t chan5_raw; /*< RC channel 5 value, in microseconds*/ + uint16_t chan6_raw; /*< RC channel 6 value, in microseconds*/ + uint16_t chan7_raw; /*< RC channel 7 value, in microseconds*/ + uint16_t chan8_raw; /*< RC channel 8 value, in microseconds*/ + uint16_t chan9_raw; /*< RC channel 9 value, in microseconds*/ + uint16_t chan10_raw; /*< RC channel 10 value, in microseconds*/ + uint16_t chan11_raw; /*< RC channel 11 value, in microseconds*/ + uint16_t chan12_raw; /*< RC channel 12 value, in microseconds*/ + uint8_t rssi; /*< Receive signal strength indicator, 0: 0%, 255: 100%*/ } mavlink_hil_rc_inputs_raw_t; #define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN 33 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_sensor.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_sensor.h index 8672f8b..9b34849 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_sensor.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_sensor.h @@ -4,21 +4,21 @@ typedef struct __mavlink_hil_sensor_t { - uint64_t time_usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot) - float xacc; ///< X acceleration (m/s^2) - float yacc; ///< Y acceleration (m/s^2) - float zacc; ///< Z acceleration (m/s^2) - float xgyro; ///< Angular speed around X axis in body frame (rad / sec) - float ygyro; ///< Angular speed around Y axis in body frame (rad / sec) - float zgyro; ///< Angular speed around Z axis in body frame (rad / sec) - float xmag; ///< X Magnetic field (Gauss) - float ymag; ///< Y Magnetic field (Gauss) - float zmag; ///< Z Magnetic field (Gauss) - float abs_pressure; ///< Absolute pressure in millibar - float diff_pressure; ///< Differential pressure (airspeed) in millibar - float pressure_alt; ///< Altitude calculated from pressure - float temperature; ///< Temperature in degrees celsius - uint32_t fields_updated; ///< Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature + uint64_t time_usec; /*< Timestamp (microseconds, synced to UNIX time or since system boot)*/ + float xacc; /*< X acceleration (m/s^2)*/ + float yacc; /*< Y acceleration (m/s^2)*/ + float zacc; /*< Z acceleration (m/s^2)*/ + float xgyro; /*< Angular speed around X axis in body frame (rad / sec)*/ + float ygyro; /*< Angular speed around Y axis in body frame (rad / sec)*/ + float zgyro; /*< Angular speed around Z axis in body frame (rad / sec)*/ + float xmag; /*< X Magnetic field (Gauss)*/ + float ymag; /*< Y Magnetic field (Gauss)*/ + float zmag; /*< Z Magnetic field (Gauss)*/ + float abs_pressure; /*< Absolute pressure in millibar*/ + float diff_pressure; /*< Differential pressure (airspeed) in millibar*/ + float pressure_alt; /*< Altitude calculated from pressure*/ + float temperature; /*< Temperature in degrees celsius*/ + uint32_t fields_updated; /*< Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature*/ } mavlink_hil_sensor_t; #define MAVLINK_MSG_ID_HIL_SENSOR_LEN 64 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_state.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_state.h index 923ed60..e58141e 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_state.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_state.h @@ -4,22 +4,22 @@ typedef struct __mavlink_hil_state_t { - uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot) - float roll; ///< Roll angle (rad) - float pitch; ///< Pitch angle (rad) - float yaw; ///< Yaw angle (rad) - float rollspeed; ///< Body frame roll / phi angular speed (rad/s) - float pitchspeed; ///< Body frame pitch / theta angular speed (rad/s) - float yawspeed; ///< Body frame yaw / psi angular speed (rad/s) - int32_t lat; ///< Latitude, expressed as * 1E7 - int32_t lon; ///< Longitude, expressed as * 1E7 - int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters) - int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100 - int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100 - int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100 - int16_t xacc; ///< X acceleration (mg) - int16_t yacc; ///< Y acceleration (mg) - int16_t zacc; ///< Z acceleration (mg) + uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/ + float roll; /*< Roll angle (rad)*/ + float pitch; /*< Pitch angle (rad)*/ + float yaw; /*< Yaw angle (rad)*/ + float rollspeed; /*< Body frame roll / phi angular speed (rad/s)*/ + float pitchspeed; /*< Body frame pitch / theta angular speed (rad/s)*/ + float yawspeed; /*< Body frame yaw / psi angular speed (rad/s)*/ + int32_t lat; /*< Latitude, expressed as * 1E7*/ + int32_t lon; /*< Longitude, expressed as * 1E7*/ + int32_t alt; /*< Altitude in meters, expressed as * 1000 (millimeters)*/ + int16_t vx; /*< Ground X Speed (Latitude), expressed as m/s * 100*/ + int16_t vy; /*< Ground Y Speed (Longitude), expressed as m/s * 100*/ + int16_t vz; /*< Ground Z Speed (Altitude), expressed as m/s * 100*/ + int16_t xacc; /*< X acceleration (mg)*/ + int16_t yacc; /*< Y acceleration (mg)*/ + int16_t zacc; /*< Z acceleration (mg)*/ } mavlink_hil_state_t; #define MAVLINK_MSG_ID_HIL_STATE_LEN 56 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_state_quaternion.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_state_quaternion.h index 344a19e..9663813 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_state_quaternion.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_hil_state_quaternion.h @@ -4,22 +4,22 @@ typedef struct __mavlink_hil_state_quaternion_t { - uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot) - float attitude_quaternion[4]; ///< Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation) - float rollspeed; ///< Body frame roll / phi angular speed (rad/s) - float pitchspeed; ///< Body frame pitch / theta angular speed (rad/s) - float yawspeed; ///< Body frame yaw / psi angular speed (rad/s) - int32_t lat; ///< Latitude, expressed as * 1E7 - int32_t lon; ///< Longitude, expressed as * 1E7 - int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters) - int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100 - int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100 - int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100 - uint16_t ind_airspeed; ///< Indicated airspeed, expressed as m/s * 100 - uint16_t true_airspeed; ///< True airspeed, expressed as m/s * 100 - int16_t xacc; ///< X acceleration (mg) - int16_t yacc; ///< Y acceleration (mg) - int16_t zacc; ///< Z acceleration (mg) + uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/ + float attitude_quaternion[4]; /*< Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)*/ + float rollspeed; /*< Body frame roll / phi angular speed (rad/s)*/ + float pitchspeed; /*< Body frame pitch / theta angular speed (rad/s)*/ + float yawspeed; /*< Body frame yaw / psi angular speed (rad/s)*/ + int32_t lat; /*< Latitude, expressed as * 1E7*/ + int32_t lon; /*< Longitude, expressed as * 1E7*/ + int32_t alt; /*< Altitude in meters, expressed as * 1000 (millimeters)*/ + int16_t vx; /*< Ground X Speed (Latitude), expressed as m/s * 100*/ + int16_t vy; /*< Ground Y Speed (Longitude), expressed as m/s * 100*/ + int16_t vz; /*< Ground Z Speed (Altitude), expressed as m/s * 100*/ + uint16_t ind_airspeed; /*< Indicated airspeed, expressed as m/s * 100*/ + uint16_t true_airspeed; /*< True airspeed, expressed as m/s * 100*/ + int16_t xacc; /*< X acceleration (mg)*/ + int16_t yacc; /*< Y acceleration (mg)*/ + int16_t zacc; /*< Z acceleration (mg)*/ } mavlink_hil_state_quaternion_t; #define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN 64 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_home_position.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_home_position.h new file mode 100644 index 0000000..c7181b7 --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_home_position.h @@ -0,0 +1,417 @@ +// MESSAGE HOME_POSITION PACKING + +#define MAVLINK_MSG_ID_HOME_POSITION 242 + +typedef struct __mavlink_home_position_t +{ + int32_t latitude; /*< Latitude (WGS84), in degrees * 1E7*/ + int32_t longitude; /*< Longitude (WGS84, in degrees * 1E7*/ + int32_t altitude; /*< Altitude (AMSL), in meters * 1000 (positive for up)*/ + float x; /*< Local X position of this position in the local coordinate frame*/ + float y; /*< Local Y position of this position in the local coordinate frame*/ + float z; /*< Local Z position of this position in the local coordinate frame*/ + float q[4]; /*< World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground*/ + float approach_x; /*< Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ + float approach_y; /*< Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ + float approach_z; /*< Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ +} mavlink_home_position_t; + +#define MAVLINK_MSG_ID_HOME_POSITION_LEN 52 +#define MAVLINK_MSG_ID_242_LEN 52 + +#define MAVLINK_MSG_ID_HOME_POSITION_CRC 104 +#define MAVLINK_MSG_ID_242_CRC 104 + +#define MAVLINK_MSG_HOME_POSITION_FIELD_Q_LEN 4 + +#define MAVLINK_MESSAGE_INFO_HOME_POSITION { \ + "HOME_POSITION", \ + 10, \ + { { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_home_position_t, latitude) }, \ + { "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_home_position_t, longitude) }, \ + { "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_home_position_t, altitude) }, \ + { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_home_position_t, x) }, \ + { "y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_home_position_t, y) }, \ + { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_home_position_t, z) }, \ + { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 24, offsetof(mavlink_home_position_t, q) }, \ + { "approach_x", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_home_position_t, approach_x) }, \ + { "approach_y", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_home_position_t, approach_y) }, \ + { "approach_z", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_home_position_t, approach_z) }, \ + } \ +} + + +/** + * @brief Pack a home_position 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 latitude Latitude (WGS84), in degrees * 1E7 + * @param longitude Longitude (WGS84, in degrees * 1E7 + * @param altitude Altitude (AMSL), in meters * 1000 (positive for up) + * @param x Local X position of this position in the local coordinate frame + * @param y Local Y position of this position in the local coordinate frame + * @param z Local Z position of this position in the local coordinate frame + * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground + * @param approach_x Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_y Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_z Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_home_position_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_HOME_POSITION_LEN]; + _mav_put_int32_t(buf, 0, latitude); + _mav_put_int32_t(buf, 4, longitude); + _mav_put_int32_t(buf, 8, altitude); + _mav_put_float(buf, 12, x); + _mav_put_float(buf, 16, y); + _mav_put_float(buf, 20, z); + _mav_put_float(buf, 40, approach_x); + _mav_put_float(buf, 44, approach_y); + _mav_put_float(buf, 48, approach_z); + _mav_put_float_array(buf, 24, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HOME_POSITION_LEN); +#else + mavlink_home_position_t packet; + packet.latitude = latitude; + packet.longitude = longitude; + packet.altitude = altitude; + packet.x = x; + packet.y = y; + packet.z = z; + packet.approach_x = approach_x; + packet.approach_y = approach_y; + packet.approach_z = approach_z; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HOME_POSITION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_HOME_POSITION; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HOME_POSITION_LEN, MAVLINK_MSG_ID_HOME_POSITION_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HOME_POSITION_LEN); +#endif +} + +/** + * @brief Pack a home_position 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 latitude Latitude (WGS84), in degrees * 1E7 + * @param longitude Longitude (WGS84, in degrees * 1E7 + * @param altitude Altitude (AMSL), in meters * 1000 (positive for up) + * @param x Local X position of this position in the local coordinate frame + * @param y Local Y position of this position in the local coordinate frame + * @param z Local Z position of this position in the local coordinate frame + * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground + * @param approach_x Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_y Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_z Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_home_position_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + int32_t latitude,int32_t longitude,int32_t altitude,float x,float y,float z,const float *q,float approach_x,float approach_y,float approach_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_HOME_POSITION_LEN]; + _mav_put_int32_t(buf, 0, latitude); + _mav_put_int32_t(buf, 4, longitude); + _mav_put_int32_t(buf, 8, altitude); + _mav_put_float(buf, 12, x); + _mav_put_float(buf, 16, y); + _mav_put_float(buf, 20, z); + _mav_put_float(buf, 40, approach_x); + _mav_put_float(buf, 44, approach_y); + _mav_put_float(buf, 48, approach_z); + _mav_put_float_array(buf, 24, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HOME_POSITION_LEN); +#else + mavlink_home_position_t packet; + packet.latitude = latitude; + packet.longitude = longitude; + packet.altitude = altitude; + packet.x = x; + packet.y = y; + packet.z = z; + packet.approach_x = approach_x; + packet.approach_y = approach_y; + packet.approach_z = approach_z; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HOME_POSITION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_HOME_POSITION; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HOME_POSITION_LEN, MAVLINK_MSG_ID_HOME_POSITION_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HOME_POSITION_LEN); +#endif +} + +/** + * @brief Encode a home_position 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 home_position C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_home_position_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_home_position_t* home_position) +{ + return mavlink_msg_home_position_pack(system_id, component_id, msg, home_position->latitude, home_position->longitude, home_position->altitude, home_position->x, home_position->y, home_position->z, home_position->q, home_position->approach_x, home_position->approach_y, home_position->approach_z); +} + +/** + * @brief Encode a home_position 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 home_position C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_home_position_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_home_position_t* home_position) +{ + return mavlink_msg_home_position_pack_chan(system_id, component_id, chan, msg, home_position->latitude, home_position->longitude, home_position->altitude, home_position->x, home_position->y, home_position->z, home_position->q, home_position->approach_x, home_position->approach_y, home_position->approach_z); +} + +/** + * @brief Send a home_position message + * @param chan MAVLink channel to send the message + * + * @param latitude Latitude (WGS84), in degrees * 1E7 + * @param longitude Longitude (WGS84, in degrees * 1E7 + * @param altitude Altitude (AMSL), in meters * 1000 (positive for up) + * @param x Local X position of this position in the local coordinate frame + * @param y Local Y position of this position in the local coordinate frame + * @param z Local Z position of this position in the local coordinate frame + * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground + * @param approach_x Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_y Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_z Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_home_position_send(mavlink_channel_t chan, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_HOME_POSITION_LEN]; + _mav_put_int32_t(buf, 0, latitude); + _mav_put_int32_t(buf, 4, longitude); + _mav_put_int32_t(buf, 8, altitude); + _mav_put_float(buf, 12, x); + _mav_put_float(buf, 16, y); + _mav_put_float(buf, 20, z); + _mav_put_float(buf, 40, approach_x); + _mav_put_float(buf, 44, approach_y); + _mav_put_float(buf, 48, approach_z); + _mav_put_float_array(buf, 24, q, 4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HOME_POSITION, buf, MAVLINK_MSG_ID_HOME_POSITION_LEN, MAVLINK_MSG_ID_HOME_POSITION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HOME_POSITION, buf, MAVLINK_MSG_ID_HOME_POSITION_LEN); +#endif +#else + mavlink_home_position_t packet; + packet.latitude = latitude; + packet.longitude = longitude; + packet.altitude = altitude; + packet.x = x; + packet.y = y; + packet.z = z; + packet.approach_x = approach_x; + packet.approach_y = approach_y; + packet.approach_z = approach_z; + mav_array_memcpy(packet.q, q, sizeof(float)*4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HOME_POSITION, (const char *)&packet, MAVLINK_MSG_ID_HOME_POSITION_LEN, MAVLINK_MSG_ID_HOME_POSITION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HOME_POSITION, (const char *)&packet, MAVLINK_MSG_ID_HOME_POSITION_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_HOME_POSITION_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_home_position_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_int32_t(buf, 0, latitude); + _mav_put_int32_t(buf, 4, longitude); + _mav_put_int32_t(buf, 8, altitude); + _mav_put_float(buf, 12, x); + _mav_put_float(buf, 16, y); + _mav_put_float(buf, 20, z); + _mav_put_float(buf, 40, approach_x); + _mav_put_float(buf, 44, approach_y); + _mav_put_float(buf, 48, approach_z); + _mav_put_float_array(buf, 24, q, 4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HOME_POSITION, buf, MAVLINK_MSG_ID_HOME_POSITION_LEN, MAVLINK_MSG_ID_HOME_POSITION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HOME_POSITION, buf, MAVLINK_MSG_ID_HOME_POSITION_LEN); +#endif +#else + mavlink_home_position_t *packet = (mavlink_home_position_t *)msgbuf; + packet->latitude = latitude; + packet->longitude = longitude; + packet->altitude = altitude; + packet->x = x; + packet->y = y; + packet->z = z; + packet->approach_x = approach_x; + packet->approach_y = approach_y; + packet->approach_z = approach_z; + mav_array_memcpy(packet->q, q, sizeof(float)*4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HOME_POSITION, (const char *)packet, MAVLINK_MSG_ID_HOME_POSITION_LEN, MAVLINK_MSG_ID_HOME_POSITION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HOME_POSITION, (const char *)packet, MAVLINK_MSG_ID_HOME_POSITION_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE HOME_POSITION UNPACKING + + +/** + * @brief Get field latitude from home_position message + * + * @return Latitude (WGS84), in degrees * 1E7 + */ +static inline int32_t mavlink_msg_home_position_get_latitude(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 0); +} + +/** + * @brief Get field longitude from home_position message + * + * @return Longitude (WGS84, in degrees * 1E7 + */ +static inline int32_t mavlink_msg_home_position_get_longitude(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 4); +} + +/** + * @brief Get field altitude from home_position message + * + * @return Altitude (AMSL), in meters * 1000 (positive for up) + */ +static inline int32_t mavlink_msg_home_position_get_altitude(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 8); +} + +/** + * @brief Get field x from home_position message + * + * @return Local X position of this position in the local coordinate frame + */ +static inline float mavlink_msg_home_position_get_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 12); +} + +/** + * @brief Get field y from home_position message + * + * @return Local Y position of this position in the local coordinate frame + */ +static inline float mavlink_msg_home_position_get_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 16); +} + +/** + * @brief Get field z from home_position message + * + * @return Local Z position of this position in the local coordinate frame + */ +static inline float mavlink_msg_home_position_get_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 20); +} + +/** + * @brief Get field q from home_position message + * + * @return World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground + */ +static inline uint16_t mavlink_msg_home_position_get_q(const mavlink_message_t* msg, float *q) +{ + return _MAV_RETURN_float_array(msg, q, 4, 24); +} + +/** + * @brief Get field approach_x from home_position message + * + * @return Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + */ +static inline float mavlink_msg_home_position_get_approach_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 40); +} + +/** + * @brief Get field approach_y from home_position message + * + * @return Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + */ +static inline float mavlink_msg_home_position_get_approach_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 44); +} + +/** + * @brief Get field approach_z from home_position message + * + * @return Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + */ +static inline float mavlink_msg_home_position_get_approach_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 48); +} + +/** + * @brief Decode a home_position message into a struct + * + * @param msg The message to decode + * @param home_position C-struct to decode the message contents into + */ +static inline void mavlink_msg_home_position_decode(const mavlink_message_t* msg, mavlink_home_position_t* home_position) +{ +#if MAVLINK_NEED_BYTE_SWAP + home_position->latitude = mavlink_msg_home_position_get_latitude(msg); + home_position->longitude = mavlink_msg_home_position_get_longitude(msg); + home_position->altitude = mavlink_msg_home_position_get_altitude(msg); + home_position->x = mavlink_msg_home_position_get_x(msg); + home_position->y = mavlink_msg_home_position_get_y(msg); + home_position->z = mavlink_msg_home_position_get_z(msg); + mavlink_msg_home_position_get_q(msg, home_position->q); + home_position->approach_x = mavlink_msg_home_position_get_approach_x(msg); + home_position->approach_y = mavlink_msg_home_position_get_approach_y(msg); + home_position->approach_z = mavlink_msg_home_position_get_approach_z(msg); +#else + memcpy(home_position, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HOME_POSITION_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_landing_target.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_landing_target.h new file mode 100644 index 0000000..14b03bf --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_landing_target.h @@ -0,0 +1,377 @@ +// MESSAGE LANDING_TARGET PACKING + +#define MAVLINK_MSG_ID_LANDING_TARGET 149 + +typedef struct __mavlink_landing_target_t +{ + uint64_t time_usec; /*< Timestamp (micros since boot or Unix epoch)*/ + float angle_x; /*< X-axis angular offset (in radians) of the target from the center of the image*/ + float angle_y; /*< Y-axis angular offset (in radians) of the target from the center of the image*/ + float distance; /*< Distance to the target from the vehicle in meters*/ + float size_x; /*< Size in radians of target along x-axis*/ + float size_y; /*< Size in radians of target along y-axis*/ + uint8_t target_num; /*< The ID of the target if multiple targets are present*/ + uint8_t frame; /*< MAV_FRAME enum specifying the whether the following feilds are earth-frame, body-frame, etc.*/ +} mavlink_landing_target_t; + +#define MAVLINK_MSG_ID_LANDING_TARGET_LEN 30 +#define MAVLINK_MSG_ID_149_LEN 30 + +#define MAVLINK_MSG_ID_LANDING_TARGET_CRC 200 +#define MAVLINK_MSG_ID_149_CRC 200 + + + +#define MAVLINK_MESSAGE_INFO_LANDING_TARGET { \ + "LANDING_TARGET", \ + 8, \ + { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_landing_target_t, time_usec) }, \ + { "angle_x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_landing_target_t, angle_x) }, \ + { "angle_y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_landing_target_t, angle_y) }, \ + { "distance", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_landing_target_t, distance) }, \ + { "size_x", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_landing_target_t, size_x) }, \ + { "size_y", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_landing_target_t, size_y) }, \ + { "target_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_landing_target_t, target_num) }, \ + { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_landing_target_t, frame) }, \ + } \ +} + + +/** + * @brief Pack a landing_target 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 time_usec Timestamp (micros since boot or Unix epoch) + * @param target_num The ID of the target if multiple targets are present + * @param frame MAV_FRAME enum specifying the whether the following feilds are earth-frame, body-frame, etc. + * @param angle_x X-axis angular offset (in radians) of the target from the center of the image + * @param angle_y Y-axis angular offset (in radians) of the target from the center of the image + * @param distance Distance to the target from the vehicle in meters + * @param size_x Size in radians of target along x-axis + * @param size_y Size in radians of target along y-axis + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_landing_target_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint64_t time_usec, uint8_t target_num, uint8_t frame, float angle_x, float angle_y, float distance, float size_x, float size_y) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_LANDING_TARGET_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, angle_x); + _mav_put_float(buf, 12, angle_y); + _mav_put_float(buf, 16, distance); + _mav_put_float(buf, 20, size_x); + _mav_put_float(buf, 24, size_y); + _mav_put_uint8_t(buf, 28, target_num); + _mav_put_uint8_t(buf, 29, frame); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#else + mavlink_landing_target_t packet; + packet.time_usec = time_usec; + packet.angle_x = angle_x; + packet.angle_y = angle_y; + packet.distance = distance; + packet.size_x = size_x; + packet.size_y = size_y; + packet.target_num = target_num; + packet.frame = frame; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_LANDING_TARGET; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LANDING_TARGET_LEN, MAVLINK_MSG_ID_LANDING_TARGET_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#endif +} + +/** + * @brief Pack a landing_target 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 time_usec Timestamp (micros since boot or Unix epoch) + * @param target_num The ID of the target if multiple targets are present + * @param frame MAV_FRAME enum specifying the whether the following feilds are earth-frame, body-frame, etc. + * @param angle_x X-axis angular offset (in radians) of the target from the center of the image + * @param angle_y Y-axis angular offset (in radians) of the target from the center of the image + * @param distance Distance to the target from the vehicle in meters + * @param size_x Size in radians of target along x-axis + * @param size_y Size in radians of target along y-axis + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_landing_target_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint64_t time_usec,uint8_t target_num,uint8_t frame,float angle_x,float angle_y,float distance,float size_x,float size_y) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_LANDING_TARGET_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, angle_x); + _mav_put_float(buf, 12, angle_y); + _mav_put_float(buf, 16, distance); + _mav_put_float(buf, 20, size_x); + _mav_put_float(buf, 24, size_y); + _mav_put_uint8_t(buf, 28, target_num); + _mav_put_uint8_t(buf, 29, frame); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#else + mavlink_landing_target_t packet; + packet.time_usec = time_usec; + packet.angle_x = angle_x; + packet.angle_y = angle_y; + packet.distance = distance; + packet.size_x = size_x; + packet.size_y = size_y; + packet.target_num = target_num; + packet.frame = frame; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_LANDING_TARGET; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LANDING_TARGET_LEN, MAVLINK_MSG_ID_LANDING_TARGET_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#endif +} + +/** + * @brief Encode a landing_target 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 landing_target C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_landing_target_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_landing_target_t* landing_target) +{ + return mavlink_msg_landing_target_pack(system_id, component_id, msg, landing_target->time_usec, landing_target->target_num, landing_target->frame, landing_target->angle_x, landing_target->angle_y, landing_target->distance, landing_target->size_x, landing_target->size_y); +} + +/** + * @brief Encode a landing_target 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 landing_target C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_landing_target_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_landing_target_t* landing_target) +{ + return mavlink_msg_landing_target_pack_chan(system_id, component_id, chan, msg, landing_target->time_usec, landing_target->target_num, landing_target->frame, landing_target->angle_x, landing_target->angle_y, landing_target->distance, landing_target->size_x, landing_target->size_y); +} + +/** + * @brief Send a landing_target message + * @param chan MAVLink channel to send the message + * + * @param time_usec Timestamp (micros since boot or Unix epoch) + * @param target_num The ID of the target if multiple targets are present + * @param frame MAV_FRAME enum specifying the whether the following feilds are earth-frame, body-frame, etc. + * @param angle_x X-axis angular offset (in radians) of the target from the center of the image + * @param angle_y Y-axis angular offset (in radians) of the target from the center of the image + * @param distance Distance to the target from the vehicle in meters + * @param size_x Size in radians of target along x-axis + * @param size_y Size in radians of target along y-axis + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_landing_target_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t target_num, uint8_t frame, float angle_x, float angle_y, float distance, float size_x, float size_y) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_LANDING_TARGET_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, angle_x); + _mav_put_float(buf, 12, angle_y); + _mav_put_float(buf, 16, distance); + _mav_put_float(buf, 20, size_x); + _mav_put_float(buf, 24, size_y); + _mav_put_uint8_t(buf, 28, target_num); + _mav_put_uint8_t(buf, 29, frame); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LANDING_TARGET, buf, MAVLINK_MSG_ID_LANDING_TARGET_LEN, MAVLINK_MSG_ID_LANDING_TARGET_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LANDING_TARGET, buf, MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#endif +#else + mavlink_landing_target_t packet; + packet.time_usec = time_usec; + packet.angle_x = angle_x; + packet.angle_y = angle_y; + packet.distance = distance; + packet.size_x = size_x; + packet.size_y = size_y; + packet.target_num = target_num; + packet.frame = frame; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LANDING_TARGET, (const char *)&packet, MAVLINK_MSG_ID_LANDING_TARGET_LEN, MAVLINK_MSG_ID_LANDING_TARGET_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LANDING_TARGET, (const char *)&packet, MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_LANDING_TARGET_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_landing_target_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint8_t target_num, uint8_t frame, float angle_x, float angle_y, float distance, float size_x, float size_y) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, angle_x); + _mav_put_float(buf, 12, angle_y); + _mav_put_float(buf, 16, distance); + _mav_put_float(buf, 20, size_x); + _mav_put_float(buf, 24, size_y); + _mav_put_uint8_t(buf, 28, target_num); + _mav_put_uint8_t(buf, 29, frame); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LANDING_TARGET, buf, MAVLINK_MSG_ID_LANDING_TARGET_LEN, MAVLINK_MSG_ID_LANDING_TARGET_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LANDING_TARGET, buf, MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#endif +#else + mavlink_landing_target_t *packet = (mavlink_landing_target_t *)msgbuf; + packet->time_usec = time_usec; + packet->angle_x = angle_x; + packet->angle_y = angle_y; + packet->distance = distance; + packet->size_x = size_x; + packet->size_y = size_y; + packet->target_num = target_num; + packet->frame = frame; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LANDING_TARGET, (const char *)packet, MAVLINK_MSG_ID_LANDING_TARGET_LEN, MAVLINK_MSG_ID_LANDING_TARGET_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LANDING_TARGET, (const char *)packet, MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE LANDING_TARGET UNPACKING + + +/** + * @brief Get field time_usec from landing_target message + * + * @return Timestamp (micros since boot or Unix epoch) + */ +static inline uint64_t mavlink_msg_landing_target_get_time_usec(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint64_t(msg, 0); +} + +/** + * @brief Get field target_num from landing_target message + * + * @return The ID of the target if multiple targets are present + */ +static inline uint8_t mavlink_msg_landing_target_get_target_num(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 28); +} + +/** + * @brief Get field frame from landing_target message + * + * @return MAV_FRAME enum specifying the whether the following feilds are earth-frame, body-frame, etc. + */ +static inline uint8_t mavlink_msg_landing_target_get_frame(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 29); +} + +/** + * @brief Get field angle_x from landing_target message + * + * @return X-axis angular offset (in radians) of the target from the center of the image + */ +static inline float mavlink_msg_landing_target_get_angle_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 8); +} + +/** + * @brief Get field angle_y from landing_target message + * + * @return Y-axis angular offset (in radians) of the target from the center of the image + */ +static inline float mavlink_msg_landing_target_get_angle_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 12); +} + +/** + * @brief Get field distance from landing_target message + * + * @return Distance to the target from the vehicle in meters + */ +static inline float mavlink_msg_landing_target_get_distance(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 16); +} + +/** + * @brief Get field size_x from landing_target message + * + * @return Size in radians of target along x-axis + */ +static inline float mavlink_msg_landing_target_get_size_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 20); +} + +/** + * @brief Get field size_y from landing_target message + * + * @return Size in radians of target along y-axis + */ +static inline float mavlink_msg_landing_target_get_size_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 24); +} + +/** + * @brief Decode a landing_target message into a struct + * + * @param msg The message to decode + * @param landing_target C-struct to decode the message contents into + */ +static inline void mavlink_msg_landing_target_decode(const mavlink_message_t* msg, mavlink_landing_target_t* landing_target) +{ +#if MAVLINK_NEED_BYTE_SWAP + landing_target->time_usec = mavlink_msg_landing_target_get_time_usec(msg); + landing_target->angle_x = mavlink_msg_landing_target_get_angle_x(msg); + landing_target->angle_y = mavlink_msg_landing_target_get_angle_y(msg); + landing_target->distance = mavlink_msg_landing_target_get_distance(msg); + landing_target->size_x = mavlink_msg_landing_target_get_size_x(msg); + landing_target->size_y = mavlink_msg_landing_target_get_size_y(msg); + landing_target->target_num = mavlink_msg_landing_target_get_target_num(msg); + landing_target->frame = mavlink_msg_landing_target_get_frame(msg); +#else + memcpy(landing_target, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LANDING_TARGET_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned.h index e18a948..a15dbce 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned.h @@ -4,13 +4,13 @@ typedef struct __mavlink_local_position_ned_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - float x; ///< X Position - float y; ///< Y Position - float z; ///< Z Position - float vx; ///< X Speed - float vy; ///< Y Speed - float vz; ///< Z Speed + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + float x; /*< X Position*/ + float y; /*< Y Position*/ + float z; /*< Z Position*/ + float vx; /*< X Speed*/ + float vy; /*< Y Speed*/ + float vz; /*< Z Speed*/ } mavlink_local_position_ned_t; #define MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN 28 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned_cov.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned_cov.h index 0a94af3..59b8369 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned_cov.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned_cov.h @@ -4,29 +4,32 @@ typedef struct __mavlink_local_position_ned_cov_t { - uint64_t time_utc; ///< Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - float x; ///< X Position - float y; ///< Y Position - float z; ///< Z Position - float vx; ///< X Speed - float vy; ///< Y Speed - float vz; ///< Z Speed - float covariance[36]; ///< Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.) - uint8_t estimator_type; ///< Class id of the estimator this estimate originated from. + uint64_t time_utc; /*< Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver.*/ + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot). 0 for system without monotonic timestamp*/ + float x; /*< X Position*/ + float y; /*< Y Position*/ + float z; /*< Z Position*/ + float vx; /*< X Speed (m/s)*/ + float vy; /*< Y Speed (m/s)*/ + float vz; /*< Z Speed (m/s)*/ + float ax; /*< X Acceleration (m/s^2)*/ + float ay; /*< Y Acceleration (m/s^2)*/ + float az; /*< Z Acceleration (m/s^2)*/ + float covariance[45]; /*< Covariance matrix upper right triangular (first nine entries are the first ROW, next eight entries are the second row, etc.)*/ + uint8_t estimator_type; /*< Class id of the estimator this estimate originated from.*/ } mavlink_local_position_ned_cov_t; -#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN 181 -#define MAVLINK_MSG_ID_64_LEN 181 +#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN 229 +#define MAVLINK_MSG_ID_64_LEN 229 -#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC 82 -#define MAVLINK_MSG_ID_64_CRC 82 +#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC 59 +#define MAVLINK_MSG_ID_64_CRC 59 -#define MAVLINK_MSG_LOCAL_POSITION_NED_COV_FIELD_COVARIANCE_LEN 36 +#define MAVLINK_MSG_LOCAL_POSITION_NED_COV_FIELD_COVARIANCE_LEN 45 #define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV { \ "LOCAL_POSITION_NED_COV", \ - 10, \ + 13, \ { { "time_utc", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_local_position_ned_cov_t, time_utc) }, \ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_local_position_ned_cov_t, time_boot_ms) }, \ { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_ned_cov_t, x) }, \ @@ -35,8 +38,11 @@ typedef struct __mavlink_local_position_ned_cov_t { "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_local_position_ned_cov_t, vx) }, \ { "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_local_position_ned_cov_t, vy) }, \ { "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_local_position_ned_cov_t, vz) }, \ - { "covariance", NULL, MAVLINK_TYPE_FLOAT, 36, 36, offsetof(mavlink_local_position_ned_cov_t, covariance) }, \ - { "estimator_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 180, offsetof(mavlink_local_position_ned_cov_t, estimator_type) }, \ + { "ax", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_local_position_ned_cov_t, ax) }, \ + { "ay", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_local_position_ned_cov_t, ay) }, \ + { "az", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_local_position_ned_cov_t, az) }, \ + { "covariance", NULL, MAVLINK_TYPE_FLOAT, 45, 48, offsetof(mavlink_local_position_ned_cov_t, covariance) }, \ + { "estimator_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 228, offsetof(mavlink_local_position_ned_cov_t, estimator_type) }, \ } \ } @@ -47,20 +53,23 @@ typedef struct __mavlink_local_position_ned_cov_t * @param component_id ID of this component (e.g. 200 for IMU) * @param msg The MAVLink message to compress the data into * - * @param time_boot_ms Timestamp (milliseconds since system boot) + * @param time_boot_ms Timestamp (milliseconds since system boot). 0 for system without monotonic timestamp * @param time_utc Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. * @param estimator_type Class id of the estimator this estimate originated from. * @param x X Position * @param y Y Position * @param z Z Position - * @param vx X Speed - * @param vy Y Speed - * @param vz Z Speed - * @param covariance Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.) + * @param vx X Speed (m/s) + * @param vy Y Speed (m/s) + * @param vz Z Speed (m/s) + * @param ax X Acceleration (m/s^2) + * @param ay Y Acceleration (m/s^2) + * @param az Z Acceleration (m/s^2) + * @param covariance Covariance matrix upper right triangular (first nine entries are the first ROW, next eight entries are the second row, etc.) * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_local_position_ned_cov_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, uint64_t time_utc, uint8_t estimator_type, float x, float y, float z, float vx, float vy, float vz, const float *covariance) + uint32_t time_boot_ms, uint64_t time_utc, uint8_t estimator_type, float x, float y, float z, float vx, float vy, float vz, float ax, float ay, float az, const float *covariance) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN]; @@ -72,8 +81,11 @@ static inline uint16_t mavlink_msg_local_position_ned_cov_pack(uint8_t system_id _mav_put_float(buf, 24, vx); _mav_put_float(buf, 28, vy); _mav_put_float(buf, 32, vz); - _mav_put_uint8_t(buf, 180, estimator_type); - _mav_put_float_array(buf, 36, covariance, 36); + _mav_put_float(buf, 36, ax); + _mav_put_float(buf, 40, ay); + _mav_put_float(buf, 44, az); + _mav_put_uint8_t(buf, 228, estimator_type); + _mav_put_float_array(buf, 48, covariance, 45); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN); #else mavlink_local_position_ned_cov_t packet; @@ -85,8 +97,11 @@ static inline uint16_t mavlink_msg_local_position_ned_cov_pack(uint8_t system_id packet.vx = vx; packet.vy = vy; packet.vz = vz; + packet.ax = ax; + packet.ay = ay; + packet.az = az; packet.estimator_type = estimator_type; - mav_array_memcpy(packet.covariance, covariance, sizeof(float)*36); + mav_array_memcpy(packet.covariance, covariance, sizeof(float)*45); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN); #endif @@ -104,21 +119,24 @@ static inline uint16_t mavlink_msg_local_position_ned_cov_pack(uint8_t system_id * @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 time_boot_ms Timestamp (milliseconds since system boot) + * @param time_boot_ms Timestamp (milliseconds since system boot). 0 for system without monotonic timestamp * @param time_utc Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. * @param estimator_type Class id of the estimator this estimate originated from. * @param x X Position * @param y Y Position * @param z Z Position - * @param vx X Speed - * @param vy Y Speed - * @param vz Z Speed - * @param covariance Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.) + * @param vx X Speed (m/s) + * @param vy Y Speed (m/s) + * @param vz Z Speed (m/s) + * @param ax X Acceleration (m/s^2) + * @param ay Y Acceleration (m/s^2) + * @param az Z Acceleration (m/s^2) + * @param covariance Covariance matrix upper right triangular (first nine entries are the first ROW, next eight entries are the second row, etc.) * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_local_position_ned_cov_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint32_t time_boot_ms,uint64_t time_utc,uint8_t estimator_type,float x,float y,float z,float vx,float vy,float vz,const float *covariance) + uint32_t time_boot_ms,uint64_t time_utc,uint8_t estimator_type,float x,float y,float z,float vx,float vy,float vz,float ax,float ay,float az,const float *covariance) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN]; @@ -130,8 +148,11 @@ static inline uint16_t mavlink_msg_local_position_ned_cov_pack_chan(uint8_t syst _mav_put_float(buf, 24, vx); _mav_put_float(buf, 28, vy); _mav_put_float(buf, 32, vz); - _mav_put_uint8_t(buf, 180, estimator_type); - _mav_put_float_array(buf, 36, covariance, 36); + _mav_put_float(buf, 36, ax); + _mav_put_float(buf, 40, ay); + _mav_put_float(buf, 44, az); + _mav_put_uint8_t(buf, 228, estimator_type); + _mav_put_float_array(buf, 48, covariance, 45); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN); #else mavlink_local_position_ned_cov_t packet; @@ -143,8 +164,11 @@ static inline uint16_t mavlink_msg_local_position_ned_cov_pack_chan(uint8_t syst packet.vx = vx; packet.vy = vy; packet.vz = vz; + packet.ax = ax; + packet.ay = ay; + packet.az = az; packet.estimator_type = estimator_type; - mav_array_memcpy(packet.covariance, covariance, sizeof(float)*36); + mav_array_memcpy(packet.covariance, covariance, sizeof(float)*45); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN); #endif @@ -166,7 +190,7 @@ static inline uint16_t mavlink_msg_local_position_ned_cov_pack_chan(uint8_t syst */ static inline uint16_t mavlink_msg_local_position_ned_cov_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_local_position_ned_cov_t* local_position_ned_cov) { - return mavlink_msg_local_position_ned_cov_pack(system_id, component_id, msg, local_position_ned_cov->time_boot_ms, local_position_ned_cov->time_utc, local_position_ned_cov->estimator_type, local_position_ned_cov->x, local_position_ned_cov->y, local_position_ned_cov->z, local_position_ned_cov->vx, local_position_ned_cov->vy, local_position_ned_cov->vz, local_position_ned_cov->covariance); + return mavlink_msg_local_position_ned_cov_pack(system_id, component_id, msg, local_position_ned_cov->time_boot_ms, local_position_ned_cov->time_utc, local_position_ned_cov->estimator_type, local_position_ned_cov->x, local_position_ned_cov->y, local_position_ned_cov->z, local_position_ned_cov->vx, local_position_ned_cov->vy, local_position_ned_cov->vz, local_position_ned_cov->ax, local_position_ned_cov->ay, local_position_ned_cov->az, local_position_ned_cov->covariance); } /** @@ -180,27 +204,30 @@ static inline uint16_t mavlink_msg_local_position_ned_cov_encode(uint8_t system_ */ static inline uint16_t mavlink_msg_local_position_ned_cov_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_local_position_ned_cov_t* local_position_ned_cov) { - return mavlink_msg_local_position_ned_cov_pack_chan(system_id, component_id, chan, msg, local_position_ned_cov->time_boot_ms, local_position_ned_cov->time_utc, local_position_ned_cov->estimator_type, local_position_ned_cov->x, local_position_ned_cov->y, local_position_ned_cov->z, local_position_ned_cov->vx, local_position_ned_cov->vy, local_position_ned_cov->vz, local_position_ned_cov->covariance); + return mavlink_msg_local_position_ned_cov_pack_chan(system_id, component_id, chan, msg, local_position_ned_cov->time_boot_ms, local_position_ned_cov->time_utc, local_position_ned_cov->estimator_type, local_position_ned_cov->x, local_position_ned_cov->y, local_position_ned_cov->z, local_position_ned_cov->vx, local_position_ned_cov->vy, local_position_ned_cov->vz, local_position_ned_cov->ax, local_position_ned_cov->ay, local_position_ned_cov->az, local_position_ned_cov->covariance); } /** * @brief Send a local_position_ned_cov message * @param chan MAVLink channel to send the message * - * @param time_boot_ms Timestamp (milliseconds since system boot) + * @param time_boot_ms Timestamp (milliseconds since system boot). 0 for system without monotonic timestamp * @param time_utc Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. * @param estimator_type Class id of the estimator this estimate originated from. * @param x X Position * @param y Y Position * @param z Z Position - * @param vx X Speed - * @param vy Y Speed - * @param vz Z Speed - * @param covariance Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.) + * @param vx X Speed (m/s) + * @param vy Y Speed (m/s) + * @param vz Z Speed (m/s) + * @param ax X Acceleration (m/s^2) + * @param ay Y Acceleration (m/s^2) + * @param az Z Acceleration (m/s^2) + * @param covariance Covariance matrix upper right triangular (first nine entries are the first ROW, next eight entries are the second row, etc.) */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_local_position_ned_cov_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t time_utc, uint8_t estimator_type, float x, float y, float z, float vx, float vy, float vz, const float *covariance) +static inline void mavlink_msg_local_position_ned_cov_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t time_utc, uint8_t estimator_type, float x, float y, float z, float vx, float vy, float vz, float ax, float ay, float az, const float *covariance) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN]; @@ -212,8 +239,11 @@ static inline void mavlink_msg_local_position_ned_cov_send(mavlink_channel_t cha _mav_put_float(buf, 24, vx); _mav_put_float(buf, 28, vy); _mav_put_float(buf, 32, vz); - _mav_put_uint8_t(buf, 180, estimator_type); - _mav_put_float_array(buf, 36, covariance, 36); + _mav_put_float(buf, 36, ax); + _mav_put_float(buf, 40, ay); + _mav_put_float(buf, 44, az); + _mav_put_uint8_t(buf, 228, estimator_type); + _mav_put_float_array(buf, 48, covariance, 45); #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV, buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC); #else @@ -229,8 +259,11 @@ static inline void mavlink_msg_local_position_ned_cov_send(mavlink_channel_t cha packet.vx = vx; packet.vy = vy; packet.vz = vz; + packet.ax = ax; + packet.ay = ay; + packet.az = az; packet.estimator_type = estimator_type; - mav_array_memcpy(packet.covariance, covariance, sizeof(float)*36); + mav_array_memcpy(packet.covariance, covariance, sizeof(float)*45); #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV, (const char *)&packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC); #else @@ -247,7 +280,7 @@ static inline void mavlink_msg_local_position_ned_cov_send(mavlink_channel_t cha 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_local_position_ned_cov_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t time_utc, uint8_t estimator_type, float x, float y, float z, float vx, float vy, float vz, const float *covariance) +static inline void mavlink_msg_local_position_ned_cov_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t time_utc, uint8_t estimator_type, float x, float y, float z, float vx, float vy, float vz, float ax, float ay, float az, const float *covariance) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -259,8 +292,11 @@ static inline void mavlink_msg_local_position_ned_cov_send_buf(mavlink_message_t _mav_put_float(buf, 24, vx); _mav_put_float(buf, 28, vy); _mav_put_float(buf, 32, vz); - _mav_put_uint8_t(buf, 180, estimator_type); - _mav_put_float_array(buf, 36, covariance, 36); + _mav_put_float(buf, 36, ax); + _mav_put_float(buf, 40, ay); + _mav_put_float(buf, 44, az); + _mav_put_uint8_t(buf, 228, estimator_type); + _mav_put_float_array(buf, 48, covariance, 45); #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV, buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC); #else @@ -276,8 +312,11 @@ static inline void mavlink_msg_local_position_ned_cov_send_buf(mavlink_message_t packet->vx = vx; packet->vy = vy; packet->vz = vz; + packet->ax = ax; + packet->ay = ay; + packet->az = az; packet->estimator_type = estimator_type; - mav_array_memcpy(packet->covariance, covariance, sizeof(float)*36); + mav_array_memcpy(packet->covariance, covariance, sizeof(float)*45); #if MAVLINK_CRC_EXTRA _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV, (const char *)packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC); #else @@ -295,7 +334,7 @@ static inline void mavlink_msg_local_position_ned_cov_send_buf(mavlink_message_t /** * @brief Get field time_boot_ms from local_position_ned_cov message * - * @return Timestamp (milliseconds since system boot) + * @return Timestamp (milliseconds since system boot). 0 for system without monotonic timestamp */ static inline uint32_t mavlink_msg_local_position_ned_cov_get_time_boot_ms(const mavlink_message_t* msg) { @@ -319,7 +358,7 @@ static inline uint64_t mavlink_msg_local_position_ned_cov_get_time_utc(const mav */ static inline uint8_t mavlink_msg_local_position_ned_cov_get_estimator_type(const mavlink_message_t* msg) { - return _MAV_RETURN_uint8_t(msg, 180); + return _MAV_RETURN_uint8_t(msg, 228); } /** @@ -355,7 +394,7 @@ static inline float mavlink_msg_local_position_ned_cov_get_z(const mavlink_messa /** * @brief Get field vx from local_position_ned_cov message * - * @return X Speed + * @return X Speed (m/s) */ static inline float mavlink_msg_local_position_ned_cov_get_vx(const mavlink_message_t* msg) { @@ -365,7 +404,7 @@ static inline float mavlink_msg_local_position_ned_cov_get_vx(const mavlink_mess /** * @brief Get field vy from local_position_ned_cov message * - * @return Y Speed + * @return Y Speed (m/s) */ static inline float mavlink_msg_local_position_ned_cov_get_vy(const mavlink_message_t* msg) { @@ -375,21 +414,51 @@ static inline float mavlink_msg_local_position_ned_cov_get_vy(const mavlink_mess /** * @brief Get field vz from local_position_ned_cov message * - * @return Z Speed + * @return Z Speed (m/s) */ static inline float mavlink_msg_local_position_ned_cov_get_vz(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 32); } +/** + * @brief Get field ax from local_position_ned_cov message + * + * @return X Acceleration (m/s^2) + */ +static inline float mavlink_msg_local_position_ned_cov_get_ax(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 36); +} + +/** + * @brief Get field ay from local_position_ned_cov message + * + * @return Y Acceleration (m/s^2) + */ +static inline float mavlink_msg_local_position_ned_cov_get_ay(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 40); +} + +/** + * @brief Get field az from local_position_ned_cov message + * + * @return Z Acceleration (m/s^2) + */ +static inline float mavlink_msg_local_position_ned_cov_get_az(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 44); +} + /** * @brief Get field covariance from local_position_ned_cov message * - * @return Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.) + * @return Covariance matrix upper right triangular (first nine entries are the first ROW, next eight entries are the second row, etc.) */ static inline uint16_t mavlink_msg_local_position_ned_cov_get_covariance(const mavlink_message_t* msg, float *covariance) { - return _MAV_RETURN_float_array(msg, covariance, 36, 36); + return _MAV_RETURN_float_array(msg, covariance, 45, 48); } /** @@ -409,6 +478,9 @@ static inline void mavlink_msg_local_position_ned_cov_decode(const mavlink_messa local_position_ned_cov->vx = mavlink_msg_local_position_ned_cov_get_vx(msg); local_position_ned_cov->vy = mavlink_msg_local_position_ned_cov_get_vy(msg); local_position_ned_cov->vz = mavlink_msg_local_position_ned_cov_get_vz(msg); + local_position_ned_cov->ax = mavlink_msg_local_position_ned_cov_get_ax(msg); + local_position_ned_cov->ay = mavlink_msg_local_position_ned_cov_get_ay(msg); + local_position_ned_cov->az = mavlink_msg_local_position_ned_cov_get_az(msg); mavlink_msg_local_position_ned_cov_get_covariance(msg, local_position_ned_cov->covariance); local_position_ned_cov->estimator_type = mavlink_msg_local_position_ned_cov_get_estimator_type(msg); #else diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned_system_global_offset.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned_system_global_offset.h index af7d195..e6d0766 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned_system_global_offset.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_local_position_ned_system_global_offset.h @@ -4,13 +4,13 @@ typedef struct __mavlink_local_position_ned_system_global_offset_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - float x; ///< X Position - float y; ///< Y Position - float z; ///< Z Position - float roll; ///< Roll - float pitch; ///< Pitch - float yaw; ///< Yaw + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + float x; /*< X Position*/ + float y; /*< Y Position*/ + float z; /*< Z Position*/ + float roll; /*< Roll*/ + float pitch; /*< Pitch*/ + float yaw; /*< Yaw*/ } mavlink_local_position_ned_system_global_offset_t; #define MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN 28 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_data.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_data.h index 48641f3..9caae57 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_data.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_data.h @@ -4,10 +4,10 @@ typedef struct __mavlink_log_data_t { - uint32_t ofs; ///< Offset into the log - uint16_t id; ///< Log id (from LOG_ENTRY reply) - uint8_t count; ///< Number of bytes (zero for end of log) - uint8_t data[90]; ///< log data + uint32_t ofs; /*< Offset into the log*/ + uint16_t id; /*< Log id (from LOG_ENTRY reply)*/ + uint8_t count; /*< Number of bytes (zero for end of log)*/ + uint8_t data[90]; /*< log data*/ } mavlink_log_data_t; #define MAVLINK_MSG_ID_LOG_DATA_LEN 97 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_entry.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_entry.h index 8ecaec3..4523516 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_entry.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_entry.h @@ -4,11 +4,11 @@ typedef struct __mavlink_log_entry_t { - uint32_t time_utc; ///< UTC timestamp of log in seconds since 1970, or 0 if not available - uint32_t size; ///< Size of the log (may be approximate) in bytes - uint16_t id; ///< Log id - uint16_t num_logs; ///< Total number of logs - uint16_t last_log_num; ///< High log number + uint32_t time_utc; /*< UTC timestamp of log in seconds since 1970, or 0 if not available*/ + uint32_t size; /*< Size of the log (may be approximate) in bytes*/ + uint16_t id; /*< Log id*/ + uint16_t num_logs; /*< Total number of logs*/ + uint16_t last_log_num; /*< High log number*/ } mavlink_log_entry_t; #define MAVLINK_MSG_ID_LOG_ENTRY_LEN 14 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_erase.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_erase.h index 957c4d4..06c58be 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_erase.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_erase.h @@ -4,8 +4,8 @@ typedef struct __mavlink_log_erase_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_log_erase_t; #define MAVLINK_MSG_ID_LOG_ERASE_LEN 2 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_data.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_data.h index ef5cbb6..0b52ea2 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_data.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_data.h @@ -4,11 +4,11 @@ typedef struct __mavlink_log_request_data_t { - uint32_t ofs; ///< Offset into the log - uint32_t count; ///< Number of bytes - uint16_t id; ///< Log id (from LOG_ENTRY reply) - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint32_t ofs; /*< Offset into the log*/ + uint32_t count; /*< Number of bytes*/ + uint16_t id; /*< Log id (from LOG_ENTRY reply)*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_log_request_data_t; #define MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN 12 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_end.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_end.h index 23fcca2..e4da542 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_end.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_end.h @@ -4,8 +4,8 @@ typedef struct __mavlink_log_request_end_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_log_request_end_t; #define MAVLINK_MSG_ID_LOG_REQUEST_END_LEN 2 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_list.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_list.h index e511b53..a4d5ea0 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_list.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_log_request_list.h @@ -4,10 +4,10 @@ typedef struct __mavlink_log_request_list_t { - uint16_t start; ///< First log id (0 for first available) - uint16_t end; ///< Last log id (0xffff for last available) - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint16_t start; /*< First log id (0 for first available)*/ + uint16_t end; /*< Last log id (0xffff for last available)*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_log_request_list_t; #define MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN 6 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_manual_control.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_manual_control.h index e93b759..69802bc 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_manual_control.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_manual_control.h @@ -4,12 +4,12 @@ typedef struct __mavlink_manual_control_t { - int16_t x; ///< X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle. - int16_t y; ///< Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. - int16_t z; ///< Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. - int16_t r; ///< R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. - uint16_t buttons; ///< A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. - uint8_t target; ///< The system to be controlled. + int16_t x; /*< X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.*/ + int16_t y; /*< Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.*/ + int16_t z; /*< Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust.*/ + int16_t r; /*< R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle.*/ + uint16_t buttons; /*< A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.*/ + uint8_t target; /*< The system to be controlled.*/ } mavlink_manual_control_t; #define MAVLINK_MSG_ID_MANUAL_CONTROL_LEN 11 @@ -42,7 +42,7 @@ typedef struct __mavlink_manual_control_t * @param target The system to be controlled. * @param x X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle. * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. - * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. + * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. * @param buttons A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. * @return length of the message in bytes (excluding serial stream start sign) @@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_ * @param target The system to be controlled. * @param x X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle. * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. - * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. + * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. * @param buttons A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. * @return length of the message in bytes (excluding serial stream start sign) @@ -162,7 +162,7 @@ static inline uint16_t mavlink_msg_manual_control_encode_chan(uint8_t system_id, * @param target The system to be controlled. * @param x X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle. * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. - * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. + * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. * @param buttons A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. */ @@ -281,7 +281,7 @@ static inline int16_t mavlink_msg_manual_control_get_y(const mavlink_message_t* /** * @brief Get field z from manual_control message * - * @return Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. + * @return Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. */ static inline int16_t mavlink_msg_manual_control_get_z(const mavlink_message_t* msg) { diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_manual_setpoint.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_manual_setpoint.h index b276267..dcb0ed0 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_manual_setpoint.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_manual_setpoint.h @@ -4,13 +4,13 @@ typedef struct __mavlink_manual_setpoint_t { - uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot - float roll; ///< Desired roll rate in radians per second - float pitch; ///< Desired pitch rate in radians per second - float yaw; ///< Desired yaw rate in radians per second - float thrust; ///< Collective thrust, normalized to 0 .. 1 - uint8_t mode_switch; ///< Flight mode switch position, 0.. 255 - uint8_t manual_override_switch; ///< Override mode switch position, 0.. 255 + uint32_t time_boot_ms; /*< Timestamp in milliseconds since system boot*/ + float roll; /*< Desired roll rate in radians per second*/ + float pitch; /*< Desired pitch rate in radians per second*/ + float yaw; /*< Desired yaw rate in radians per second*/ + float thrust; /*< Collective thrust, normalized to 0 .. 1*/ + uint8_t mode_switch; /*< Flight mode switch position, 0.. 255*/ + uint8_t manual_override_switch; /*< Override mode switch position, 0.. 255*/ } mavlink_manual_setpoint_t; #define MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN 22 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_memory_vect.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_memory_vect.h index 2eb60cc..bf63bc5 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_memory_vect.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_memory_vect.h @@ -4,10 +4,10 @@ typedef struct __mavlink_memory_vect_t { - uint16_t address; ///< Starting address of the debug variables - uint8_t ver; ///< Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below - uint8_t type; ///< Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14 - int8_t value[32]; ///< Memory contents at specified address + uint16_t address; /*< Starting address of the debug variables*/ + uint8_t ver; /*< Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below*/ + uint8_t type; /*< Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14*/ + int8_t value[32]; /*< Memory contents at specified address*/ } mavlink_memory_vect_t; #define MAVLINK_MSG_ID_MEMORY_VECT_LEN 36 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_message_interval.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_message_interval.h new file mode 100644 index 0000000..32c26be --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_message_interval.h @@ -0,0 +1,233 @@ +// MESSAGE MESSAGE_INTERVAL PACKING + +#define MAVLINK_MSG_ID_MESSAGE_INTERVAL 244 + +typedef struct __mavlink_message_interval_t +{ + int32_t interval_us; /*< The interval between two messages, in microseconds. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent.*/ + uint16_t message_id; /*< The ID of the requested MAVLink message. v1.0 is limited to 254 messages.*/ +} mavlink_message_interval_t; + +#define MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN 6 +#define MAVLINK_MSG_ID_244_LEN 6 + +#define MAVLINK_MSG_ID_MESSAGE_INTERVAL_CRC 95 +#define MAVLINK_MSG_ID_244_CRC 95 + + + +#define MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL { \ + "MESSAGE_INTERVAL", \ + 2, \ + { { "interval_us", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_message_interval_t, interval_us) }, \ + { "message_id", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_message_interval_t, message_id) }, \ + } \ +} + + +/** + * @brief Pack a message_interval 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 message_id The ID of the requested MAVLink message. v1.0 is limited to 254 messages. + * @param interval_us The interval between two messages, in microseconds. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_message_interval_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint16_t message_id, int32_t interval_us) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN]; + _mav_put_int32_t(buf, 0, interval_us); + _mav_put_uint16_t(buf, 4, message_id); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#else + mavlink_message_interval_t packet; + packet.interval_us = interval_us; + packet.message_id = message_id; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_MESSAGE_INTERVAL; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN, MAVLINK_MSG_ID_MESSAGE_INTERVAL_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#endif +} + +/** + * @brief Pack a message_interval 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 message_id The ID of the requested MAVLink message. v1.0 is limited to 254 messages. + * @param interval_us The interval between two messages, in microseconds. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_message_interval_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint16_t message_id,int32_t interval_us) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN]; + _mav_put_int32_t(buf, 0, interval_us); + _mav_put_uint16_t(buf, 4, message_id); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#else + mavlink_message_interval_t packet; + packet.interval_us = interval_us; + packet.message_id = message_id; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_MESSAGE_INTERVAL; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN, MAVLINK_MSG_ID_MESSAGE_INTERVAL_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#endif +} + +/** + * @brief Encode a message_interval 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 message_interval C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_message_interval_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_message_interval_t* message_interval) +{ + return mavlink_msg_message_interval_pack(system_id, component_id, msg, message_interval->message_id, message_interval->interval_us); +} + +/** + * @brief Encode a message_interval 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 message_interval C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_message_interval_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_message_interval_t* message_interval) +{ + return mavlink_msg_message_interval_pack_chan(system_id, component_id, chan, msg, message_interval->message_id, message_interval->interval_us); +} + +/** + * @brief Send a message_interval message + * @param chan MAVLink channel to send the message + * + * @param message_id The ID of the requested MAVLink message. v1.0 is limited to 254 messages. + * @param interval_us The interval between two messages, in microseconds. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_message_interval_send(mavlink_channel_t chan, uint16_t message_id, int32_t interval_us) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN]; + _mav_put_int32_t(buf, 0, interval_us); + _mav_put_uint16_t(buf, 4, message_id); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MESSAGE_INTERVAL, buf, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN, MAVLINK_MSG_ID_MESSAGE_INTERVAL_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MESSAGE_INTERVAL, buf, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#endif +#else + mavlink_message_interval_t packet; + packet.interval_us = interval_us; + packet.message_id = message_id; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MESSAGE_INTERVAL, (const char *)&packet, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN, MAVLINK_MSG_ID_MESSAGE_INTERVAL_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MESSAGE_INTERVAL, (const char *)&packet, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_MESSAGE_INTERVAL_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_message_interval_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t message_id, int32_t interval_us) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_int32_t(buf, 0, interval_us); + _mav_put_uint16_t(buf, 4, message_id); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MESSAGE_INTERVAL, buf, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN, MAVLINK_MSG_ID_MESSAGE_INTERVAL_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MESSAGE_INTERVAL, buf, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#endif +#else + mavlink_message_interval_t *packet = (mavlink_message_interval_t *)msgbuf; + packet->interval_us = interval_us; + packet->message_id = message_id; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MESSAGE_INTERVAL, (const char *)packet, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN, MAVLINK_MSG_ID_MESSAGE_INTERVAL_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MESSAGE_INTERVAL, (const char *)packet, MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE MESSAGE_INTERVAL UNPACKING + + +/** + * @brief Get field message_id from message_interval message + * + * @return The ID of the requested MAVLink message. v1.0 is limited to 254 messages. + */ +static inline uint16_t mavlink_msg_message_interval_get_message_id(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 4); +} + +/** + * @brief Get field interval_us from message_interval message + * + * @return The interval between two messages, in microseconds. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent. + */ +static inline int32_t mavlink_msg_message_interval_get_interval_us(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 0); +} + +/** + * @brief Decode a message_interval message into a struct + * + * @param msg The message to decode + * @param message_interval C-struct to decode the message contents into + */ +static inline void mavlink_msg_message_interval_decode(const mavlink_message_t* msg, mavlink_message_interval_t* message_interval) +{ +#if MAVLINK_NEED_BYTE_SWAP + message_interval->interval_us = mavlink_msg_message_interval_get_interval_us(msg); + message_interval->message_id = mavlink_msg_message_interval_get_message_id(msg); +#else + memcpy(message_interval, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MESSAGE_INTERVAL_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_ack.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_ack.h index 43afd00..357b3aa 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_ack.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_ack.h @@ -4,9 +4,9 @@ typedef struct __mavlink_mission_ack_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t type; ///< See MAV_MISSION_RESULT enum + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t type; /*< See MAV_MISSION_RESULT enum*/ } mavlink_mission_ack_t; #define MAVLINK_MSG_ID_MISSION_ACK_LEN 3 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_clear_all.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_clear_all.h index 1209868..32c065a 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_clear_all.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_clear_all.h @@ -4,8 +4,8 @@ typedef struct __mavlink_mission_clear_all_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_mission_clear_all_t; #define MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN 2 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_count.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_count.h index 7e4748e..991a2c2 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_count.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_count.h @@ -4,9 +4,9 @@ typedef struct __mavlink_mission_count_t { - uint16_t count; ///< Number of mission items in the sequence - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint16_t count; /*< Number of mission items in the sequence*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_mission_count_t; #define MAVLINK_MSG_ID_MISSION_COUNT_LEN 4 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_current.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_current.h index 201b7a6..942d02f 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_current.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_current.h @@ -4,7 +4,7 @@ typedef struct __mavlink_mission_current_t { - uint16_t seq; ///< Sequence + uint16_t seq; /*< Sequence*/ } mavlink_mission_current_t; #define MAVLINK_MSG_ID_MISSION_CURRENT_LEN 2 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item.h index ef9394f..367c265 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item.h @@ -4,20 +4,20 @@ typedef struct __mavlink_mission_item_t { - float param1; ///< PARAM1, see MAV_CMD enum - float param2; ///< PARAM2, see MAV_CMD enum - float param3; ///< PARAM3, see MAV_CMD enum - float param4; ///< PARAM4, see MAV_CMD enum - float x; ///< PARAM5 / local: x position, global: latitude - float y; ///< PARAM6 / y position: global: longitude - float z; ///< PARAM7 / z position: global: altitude (relative or absolute, depending on frame. - uint16_t seq; ///< Sequence - uint16_t command; ///< The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t frame; ///< The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h - uint8_t current; ///< false:0, true:1 - uint8_t autocontinue; ///< autocontinue to next wp + float param1; /*< PARAM1, see MAV_CMD enum*/ + float param2; /*< PARAM2, see MAV_CMD enum*/ + float param3; /*< PARAM3, see MAV_CMD enum*/ + float param4; /*< PARAM4, see MAV_CMD enum*/ + float x; /*< PARAM5 / local: x position, global: latitude*/ + float y; /*< PARAM6 / y position: global: longitude*/ + float z; /*< PARAM7 / z position: global: altitude (relative or absolute, depending on frame.*/ + uint16_t seq; /*< Sequence*/ + uint16_t command; /*< The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t frame; /*< The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h*/ + uint8_t current; /*< false:0, true:1*/ + uint8_t autocontinue; /*< autocontinue to next wp*/ } mavlink_mission_item_t; #define MAVLINK_MSG_ID_MISSION_ITEM_LEN 37 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item_int.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item_int.h index 58d102e..8d824be 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item_int.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item_int.h @@ -4,20 +4,20 @@ typedef struct __mavlink_mission_item_int_t { - float param1; ///< PARAM1, see MAV_CMD enum - float param2; ///< PARAM2, see MAV_CMD enum - float param3; ///< PARAM3, see MAV_CMD enum - float param4; ///< PARAM4, see MAV_CMD enum - int32_t x; ///< PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 - int32_t y; ///< PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7 - float z; ///< PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. - uint16_t seq; ///< Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4). - uint16_t command; ///< The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t frame; ///< The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h - uint8_t current; ///< false:0, true:1 - uint8_t autocontinue; ///< autocontinue to next wp + float param1; /*< PARAM1, see MAV_CMD enum*/ + float param2; /*< PARAM2, see MAV_CMD enum*/ + float param3; /*< PARAM3, see MAV_CMD enum*/ + float param4; /*< PARAM4, see MAV_CMD enum*/ + int32_t x; /*< PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7*/ + int32_t y; /*< PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7*/ + float z; /*< PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.*/ + uint16_t seq; /*< Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).*/ + uint16_t command; /*< The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t frame; /*< The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h*/ + uint8_t current; /*< false:0, true:1*/ + uint8_t autocontinue; /*< autocontinue to next wp*/ } mavlink_mission_item_int_t; #define MAVLINK_MSG_ID_MISSION_ITEM_INT_LEN 37 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item_reached.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item_reached.h index 9dfa280..88aa14c 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item_reached.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_item_reached.h @@ -4,7 +4,7 @@ typedef struct __mavlink_mission_item_reached_t { - uint16_t seq; ///< Sequence + uint16_t seq; /*< Sequence*/ } mavlink_mission_item_reached_t; #define MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN 2 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request.h index 29b0ef6..d034047 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request.h @@ -4,9 +4,9 @@ typedef struct __mavlink_mission_request_t { - uint16_t seq; ///< Sequence - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint16_t seq; /*< Sequence*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_mission_request_t; #define MAVLINK_MSG_ID_MISSION_REQUEST_LEN 4 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request_list.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request_list.h index a275348..8ab2929 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request_list.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request_list.h @@ -4,8 +4,8 @@ typedef struct __mavlink_mission_request_list_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_mission_request_list_t; #define MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN 2 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request_partial_list.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request_partial_list.h index 79a88dc..39d3cdf 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request_partial_list.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_request_partial_list.h @@ -4,10 +4,10 @@ typedef struct __mavlink_mission_request_partial_list_t { - int16_t start_index; ///< Start index, 0 by default - int16_t end_index; ///< End index, -1 by default (-1: send list to end). Else a valid index of the list - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + int16_t start_index; /*< Start index, 0 by default*/ + int16_t end_index; /*< End index, -1 by default (-1: send list to end). Else a valid index of the list*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_mission_request_partial_list_t; #define MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN 6 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_set_current.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_set_current.h index 0c2a3ad..0934dad 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_set_current.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_set_current.h @@ -4,9 +4,9 @@ typedef struct __mavlink_mission_set_current_t { - uint16_t seq; ///< Sequence - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint16_t seq; /*< Sequence*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_mission_set_current_t; #define MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN 4 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_write_partial_list.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_write_partial_list.h index 17a5a6b..8568c2b 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_write_partial_list.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_mission_write_partial_list.h @@ -4,10 +4,10 @@ typedef struct __mavlink_mission_write_partial_list_t { - int16_t start_index; ///< Start index, 0 by default and smaller / equal to the largest index of the current onboard list. - int16_t end_index; ///< End index, equal or greater than start index. - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + int16_t start_index; /*< Start index, 0 by default and smaller / equal to the largest index of the current onboard list.*/ + int16_t end_index; /*< End index, equal or greater than start index.*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_mission_write_partial_list_t; #define MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN 6 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_named_value_float.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_named_value_float.h index df82704..a5c73a0 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_named_value_float.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_named_value_float.h @@ -4,9 +4,9 @@ typedef struct __mavlink_named_value_float_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - float value; ///< Floating point value - char name[10]; ///< Name of the debug variable + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + float value; /*< Floating point value*/ + char name[10]; /*< Name of the debug variable*/ } mavlink_named_value_float_t; #define MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN 18 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_named_value_int.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_named_value_int.h index cfdd73d..97177c7 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_named_value_int.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_named_value_int.h @@ -4,9 +4,9 @@ typedef struct __mavlink_named_value_int_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - int32_t value; ///< Signed integer value - char name[10]; ///< Name of the debug variable + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + int32_t value; /*< Signed integer value*/ + char name[10]; /*< Name of the debug variable*/ } mavlink_named_value_int_t; #define MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN 18 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_nav_controller_output.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_nav_controller_output.h index b9a748b..1691d58 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_nav_controller_output.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_nav_controller_output.h @@ -4,14 +4,14 @@ typedef struct __mavlink_nav_controller_output_t { - float nav_roll; ///< Current desired roll in degrees - float nav_pitch; ///< Current desired pitch in degrees - float alt_error; ///< Current altitude error in meters - float aspd_error; ///< Current airspeed error in meters/second - float xtrack_error; ///< Current crosstrack error on x-y plane in meters - int16_t nav_bearing; ///< Current desired heading in degrees - int16_t target_bearing; ///< Bearing to current MISSION/target in degrees - uint16_t wp_dist; ///< Distance to active MISSION in meters + float nav_roll; /*< Current desired roll in degrees*/ + float nav_pitch; /*< Current desired pitch in degrees*/ + float alt_error; /*< Current altitude error in meters*/ + float aspd_error; /*< Current airspeed error in meters/second*/ + float xtrack_error; /*< Current crosstrack error on x-y plane in meters*/ + int16_t nav_bearing; /*< Current desired heading in degrees*/ + int16_t target_bearing; /*< Bearing to current MISSION/target in degrees*/ + uint16_t wp_dist; /*< Distance to active MISSION in meters*/ } mavlink_nav_controller_output_t; #define MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN 26 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_optical_flow.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_optical_flow.h index 6a2efc6..69d8493 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_optical_flow.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_optical_flow.h @@ -4,14 +4,14 @@ typedef struct __mavlink_optical_flow_t { - uint64_t time_usec; ///< Timestamp (UNIX) - float flow_comp_m_x; ///< Flow in meters in x-sensor direction, angular-speed compensated - float flow_comp_m_y; ///< Flow in meters in y-sensor direction, angular-speed compensated - float ground_distance; ///< Ground distance in meters. Positive value: distance known. Negative value: Unknown distance - int16_t flow_x; ///< Flow in pixels * 10 in x-sensor direction (dezi-pixels) - int16_t flow_y; ///< Flow in pixels * 10 in y-sensor direction (dezi-pixels) - uint8_t sensor_id; ///< Sensor ID - uint8_t quality; ///< Optical flow quality / confidence. 0: bad, 255: maximum quality + uint64_t time_usec; /*< Timestamp (UNIX)*/ + float flow_comp_m_x; /*< Flow in meters in x-sensor direction, angular-speed compensated*/ + float flow_comp_m_y; /*< Flow in meters in y-sensor direction, angular-speed compensated*/ + float ground_distance; /*< Ground distance in meters. Positive value: distance known. Negative value: Unknown distance*/ + int16_t flow_x; /*< Flow in pixels * 10 in x-sensor direction (dezi-pixels)*/ + int16_t flow_y; /*< Flow in pixels * 10 in y-sensor direction (dezi-pixels)*/ + uint8_t sensor_id; /*< Sensor ID*/ + uint8_t quality; /*< Optical flow quality / confidence. 0: bad, 255: maximum quality*/ } mavlink_optical_flow_t; #define MAVLINK_MSG_ID_OPTICAL_FLOW_LEN 26 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_optical_flow_rad.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_optical_flow_rad.h index 427b56a..7d07703 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_optical_flow_rad.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_optical_flow_rad.h @@ -4,18 +4,18 @@ typedef struct __mavlink_optical_flow_rad_t { - uint64_t time_usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot) - uint32_t integration_time_us; ///< Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. - float integrated_x; ///< Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) - float integrated_y; ///< Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) - float integrated_xgyro; ///< RH rotation around X axis (rad) - float integrated_ygyro; ///< RH rotation around Y axis (rad) - float integrated_zgyro; ///< RH rotation around Z axis (rad) - uint32_t time_delta_distance_us; ///< Time in microseconds since the distance was sampled. - float distance; ///< Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance. - int16_t temperature; ///< Temperature * 100 in centi-degrees Celsius - uint8_t sensor_id; ///< Sensor ID - uint8_t quality; ///< Optical flow quality / confidence. 0: no valid flow, 255: maximum quality + uint64_t time_usec; /*< Timestamp (microseconds, synced to UNIX time or since system boot)*/ + uint32_t integration_time_us; /*< Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the.*/ + float integrated_x; /*< Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)*/ + float integrated_y; /*< Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)*/ + float integrated_xgyro; /*< RH rotation around X axis (rad)*/ + float integrated_ygyro; /*< RH rotation around Y axis (rad)*/ + float integrated_zgyro; /*< RH rotation around Z axis (rad)*/ + uint32_t time_delta_distance_us; /*< Time in microseconds since the distance was sampled.*/ + float distance; /*< Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance.*/ + int16_t temperature; /*< Temperature * 100 in centi-degrees Celsius*/ + uint8_t sensor_id; /*< Sensor ID*/ + uint8_t quality; /*< Optical flow quality / confidence. 0: no valid flow, 255: maximum quality*/ } mavlink_optical_flow_rad_t; #define MAVLINK_MSG_ID_OPTICAL_FLOW_RAD_LEN 44 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_map_rc.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_map_rc.h index 8f6ee0e..e4b7483 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_map_rc.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_map_rc.h @@ -4,15 +4,15 @@ typedef struct __mavlink_param_map_rc_t { - float param_value0; ///< Initial parameter value - float scale; ///< Scale, maps the RC range [-1, 1] to a parameter value - float param_value_min; ///< Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation) - float param_value_max; ///< Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation) - int16_t param_index; ///< Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index. - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - char param_id[16]; ///< Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - uint8_t parameter_rc_channel_index; ///< Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC. + float param_value0; /*< Initial parameter value*/ + float scale; /*< Scale, maps the RC range [-1, 1] to a parameter value*/ + float param_value_min; /*< Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)*/ + float param_value_max; /*< Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)*/ + int16_t param_index; /*< Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index.*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + char param_id[16]; /*< Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string*/ + uint8_t parameter_rc_channel_index; /*< Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC.*/ } mavlink_param_map_rc_t; #define MAVLINK_MSG_ID_PARAM_MAP_RC_LEN 37 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_request_list.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_request_list.h index f9466b0..f78f049 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_request_list.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_request_list.h @@ -4,8 +4,8 @@ typedef struct __mavlink_param_request_list_t { - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_param_request_list_t; #define MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN 2 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_request_read.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_request_read.h index 730cff0..497f598 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_request_read.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_request_read.h @@ -4,10 +4,10 @@ typedef struct __mavlink_param_request_read_t { - int16_t param_index; ///< Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored) - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - char param_id[16]; ///< Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string + int16_t param_index; /*< Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + char param_id[16]; /*< Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string*/ } mavlink_param_request_read_t; #define MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN 20 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_set.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_set.h index f669af1..471e674 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_set.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_set.h @@ -4,11 +4,11 @@ typedef struct __mavlink_param_set_t { - float param_value; ///< Onboard parameter value - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - char param_id[16]; ///< Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - uint8_t param_type; ///< Onboard parameter type: see the MAV_PARAM_TYPE enum for supported data types. + float param_value; /*< Onboard parameter value*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + char param_id[16]; /*< Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string*/ + uint8_t param_type; /*< Onboard parameter type: see the MAV_PARAM_TYPE enum for supported data types.*/ } mavlink_param_set_t; #define MAVLINK_MSG_ID_PARAM_SET_LEN 23 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_value.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_value.h index c279579..856fa5a 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_value.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_param_value.h @@ -4,11 +4,11 @@ typedef struct __mavlink_param_value_t { - float param_value; ///< Onboard parameter value - uint16_t param_count; ///< Total number of onboard parameters - uint16_t param_index; ///< Index of this onboard parameter - char param_id[16]; ///< Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - uint8_t param_type; ///< Onboard parameter type: see the MAV_PARAM_TYPE enum for supported data types. + float param_value; /*< Onboard parameter value*/ + uint16_t param_count; /*< Total number of onboard parameters*/ + uint16_t param_index; /*< Index of this onboard parameter*/ + char param_id[16]; /*< Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string*/ + uint8_t param_type; /*< Onboard parameter type: see the MAV_PARAM_TYPE enum for supported data types.*/ } mavlink_param_value_t; #define MAVLINK_MSG_ID_PARAM_VALUE_LEN 25 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_ping.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_ping.h index 6564ed0..8664675 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_ping.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_ping.h @@ -4,10 +4,10 @@ typedef struct __mavlink_ping_t { - uint64_t time_usec; ///< Unix timestamp in microseconds or since system boot if smaller than MAVLink epoch (1.1.2009) - uint32_t seq; ///< PING sequence - uint8_t target_system; ///< 0: request ping from all receiving systems, if greater than 0: message is a ping response and number is the system id of the requesting system - uint8_t target_component; ///< 0: request ping from all receiving components, if greater than 0: message is a ping response and number is the system id of the requesting system + uint64_t time_usec; /*< Unix timestamp in microseconds or since system boot if smaller than MAVLink epoch (1.1.2009)*/ + uint32_t seq; /*< PING sequence*/ + uint8_t target_system; /*< 0: request ping from all receiving systems, if greater than 0: message is a ping response and number is the system id of the requesting system*/ + uint8_t target_component; /*< 0: request ping from all receiving components, if greater than 0: message is a ping response and number is the system id of the requesting system*/ } mavlink_ping_t; #define MAVLINK_MSG_ID_PING_LEN 14 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_position_target_global_int.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_position_target_global_int.h index b960146..8416362 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_position_target_global_int.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_position_target_global_int.h @@ -4,20 +4,20 @@ typedef struct __mavlink_position_target_global_int_t { - uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot. The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. - int32_t lat_int; ///< X Position in WGS84 frame in 1e7 * meters - int32_t lon_int; ///< Y Position in WGS84 frame in 1e7 * meters - float alt; ///< Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT - float vx; ///< X velocity in NED frame in meter / s - float vy; ///< Y velocity in NED frame in meter / s - float vz; ///< Z velocity in NED frame in meter / s - float afx; ///< X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float afy; ///< Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float afz; ///< Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float yaw; ///< yaw setpoint in rad - float yaw_rate; ///< yaw rate setpoint in rad/s - uint16_t type_mask; ///< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate - uint8_t coordinate_frame; ///< Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 + uint32_t time_boot_ms; /*< Timestamp in milliseconds since system boot. The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency.*/ + int32_t lat_int; /*< X Position in WGS84 frame in 1e7 * meters*/ + int32_t lon_int; /*< Y Position in WGS84 frame in 1e7 * meters*/ + float alt; /*< Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT*/ + float vx; /*< X velocity in NED frame in meter / s*/ + float vy; /*< Y velocity in NED frame in meter / s*/ + float vz; /*< Z velocity in NED frame in meter / s*/ + float afx; /*< X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float afy; /*< Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float afz; /*< Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float yaw; /*< yaw setpoint in rad*/ + float yaw_rate; /*< yaw rate setpoint in rad/s*/ + uint16_t type_mask; /*< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate*/ + uint8_t coordinate_frame; /*< Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11*/ } mavlink_position_target_global_int_t; #define MAVLINK_MSG_ID_POSITION_TARGET_GLOBAL_INT_LEN 51 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_position_target_local_ned.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_position_target_local_ned.h index d23d445..9099159 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_position_target_local_ned.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_position_target_local_ned.h @@ -4,20 +4,20 @@ typedef struct __mavlink_position_target_local_ned_t { - uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot - float x; ///< X Position in NED frame in meters - float y; ///< Y Position in NED frame in meters - float z; ///< Z Position in NED frame in meters (note, altitude is negative in NED) - float vx; ///< X velocity in NED frame in meter / s - float vy; ///< Y velocity in NED frame in meter / s - float vz; ///< Z velocity in NED frame in meter / s - float afx; ///< X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float afy; ///< Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float afz; ///< Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float yaw; ///< yaw setpoint in rad - float yaw_rate; ///< yaw rate setpoint in rad/s - uint16_t type_mask; ///< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate - uint8_t coordinate_frame; ///< Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 + uint32_t time_boot_ms; /*< Timestamp in milliseconds since system boot*/ + float x; /*< X Position in NED frame in meters*/ + float y; /*< Y Position in NED frame in meters*/ + float z; /*< Z Position in NED frame in meters (note, altitude is negative in NED)*/ + float vx; /*< X velocity in NED frame in meter / s*/ + float vy; /*< Y velocity in NED frame in meter / s*/ + float vz; /*< Z velocity in NED frame in meter / s*/ + float afx; /*< X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float afy; /*< Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float afz; /*< Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float yaw; /*< yaw setpoint in rad*/ + float yaw_rate; /*< yaw rate setpoint in rad/s*/ + uint16_t type_mask; /*< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate*/ + uint8_t coordinate_frame; /*< Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9*/ } mavlink_position_target_local_ned_t; #define MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED_LEN 51 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_power_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_power_status.h index 1a6259a..ffe8c84 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_power_status.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_power_status.h @@ -4,9 +4,9 @@ typedef struct __mavlink_power_status_t { - uint16_t Vcc; ///< 5V rail voltage in millivolts - uint16_t Vservo; ///< servo rail voltage in millivolts - uint16_t flags; ///< power supply status flags (see MAV_POWER_STATUS enum) + uint16_t Vcc; /*< 5V rail voltage in millivolts*/ + uint16_t Vservo; /*< servo rail voltage in millivolts*/ + uint16_t flags; /*< power supply status flags (see MAV_POWER_STATUS enum)*/ } mavlink_power_status_t; #define MAVLINK_MSG_ID_POWER_STATUS_LEN 6 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_radio_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_radio_status.h index dbd187e..ebb8b67 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_radio_status.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_radio_status.h @@ -4,13 +4,13 @@ typedef struct __mavlink_radio_status_t { - uint16_t rxerrors; ///< Receive errors - uint16_t fixed; ///< Count of error corrected packets - uint8_t rssi; ///< Local signal strength - uint8_t remrssi; ///< Remote signal strength - uint8_t txbuf; ///< Remaining free buffer space in percent. - uint8_t noise; ///< Background noise level - uint8_t remnoise; ///< Remote background noise level + uint16_t rxerrors; /*< Receive errors*/ + uint16_t fixed; /*< Count of error corrected packets*/ + uint8_t rssi; /*< Local signal strength*/ + uint8_t remrssi; /*< Remote signal strength*/ + uint8_t txbuf; /*< Remaining free buffer space in percent.*/ + uint8_t noise; /*< Background noise level*/ + uint8_t remnoise; /*< Remote background noise level*/ } mavlink_radio_status_t; #define MAVLINK_MSG_ID_RADIO_STATUS_LEN 9 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_raw_imu.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_raw_imu.h index a98e8ce..212ad73 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_raw_imu.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_raw_imu.h @@ -4,16 +4,16 @@ typedef struct __mavlink_raw_imu_t { - uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot) - int16_t xacc; ///< X acceleration (raw) - int16_t yacc; ///< Y acceleration (raw) - int16_t zacc; ///< Z acceleration (raw) - int16_t xgyro; ///< Angular speed around X axis (raw) - int16_t ygyro; ///< Angular speed around Y axis (raw) - int16_t zgyro; ///< Angular speed around Z axis (raw) - int16_t xmag; ///< X Magnetic field (raw) - int16_t ymag; ///< Y Magnetic field (raw) - int16_t zmag; ///< Z Magnetic field (raw) + uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/ + int16_t xacc; /*< X acceleration (raw)*/ + int16_t yacc; /*< Y acceleration (raw)*/ + int16_t zacc; /*< Z acceleration (raw)*/ + int16_t xgyro; /*< Angular speed around X axis (raw)*/ + int16_t ygyro; /*< Angular speed around Y axis (raw)*/ + int16_t zgyro; /*< Angular speed around Z axis (raw)*/ + int16_t xmag; /*< X Magnetic field (raw)*/ + int16_t ymag; /*< Y Magnetic field (raw)*/ + int16_t zmag; /*< Z Magnetic field (raw)*/ } mavlink_raw_imu_t; #define MAVLINK_MSG_ID_RAW_IMU_LEN 26 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_raw_pressure.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_raw_pressure.h index 6bd37fc..f17ad48 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_raw_pressure.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_raw_pressure.h @@ -4,11 +4,11 @@ typedef struct __mavlink_raw_pressure_t { - uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot) - int16_t press_abs; ///< Absolute pressure (raw) - int16_t press_diff1; ///< Differential pressure 1 (raw) - int16_t press_diff2; ///< Differential pressure 2 (raw) - int16_t temperature; ///< Raw Temperature measurement (raw) + uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/ + int16_t press_abs; /*< Absolute pressure (raw)*/ + int16_t press_diff1; /*< Differential pressure 1 (raw, 0 if nonexistant)*/ + int16_t press_diff2; /*< Differential pressure 2 (raw, 0 if nonexistant)*/ + int16_t temperature; /*< Raw Temperature measurement (raw)*/ } mavlink_raw_pressure_t; #define MAVLINK_MSG_ID_RAW_PRESSURE_LEN 16 @@ -39,8 +39,8 @@ typedef struct __mavlink_raw_pressure_t * * @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot) * @param press_abs Absolute pressure (raw) - * @param press_diff1 Differential pressure 1 (raw) - * @param press_diff2 Differential pressure 2 (raw) + * @param press_diff1 Differential pressure 1 (raw, 0 if nonexistant) + * @param press_diff2 Differential pressure 2 (raw, 0 if nonexistant) * @param temperature Raw Temperature measurement (raw) * @return length of the message in bytes (excluding serial stream start sign) */ @@ -83,8 +83,8 @@ static inline uint16_t mavlink_msg_raw_pressure_pack(uint8_t system_id, uint8_t * @param msg The MAVLink message to compress the data into * @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot) * @param press_abs Absolute pressure (raw) - * @param press_diff1 Differential pressure 1 (raw) - * @param press_diff2 Differential pressure 2 (raw) + * @param press_diff1 Differential pressure 1 (raw, 0 if nonexistant) + * @param press_diff2 Differential pressure 2 (raw, 0 if nonexistant) * @param temperature Raw Temperature measurement (raw) * @return length of the message in bytes (excluding serial stream start sign) */ @@ -153,8 +153,8 @@ static inline uint16_t mavlink_msg_raw_pressure_encode_chan(uint8_t system_id, u * * @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot) * @param press_abs Absolute pressure (raw) - * @param press_diff1 Differential pressure 1 (raw) - * @param press_diff2 Differential pressure 2 (raw) + * @param press_diff1 Differential pressure 1 (raw, 0 if nonexistant) + * @param press_diff2 Differential pressure 2 (raw, 0 if nonexistant) * @param temperature Raw Temperature measurement (raw) */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -258,7 +258,7 @@ static inline int16_t mavlink_msg_raw_pressure_get_press_abs(const mavlink_messa /** * @brief Get field press_diff1 from raw_pressure message * - * @return Differential pressure 1 (raw) + * @return Differential pressure 1 (raw, 0 if nonexistant) */ static inline int16_t mavlink_msg_raw_pressure_get_press_diff1(const mavlink_message_t* msg) { @@ -268,7 +268,7 @@ static inline int16_t mavlink_msg_raw_pressure_get_press_diff1(const mavlink_mes /** * @brief Get field press_diff2 from raw_pressure message * - * @return Differential pressure 2 (raw) + * @return Differential pressure 2 (raw, 0 if nonexistant) */ static inline int16_t mavlink_msg_raw_pressure_get_press_diff2(const mavlink_message_t* msg) { diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels.h index 479af12..b4ece26 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels.h @@ -4,27 +4,27 @@ typedef struct __mavlink_rc_channels_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - uint16_t chan1_raw; ///< RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan2_raw; ///< RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan3_raw; ///< RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan4_raw; ///< RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan5_raw; ///< RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan6_raw; ///< RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan7_raw; ///< RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan8_raw; ///< RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan9_raw; ///< RC channel 9 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan10_raw; ///< RC channel 10 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan11_raw; ///< RC channel 11 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan12_raw; ///< RC channel 12 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan13_raw; ///< RC channel 13 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan14_raw; ///< RC channel 14 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan15_raw; ///< RC channel 15 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan16_raw; ///< RC channel 16 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan17_raw; ///< RC channel 17 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan18_raw; ///< RC channel 18 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint8_t chancount; ///< Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available. - uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + uint16_t chan1_raw; /*< RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan2_raw; /*< RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan3_raw; /*< RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan4_raw; /*< RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan5_raw; /*< RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan6_raw; /*< RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan7_raw; /*< RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan8_raw; /*< RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan9_raw; /*< RC channel 9 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan10_raw; /*< RC channel 10 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan11_raw; /*< RC channel 11 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan12_raw; /*< RC channel 12 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan13_raw; /*< RC channel 13 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan14_raw; /*< RC channel 14 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan15_raw; /*< RC channel 15 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan16_raw; /*< RC channel 16 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan17_raw; /*< RC channel 17 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan18_raw; /*< RC channel 18 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint8_t chancount; /*< Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available.*/ + uint8_t rssi; /*< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.*/ } mavlink_rc_channels_t; #define MAVLINK_MSG_ID_RC_CHANNELS_LEN 42 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_override.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_override.h index 15d4c6f..0324706 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_override.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_override.h @@ -4,16 +4,16 @@ typedef struct __mavlink_rc_channels_override_t { - uint16_t chan1_raw; ///< RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field. - uint16_t chan2_raw; ///< RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field. - uint16_t chan3_raw; ///< RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field. - uint16_t chan4_raw; ///< RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field. - uint16_t chan5_raw; ///< RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field. - uint16_t chan6_raw; ///< RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field. - uint16_t chan7_raw; ///< RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field. - uint16_t chan8_raw; ///< RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field. - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint16_t chan1_raw; /*< RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field.*/ + uint16_t chan2_raw; /*< RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field.*/ + uint16_t chan3_raw; /*< RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field.*/ + uint16_t chan4_raw; /*< RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field.*/ + uint16_t chan5_raw; /*< RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field.*/ + uint16_t chan6_raw; /*< RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field.*/ + uint16_t chan7_raw; /*< RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field.*/ + uint16_t chan8_raw; /*< RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field.*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_rc_channels_override_t; #define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN 18 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_raw.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_raw.h index d75a593..d9ba874 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_raw.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_raw.h @@ -4,17 +4,17 @@ typedef struct __mavlink_rc_channels_raw_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - uint16_t chan1_raw; ///< RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan2_raw; ///< RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan3_raw; ///< RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan4_raw; ///< RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan5_raw; ///< RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan6_raw; ///< RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan7_raw; ///< RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint16_t chan8_raw; ///< RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused. - uint8_t port; ///< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. - uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + uint16_t chan1_raw; /*< RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan2_raw; /*< RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan3_raw; /*< RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan4_raw; /*< RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan5_raw; /*< RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan6_raw; /*< RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan7_raw; /*< RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint16_t chan8_raw; /*< RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.*/ + uint8_t port; /*< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos.*/ + uint8_t rssi; /*< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.*/ } mavlink_rc_channels_raw_t; #define MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN 22 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_scaled.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_scaled.h index f400f98..c9d0c17 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_scaled.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_rc_channels_scaled.h @@ -4,17 +4,17 @@ typedef struct __mavlink_rc_channels_scaled_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - int16_t chan1_scaled; ///< RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. - int16_t chan2_scaled; ///< RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. - int16_t chan3_scaled; ///< RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. - int16_t chan4_scaled; ///< RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. - int16_t chan5_scaled; ///< RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. - int16_t chan6_scaled; ///< RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. - int16_t chan7_scaled; ///< RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. - int16_t chan8_scaled; ///< RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. - uint8_t port; ///< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. - uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + int16_t chan1_scaled; /*< RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.*/ + int16_t chan2_scaled; /*< RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.*/ + int16_t chan3_scaled; /*< RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.*/ + int16_t chan4_scaled; /*< RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.*/ + int16_t chan5_scaled; /*< RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.*/ + int16_t chan6_scaled; /*< RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.*/ + int16_t chan7_scaled; /*< RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.*/ + int16_t chan8_scaled; /*< RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.*/ + uint8_t port; /*< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos.*/ + uint8_t rssi; /*< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.*/ } mavlink_rc_channels_scaled_t; #define MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN 22 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_request_data_stream.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_request_data_stream.h index 2ebcc54..c03c76a 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_request_data_stream.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_request_data_stream.h @@ -4,11 +4,11 @@ typedef struct __mavlink_request_data_stream_t { - uint16_t req_message_rate; ///< The requested interval between two messages of this type - uint8_t target_system; ///< The target requested to send the message stream. - uint8_t target_component; ///< The target requested to send the message stream. - uint8_t req_stream_id; ///< The ID of the requested data stream - uint8_t start_stop; ///< 1 to start sending, 0 to stop sending. + uint16_t req_message_rate; /*< The requested message rate*/ + uint8_t target_system; /*< The target requested to send the message stream.*/ + uint8_t target_component; /*< The target requested to send the message stream.*/ + uint8_t req_stream_id; /*< The ID of the requested data stream*/ + uint8_t start_stop; /*< 1 to start sending, 0 to stop sending.*/ } mavlink_request_data_stream_t; #define MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN 6 @@ -40,7 +40,7 @@ typedef struct __mavlink_request_data_stream_t * @param target_system The target requested to send the message stream. * @param target_component The target requested to send the message stream. * @param req_stream_id The ID of the requested data stream - * @param req_message_rate The requested interval between two messages of this type + * @param req_message_rate The requested message rate * @param start_stop 1 to start sending, 0 to stop sending. * @return length of the message in bytes (excluding serial stream start sign) */ @@ -84,7 +84,7 @@ static inline uint16_t mavlink_msg_request_data_stream_pack(uint8_t system_id, u * @param target_system The target requested to send the message stream. * @param target_component The target requested to send the message stream. * @param req_stream_id The ID of the requested data stream - * @param req_message_rate The requested interval between two messages of this type + * @param req_message_rate The requested message rate * @param start_stop 1 to start sending, 0 to stop sending. * @return length of the message in bytes (excluding serial stream start sign) */ @@ -154,7 +154,7 @@ static inline uint16_t mavlink_msg_request_data_stream_encode_chan(uint8_t syste * @param target_system The target requested to send the message stream. * @param target_component The target requested to send the message stream. * @param req_stream_id The ID of the requested data stream - * @param req_message_rate The requested interval between two messages of this type + * @param req_message_rate The requested message rate * @param start_stop 1 to start sending, 0 to stop sending. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -268,7 +268,7 @@ static inline uint8_t mavlink_msg_request_data_stream_get_req_stream_id(const ma /** * @brief Get field req_message_rate from request_data_stream message * - * @return The requested interval between two messages of this type + * @return The requested message rate */ static inline uint16_t mavlink_msg_request_data_stream_get_req_message_rate(const mavlink_message_t* msg) { diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_resource_request.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_resource_request.h new file mode 100644 index 0000000..3cbb560 --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_resource_request.h @@ -0,0 +1,298 @@ +// MESSAGE RESOURCE_REQUEST PACKING + +#define MAVLINK_MSG_ID_RESOURCE_REQUEST 142 + +typedef struct __mavlink_resource_request_t +{ + uint8_t request_id; /*< Request ID. This ID should be re-used when sending back URI contents*/ + uint8_t uri_type; /*< The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary*/ + uint8_t uri[120]; /*< The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)*/ + uint8_t transfer_type; /*< The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream.*/ + uint8_t storage[120]; /*< The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP).*/ +} mavlink_resource_request_t; + +#define MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN 243 +#define MAVLINK_MSG_ID_142_LEN 243 + +#define MAVLINK_MSG_ID_RESOURCE_REQUEST_CRC 72 +#define MAVLINK_MSG_ID_142_CRC 72 + +#define MAVLINK_MSG_RESOURCE_REQUEST_FIELD_URI_LEN 120 +#define MAVLINK_MSG_RESOURCE_REQUEST_FIELD_STORAGE_LEN 120 + +#define MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST { \ + "RESOURCE_REQUEST", \ + 5, \ + { { "request_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_resource_request_t, request_id) }, \ + { "uri_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_resource_request_t, uri_type) }, \ + { "uri", NULL, MAVLINK_TYPE_UINT8_T, 120, 2, offsetof(mavlink_resource_request_t, uri) }, \ + { "transfer_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 122, offsetof(mavlink_resource_request_t, transfer_type) }, \ + { "storage", NULL, MAVLINK_TYPE_UINT8_T, 120, 123, offsetof(mavlink_resource_request_t, storage) }, \ + } \ +} + + +/** + * @brief Pack a resource_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 request_id Request ID. This ID should be re-used when sending back URI contents + * @param uri_type The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary + * @param uri The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum) + * @param transfer_type The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream. + * @param storage The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_resource_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t request_id, uint8_t uri_type, const uint8_t *uri, uint8_t transfer_type, const uint8_t *storage) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN]; + _mav_put_uint8_t(buf, 0, request_id); + _mav_put_uint8_t(buf, 1, uri_type); + _mav_put_uint8_t(buf, 122, transfer_type); + _mav_put_uint8_t_array(buf, 2, uri, 120); + _mav_put_uint8_t_array(buf, 123, storage, 120); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#else + mavlink_resource_request_t packet; + packet.request_id = request_id; + packet.uri_type = uri_type; + packet.transfer_type = transfer_type; + mav_array_memcpy(packet.uri, uri, sizeof(uint8_t)*120); + mav_array_memcpy(packet.storage, storage, sizeof(uint8_t)*120); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_RESOURCE_REQUEST; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN, MAVLINK_MSG_ID_RESOURCE_REQUEST_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#endif +} + +/** + * @brief Pack a resource_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 request_id Request ID. This ID should be re-used when sending back URI contents + * @param uri_type The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary + * @param uri The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum) + * @param transfer_type The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream. + * @param storage The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_resource_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t request_id,uint8_t uri_type,const uint8_t *uri,uint8_t transfer_type,const uint8_t *storage) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN]; + _mav_put_uint8_t(buf, 0, request_id); + _mav_put_uint8_t(buf, 1, uri_type); + _mav_put_uint8_t(buf, 122, transfer_type); + _mav_put_uint8_t_array(buf, 2, uri, 120); + _mav_put_uint8_t_array(buf, 123, storage, 120); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#else + mavlink_resource_request_t packet; + packet.request_id = request_id; + packet.uri_type = uri_type; + packet.transfer_type = transfer_type; + mav_array_memcpy(packet.uri, uri, sizeof(uint8_t)*120); + mav_array_memcpy(packet.storage, storage, sizeof(uint8_t)*120); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_RESOURCE_REQUEST; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN, MAVLINK_MSG_ID_RESOURCE_REQUEST_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#endif +} + +/** + * @brief Encode a resource_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 resource_request C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_resource_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_resource_request_t* resource_request) +{ + return mavlink_msg_resource_request_pack(system_id, component_id, msg, resource_request->request_id, resource_request->uri_type, resource_request->uri, resource_request->transfer_type, resource_request->storage); +} + +/** + * @brief Encode a resource_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 resource_request C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_resource_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_resource_request_t* resource_request) +{ + return mavlink_msg_resource_request_pack_chan(system_id, component_id, chan, msg, resource_request->request_id, resource_request->uri_type, resource_request->uri, resource_request->transfer_type, resource_request->storage); +} + +/** + * @brief Send a resource_request message + * @param chan MAVLink channel to send the message + * + * @param request_id Request ID. This ID should be re-used when sending back URI contents + * @param uri_type The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary + * @param uri The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum) + * @param transfer_type The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream. + * @param storage The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP). + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_resource_request_send(mavlink_channel_t chan, uint8_t request_id, uint8_t uri_type, const uint8_t *uri, uint8_t transfer_type, const uint8_t *storage) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN]; + _mav_put_uint8_t(buf, 0, request_id); + _mav_put_uint8_t(buf, 1, uri_type); + _mav_put_uint8_t(buf, 122, transfer_type); + _mav_put_uint8_t_array(buf, 2, uri, 120); + _mav_put_uint8_t_array(buf, 123, storage, 120); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESOURCE_REQUEST, buf, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN, MAVLINK_MSG_ID_RESOURCE_REQUEST_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESOURCE_REQUEST, buf, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#endif +#else + mavlink_resource_request_t packet; + packet.request_id = request_id; + packet.uri_type = uri_type; + packet.transfer_type = transfer_type; + mav_array_memcpy(packet.uri, uri, sizeof(uint8_t)*120); + mav_array_memcpy(packet.storage, storage, sizeof(uint8_t)*120); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESOURCE_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN, MAVLINK_MSG_ID_RESOURCE_REQUEST_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESOURCE_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_RESOURCE_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_resource_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t request_id, uint8_t uri_type, const uint8_t *uri, uint8_t transfer_type, const uint8_t *storage) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint8_t(buf, 0, request_id); + _mav_put_uint8_t(buf, 1, uri_type); + _mav_put_uint8_t(buf, 122, transfer_type); + _mav_put_uint8_t_array(buf, 2, uri, 120); + _mav_put_uint8_t_array(buf, 123, storage, 120); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESOURCE_REQUEST, buf, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN, MAVLINK_MSG_ID_RESOURCE_REQUEST_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESOURCE_REQUEST, buf, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#endif +#else + mavlink_resource_request_t *packet = (mavlink_resource_request_t *)msgbuf; + packet->request_id = request_id; + packet->uri_type = uri_type; + packet->transfer_type = transfer_type; + mav_array_memcpy(packet->uri, uri, sizeof(uint8_t)*120); + mav_array_memcpy(packet->storage, storage, sizeof(uint8_t)*120); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESOURCE_REQUEST, (const char *)packet, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN, MAVLINK_MSG_ID_RESOURCE_REQUEST_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESOURCE_REQUEST, (const char *)packet, MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE RESOURCE_REQUEST UNPACKING + + +/** + * @brief Get field request_id from resource_request message + * + * @return Request ID. This ID should be re-used when sending back URI contents + */ +static inline uint8_t mavlink_msg_resource_request_get_request_id(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 0); +} + +/** + * @brief Get field uri_type from resource_request message + * + * @return The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary + */ +static inline uint8_t mavlink_msg_resource_request_get_uri_type(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + +/** + * @brief Get field uri from resource_request message + * + * @return The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum) + */ +static inline uint16_t mavlink_msg_resource_request_get_uri(const mavlink_message_t* msg, uint8_t *uri) +{ + return _MAV_RETURN_uint8_t_array(msg, uri, 120, 2); +} + +/** + * @brief Get field transfer_type from resource_request message + * + * @return The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream. + */ +static inline uint8_t mavlink_msg_resource_request_get_transfer_type(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 122); +} + +/** + * @brief Get field storage from resource_request message + * + * @return The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP). + */ +static inline uint16_t mavlink_msg_resource_request_get_storage(const mavlink_message_t* msg, uint8_t *storage) +{ + return _MAV_RETURN_uint8_t_array(msg, storage, 120, 123); +} + +/** + * @brief Decode a resource_request message into a struct + * + * @param msg The message to decode + * @param resource_request C-struct to decode the message contents into + */ +static inline void mavlink_msg_resource_request_decode(const mavlink_message_t* msg, mavlink_resource_request_t* resource_request) +{ +#if MAVLINK_NEED_BYTE_SWAP + resource_request->request_id = mavlink_msg_resource_request_get_request_id(msg); + resource_request->uri_type = mavlink_msg_resource_request_get_uri_type(msg); + mavlink_msg_resource_request_get_uri(msg, resource_request->uri); + resource_request->transfer_type = mavlink_msg_resource_request_get_transfer_type(msg); + mavlink_msg_resource_request_get_storage(msg, resource_request->storage); +#else + memcpy(resource_request, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RESOURCE_REQUEST_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_safety_allowed_area.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_safety_allowed_area.h index 0176dfc..e0722c1 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_safety_allowed_area.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_safety_allowed_area.h @@ -4,13 +4,13 @@ typedef struct __mavlink_safety_allowed_area_t { - float p1x; ///< x position 1 / Latitude 1 - float p1y; ///< y position 1 / Longitude 1 - float p1z; ///< z position 1 / Altitude 1 - float p2x; ///< x position 2 / Latitude 2 - float p2y; ///< y position 2 / Longitude 2 - float p2z; ///< z position 2 / Altitude 2 - uint8_t frame; ///< Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. + float p1x; /*< x position 1 / Latitude 1*/ + float p1y; /*< y position 1 / Longitude 1*/ + float p1z; /*< z position 1 / Altitude 1*/ + float p2x; /*< x position 2 / Latitude 2*/ + float p2y; /*< y position 2 / Longitude 2*/ + float p2z; /*< z position 2 / Altitude 2*/ + uint8_t frame; /*< Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.*/ } mavlink_safety_allowed_area_t; #define MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN 25 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_safety_set_allowed_area.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_safety_set_allowed_area.h index dafbc26..1fdfc77 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_safety_set_allowed_area.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_safety_set_allowed_area.h @@ -4,15 +4,15 @@ typedef struct __mavlink_safety_set_allowed_area_t { - float p1x; ///< x position 1 / Latitude 1 - float p1y; ///< y position 1 / Longitude 1 - float p1z; ///< z position 1 / Altitude 1 - float p2x; ///< x position 2 / Latitude 2 - float p2y; ///< y position 2 / Longitude 2 - float p2z; ///< z position 2 / Altitude 2 - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t frame; ///< Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. + float p1x; /*< x position 1 / Latitude 1*/ + float p1y; /*< y position 1 / Longitude 1*/ + float p1z; /*< z position 1 / Altitude 1*/ + float p2x; /*< x position 2 / Latitude 2*/ + float p2y; /*< y position 2 / Longitude 2*/ + float p2z; /*< z position 2 / Altitude 2*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t frame; /*< Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.*/ } mavlink_safety_set_allowed_area_t; #define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN 27 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu.h index 1648a56..b828030 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu.h @@ -4,16 +4,16 @@ typedef struct __mavlink_scaled_imu_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - int16_t xacc; ///< X acceleration (mg) - int16_t yacc; ///< Y acceleration (mg) - int16_t zacc; ///< Z acceleration (mg) - int16_t xgyro; ///< Angular speed around X axis (millirad /sec) - int16_t ygyro; ///< Angular speed around Y axis (millirad /sec) - int16_t zgyro; ///< Angular speed around Z axis (millirad /sec) - int16_t xmag; ///< X Magnetic field (milli tesla) - int16_t ymag; ///< Y Magnetic field (milli tesla) - int16_t zmag; ///< Z Magnetic field (milli tesla) + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + int16_t xacc; /*< X acceleration (mg)*/ + int16_t yacc; /*< Y acceleration (mg)*/ + int16_t zacc; /*< Z acceleration (mg)*/ + int16_t xgyro; /*< Angular speed around X axis (millirad /sec)*/ + int16_t ygyro; /*< Angular speed around Y axis (millirad /sec)*/ + int16_t zgyro; /*< Angular speed around Z axis (millirad /sec)*/ + int16_t xmag; /*< X Magnetic field (milli tesla)*/ + int16_t ymag; /*< Y Magnetic field (milli tesla)*/ + int16_t zmag; /*< Z Magnetic field (milli tesla)*/ } mavlink_scaled_imu_t; #define MAVLINK_MSG_ID_SCALED_IMU_LEN 22 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu2.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu2.h index 1dea121..1d8fa32 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu2.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu2.h @@ -4,16 +4,16 @@ typedef struct __mavlink_scaled_imu2_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - int16_t xacc; ///< X acceleration (mg) - int16_t yacc; ///< Y acceleration (mg) - int16_t zacc; ///< Z acceleration (mg) - int16_t xgyro; ///< Angular speed around X axis (millirad /sec) - int16_t ygyro; ///< Angular speed around Y axis (millirad /sec) - int16_t zgyro; ///< Angular speed around Z axis (millirad /sec) - int16_t xmag; ///< X Magnetic field (milli tesla) - int16_t ymag; ///< Y Magnetic field (milli tesla) - int16_t zmag; ///< Z Magnetic field (milli tesla) + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + int16_t xacc; /*< X acceleration (mg)*/ + int16_t yacc; /*< Y acceleration (mg)*/ + int16_t zacc; /*< Z acceleration (mg)*/ + int16_t xgyro; /*< Angular speed around X axis (millirad /sec)*/ + int16_t ygyro; /*< Angular speed around Y axis (millirad /sec)*/ + int16_t zgyro; /*< Angular speed around Z axis (millirad /sec)*/ + int16_t xmag; /*< X Magnetic field (milli tesla)*/ + int16_t ymag; /*< Y Magnetic field (milli tesla)*/ + int16_t zmag; /*< Z Magnetic field (milli tesla)*/ } mavlink_scaled_imu2_t; #define MAVLINK_MSG_ID_SCALED_IMU2_LEN 22 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu3.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu3.h index 73fc3a7..2ae3093 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu3.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_imu3.h @@ -4,16 +4,16 @@ typedef struct __mavlink_scaled_imu3_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - int16_t xacc; ///< X acceleration (mg) - int16_t yacc; ///< Y acceleration (mg) - int16_t zacc; ///< Z acceleration (mg) - int16_t xgyro; ///< Angular speed around X axis (millirad /sec) - int16_t ygyro; ///< Angular speed around Y axis (millirad /sec) - int16_t zgyro; ///< Angular speed around Z axis (millirad /sec) - int16_t xmag; ///< X Magnetic field (milli tesla) - int16_t ymag; ///< Y Magnetic field (milli tesla) - int16_t zmag; ///< Z Magnetic field (milli tesla) + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + int16_t xacc; /*< X acceleration (mg)*/ + int16_t yacc; /*< Y acceleration (mg)*/ + int16_t zacc; /*< Z acceleration (mg)*/ + int16_t xgyro; /*< Angular speed around X axis (millirad /sec)*/ + int16_t ygyro; /*< Angular speed around Y axis (millirad /sec)*/ + int16_t zgyro; /*< Angular speed around Z axis (millirad /sec)*/ + int16_t xmag; /*< X Magnetic field (milli tesla)*/ + int16_t ymag; /*< Y Magnetic field (milli tesla)*/ + int16_t zmag; /*< Z Magnetic field (milli tesla)*/ } mavlink_scaled_imu3_t; #define MAVLINK_MSG_ID_SCALED_IMU3_LEN 22 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure.h index e0d6d87..5ddad6d 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure.h @@ -4,10 +4,10 @@ typedef struct __mavlink_scaled_pressure_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - float press_abs; ///< Absolute pressure (hectopascal) - float press_diff; ///< Differential pressure 1 (hectopascal) - int16_t temperature; ///< Temperature measurement (0.01 degrees celsius) + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + float press_abs; /*< Absolute pressure (hectopascal)*/ + float press_diff; /*< Differential pressure 1 (hectopascal)*/ + int16_t temperature; /*< Temperature measurement (0.01 degrees celsius)*/ } mavlink_scaled_pressure_t; #define MAVLINK_MSG_ID_SCALED_PRESSURE_LEN 14 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure2.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure2.h index 674f505..c9ca5dc 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure2.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure2.h @@ -4,10 +4,10 @@ typedef struct __mavlink_scaled_pressure2_t { - uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot) - float press_abs; ///< Absolute pressure (hectopascal) - float press_diff; ///< Differential pressure 1 (hectopascal) - int16_t temperature; ///< Temperature measurement (0.01 degrees celsius) + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + float press_abs; /*< Absolute pressure (hectopascal)*/ + float press_diff; /*< Differential pressure 1 (hectopascal)*/ + int16_t temperature; /*< Temperature measurement (0.01 degrees celsius)*/ } mavlink_scaled_pressure2_t; #define MAVLINK_MSG_ID_SCALED_PRESSURE2_LEN 14 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure3.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure3.h new file mode 100644 index 0000000..62d46ae --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_scaled_pressure3.h @@ -0,0 +1,281 @@ +// MESSAGE SCALED_PRESSURE3 PACKING + +#define MAVLINK_MSG_ID_SCALED_PRESSURE3 143 + +typedef struct __mavlink_scaled_pressure3_t +{ + uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ + float press_abs; /*< Absolute pressure (hectopascal)*/ + float press_diff; /*< Differential pressure 1 (hectopascal)*/ + int16_t temperature; /*< Temperature measurement (0.01 degrees celsius)*/ +} mavlink_scaled_pressure3_t; + +#define MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN 14 +#define MAVLINK_MSG_ID_143_LEN 14 + +#define MAVLINK_MSG_ID_SCALED_PRESSURE3_CRC 131 +#define MAVLINK_MSG_ID_143_CRC 131 + + + +#define MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3 { \ + "SCALED_PRESSURE3", \ + 4, \ + { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_scaled_pressure3_t, time_boot_ms) }, \ + { "press_abs", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_scaled_pressure3_t, press_abs) }, \ + { "press_diff", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_scaled_pressure3_t, press_diff) }, \ + { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_scaled_pressure3_t, temperature) }, \ + } \ +} + + +/** + * @brief Pack a scaled_pressure3 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 time_boot_ms Timestamp (milliseconds since system boot) + * @param press_abs Absolute pressure (hectopascal) + * @param press_diff Differential pressure 1 (hectopascal) + * @param temperature Temperature measurement (0.01 degrees celsius) + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_scaled_pressure3_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint32_t time_boot_ms, float press_abs, float press_diff, int16_t temperature) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_float(buf, 4, press_abs); + _mav_put_float(buf, 8, press_diff); + _mav_put_int16_t(buf, 12, temperature); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#else + mavlink_scaled_pressure3_t packet; + packet.time_boot_ms = time_boot_ms; + packet.press_abs = press_abs; + packet.press_diff = press_diff; + packet.temperature = temperature; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SCALED_PRESSURE3; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN, MAVLINK_MSG_ID_SCALED_PRESSURE3_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#endif +} + +/** + * @brief Pack a scaled_pressure3 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 time_boot_ms Timestamp (milliseconds since system boot) + * @param press_abs Absolute pressure (hectopascal) + * @param press_diff Differential pressure 1 (hectopascal) + * @param temperature Temperature measurement (0.01 degrees celsius) + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_scaled_pressure3_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint32_t time_boot_ms,float press_abs,float press_diff,int16_t temperature) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_float(buf, 4, press_abs); + _mav_put_float(buf, 8, press_diff); + _mav_put_int16_t(buf, 12, temperature); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#else + mavlink_scaled_pressure3_t packet; + packet.time_boot_ms = time_boot_ms; + packet.press_abs = press_abs; + packet.press_diff = press_diff; + packet.temperature = temperature; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SCALED_PRESSURE3; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN, MAVLINK_MSG_ID_SCALED_PRESSURE3_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#endif +} + +/** + * @brief Encode a scaled_pressure3 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 scaled_pressure3 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_scaled_pressure3_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_scaled_pressure3_t* scaled_pressure3) +{ + return mavlink_msg_scaled_pressure3_pack(system_id, component_id, msg, scaled_pressure3->time_boot_ms, scaled_pressure3->press_abs, scaled_pressure3->press_diff, scaled_pressure3->temperature); +} + +/** + * @brief Encode a scaled_pressure3 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 scaled_pressure3 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_scaled_pressure3_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_scaled_pressure3_t* scaled_pressure3) +{ + return mavlink_msg_scaled_pressure3_pack_chan(system_id, component_id, chan, msg, scaled_pressure3->time_boot_ms, scaled_pressure3->press_abs, scaled_pressure3->press_diff, scaled_pressure3->temperature); +} + +/** + * @brief Send a scaled_pressure3 message + * @param chan MAVLink channel to send the message + * + * @param time_boot_ms Timestamp (milliseconds since system boot) + * @param press_abs Absolute pressure (hectopascal) + * @param press_diff Differential pressure 1 (hectopascal) + * @param temperature Temperature measurement (0.01 degrees celsius) + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_scaled_pressure3_send(mavlink_channel_t chan, uint32_t time_boot_ms, float press_abs, float press_diff, int16_t temperature) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_float(buf, 4, press_abs); + _mav_put_float(buf, 8, press_diff); + _mav_put_int16_t(buf, 12, temperature); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE3, buf, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN, MAVLINK_MSG_ID_SCALED_PRESSURE3_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE3, buf, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#endif +#else + mavlink_scaled_pressure3_t packet; + packet.time_boot_ms = time_boot_ms; + packet.press_abs = press_abs; + packet.press_diff = press_diff; + packet.temperature = temperature; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE3, (const char *)&packet, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN, MAVLINK_MSG_ID_SCALED_PRESSURE3_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE3, (const char *)&packet, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_SCALED_PRESSURE3_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_scaled_pressure3_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, float press_abs, float press_diff, int16_t temperature) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_float(buf, 4, press_abs); + _mav_put_float(buf, 8, press_diff); + _mav_put_int16_t(buf, 12, temperature); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE3, buf, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN, MAVLINK_MSG_ID_SCALED_PRESSURE3_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE3, buf, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#endif +#else + mavlink_scaled_pressure3_t *packet = (mavlink_scaled_pressure3_t *)msgbuf; + packet->time_boot_ms = time_boot_ms; + packet->press_abs = press_abs; + packet->press_diff = press_diff; + packet->temperature = temperature; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE3, (const char *)packet, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN, MAVLINK_MSG_ID_SCALED_PRESSURE3_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE3, (const char *)packet, MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE SCALED_PRESSURE3 UNPACKING + + +/** + * @brief Get field time_boot_ms from scaled_pressure3 message + * + * @return Timestamp (milliseconds since system boot) + */ +static inline uint32_t mavlink_msg_scaled_pressure3_get_time_boot_ms(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Get field press_abs from scaled_pressure3 message + * + * @return Absolute pressure (hectopascal) + */ +static inline float mavlink_msg_scaled_pressure3_get_press_abs(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 4); +} + +/** + * @brief Get field press_diff from scaled_pressure3 message + * + * @return Differential pressure 1 (hectopascal) + */ +static inline float mavlink_msg_scaled_pressure3_get_press_diff(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 8); +} + +/** + * @brief Get field temperature from scaled_pressure3 message + * + * @return Temperature measurement (0.01 degrees celsius) + */ +static inline int16_t mavlink_msg_scaled_pressure3_get_temperature(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int16_t(msg, 12); +} + +/** + * @brief Decode a scaled_pressure3 message into a struct + * + * @param msg The message to decode + * @param scaled_pressure3 C-struct to decode the message contents into + */ +static inline void mavlink_msg_scaled_pressure3_decode(const mavlink_message_t* msg, mavlink_scaled_pressure3_t* scaled_pressure3) +{ +#if MAVLINK_NEED_BYTE_SWAP + scaled_pressure3->time_boot_ms = mavlink_msg_scaled_pressure3_get_time_boot_ms(msg); + scaled_pressure3->press_abs = mavlink_msg_scaled_pressure3_get_press_abs(msg); + scaled_pressure3->press_diff = mavlink_msg_scaled_pressure3_get_press_diff(msg); + scaled_pressure3->temperature = mavlink_msg_scaled_pressure3_get_temperature(msg); +#else + memcpy(scaled_pressure3, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SCALED_PRESSURE3_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_serial_control.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_serial_control.h index cbf72ba..ab4f10f 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_serial_control.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_serial_control.h @@ -4,12 +4,12 @@ typedef struct __mavlink_serial_control_t { - uint32_t baudrate; ///< Baudrate of transfer. Zero means no change. - uint16_t timeout; ///< Timeout for reply data in milliseconds - uint8_t device; ///< See SERIAL_CONTROL_DEV enum - uint8_t flags; ///< See SERIAL_CONTROL_FLAG enum - uint8_t count; ///< how many bytes in this transfer - uint8_t data[70]; ///< serial data + uint32_t baudrate; /*< Baudrate of transfer. Zero means no change.*/ + uint16_t timeout; /*< Timeout for reply data in milliseconds*/ + uint8_t device; /*< See SERIAL_CONTROL_DEV enum*/ + uint8_t flags; /*< See SERIAL_CONTROL_FLAG enum*/ + uint8_t count; /*< how many bytes in this transfer*/ + uint8_t data[70]; /*< serial data*/ } mavlink_serial_control_t; #define MAVLINK_MSG_ID_SERIAL_CONTROL_LEN 79 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_servo_output_raw.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_servo_output_raw.h index e840886..d6952d0 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_servo_output_raw.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_servo_output_raw.h @@ -4,16 +4,16 @@ typedef struct __mavlink_servo_output_raw_t { - uint32_t time_usec; ///< Timestamp (microseconds since system boot) - uint16_t servo1_raw; ///< Servo output 1 value, in microseconds - uint16_t servo2_raw; ///< Servo output 2 value, in microseconds - uint16_t servo3_raw; ///< Servo output 3 value, in microseconds - uint16_t servo4_raw; ///< Servo output 4 value, in microseconds - uint16_t servo5_raw; ///< Servo output 5 value, in microseconds - uint16_t servo6_raw; ///< Servo output 6 value, in microseconds - uint16_t servo7_raw; ///< Servo output 7 value, in microseconds - uint16_t servo8_raw; ///< Servo output 8 value, in microseconds - uint8_t port; ///< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos. + uint32_t time_usec; /*< Timestamp (microseconds since system boot)*/ + uint16_t servo1_raw; /*< Servo output 1 value, in microseconds*/ + uint16_t servo2_raw; /*< Servo output 2 value, in microseconds*/ + uint16_t servo3_raw; /*< Servo output 3 value, in microseconds*/ + uint16_t servo4_raw; /*< Servo output 4 value, in microseconds*/ + uint16_t servo5_raw; /*< Servo output 5 value, in microseconds*/ + uint16_t servo6_raw; /*< Servo output 6 value, in microseconds*/ + uint16_t servo7_raw; /*< Servo output 7 value, in microseconds*/ + uint16_t servo8_raw; /*< Servo output 8 value, in microseconds*/ + uint8_t port; /*< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos.*/ } mavlink_servo_output_raw_t; #define MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN 21 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_actuator_control_target.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_actuator_control_target.h index 50d68a7..5632dba 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_actuator_control_target.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_actuator_control_target.h @@ -4,11 +4,11 @@ typedef struct __mavlink_set_actuator_control_target_t { - uint64_t time_usec; ///< Timestamp (micros since boot or Unix epoch) - float controls[8]; ///< Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs. - uint8_t group_mlx; ///< Actuator group. The "_mlx" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances. - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID + uint64_t time_usec; /*< Timestamp (micros since boot or Unix epoch)*/ + float controls[8]; /*< Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs.*/ + uint8_t group_mlx; /*< Actuator group. The "_mlx" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances.*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ } mavlink_set_actuator_control_target_t; #define MAVLINK_MSG_ID_SET_ACTUATOR_CONTROL_TARGET_LEN 43 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_attitude_target.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_attitude_target.h index 19ccc14..cca0d72 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_attitude_target.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_attitude_target.h @@ -4,15 +4,15 @@ typedef struct __mavlink_set_attitude_target_t { - uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot - float q[4]; ///< Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - float body_roll_rate; ///< Body roll rate in radians per second - float body_pitch_rate; ///< Body roll rate in radians per second - float body_yaw_rate; ///< Body roll rate in radians per second - float thrust; ///< Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t type_mask; ///< Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 6: reserved, bit 7: throttle, bit 8: attitude + uint32_t time_boot_ms; /*< Timestamp in milliseconds since system boot*/ + float q[4]; /*< Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)*/ + float body_roll_rate; /*< Body roll rate in radians per second*/ + float body_pitch_rate; /*< Body roll rate in radians per second*/ + float body_yaw_rate; /*< Body roll rate in radians per second*/ + float thrust; /*< Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t type_mask; /*< Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 6: reserved, bit 7: throttle, bit 8: attitude*/ } mavlink_set_attitude_target_t; #define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN 39 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_gps_global_origin.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_gps_global_origin.h index f5d918f..6644a61 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_gps_global_origin.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_gps_global_origin.h @@ -4,10 +4,10 @@ typedef struct __mavlink_set_gps_global_origin_t { - int32_t latitude; ///< Latitude (WGS84), in degrees * 1E7 - int32_t longitude; ///< Longitude (WGS84, in degrees * 1E7 - int32_t altitude; ///< Altitude (AMSL), in meters * 1000 (positive for up) - uint8_t target_system; ///< System ID + int32_t latitude; /*< Latitude (WGS84), in degrees * 1E7*/ + int32_t longitude; /*< Longitude (WGS84, in degrees * 1E7*/ + int32_t altitude; /*< Altitude (AMSL), in meters * 1000 (positive for up)*/ + uint8_t target_system; /*< System ID*/ } mavlink_set_gps_global_origin_t; #define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN 13 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_home_position.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_home_position.h new file mode 100644 index 0000000..91ed1c7 --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_home_position.h @@ -0,0 +1,441 @@ +// MESSAGE SET_HOME_POSITION PACKING + +#define MAVLINK_MSG_ID_SET_HOME_POSITION 243 + +typedef struct __mavlink_set_home_position_t +{ + int32_t latitude; /*< Latitude (WGS84), in degrees * 1E7*/ + int32_t longitude; /*< Longitude (WGS84, in degrees * 1E7*/ + int32_t altitude; /*< Altitude (AMSL), in meters * 1000 (positive for up)*/ + float x; /*< Local X position of this position in the local coordinate frame*/ + float y; /*< Local Y position of this position in the local coordinate frame*/ + float z; /*< Local Z position of this position in the local coordinate frame*/ + float q[4]; /*< World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground*/ + float approach_x; /*< Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ + float approach_y; /*< Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ + float approach_z; /*< Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ + uint8_t target_system; /*< System ID.*/ +} mavlink_set_home_position_t; + +#define MAVLINK_MSG_ID_SET_HOME_POSITION_LEN 53 +#define MAVLINK_MSG_ID_243_LEN 53 + +#define MAVLINK_MSG_ID_SET_HOME_POSITION_CRC 85 +#define MAVLINK_MSG_ID_243_CRC 85 + +#define MAVLINK_MSG_SET_HOME_POSITION_FIELD_Q_LEN 4 + +#define MAVLINK_MESSAGE_INFO_SET_HOME_POSITION { \ + "SET_HOME_POSITION", \ + 11, \ + { { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_set_home_position_t, latitude) }, \ + { "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_set_home_position_t, longitude) }, \ + { "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_set_home_position_t, altitude) }, \ + { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_set_home_position_t, x) }, \ + { "y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_set_home_position_t, y) }, \ + { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_set_home_position_t, z) }, \ + { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 24, offsetof(mavlink_set_home_position_t, q) }, \ + { "approach_x", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_set_home_position_t, approach_x) }, \ + { "approach_y", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_set_home_position_t, approach_y) }, \ + { "approach_z", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_set_home_position_t, approach_z) }, \ + { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 52, offsetof(mavlink_set_home_position_t, target_system) }, \ + } \ +} + + +/** + * @brief Pack a set_home_position 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 latitude Latitude (WGS84), in degrees * 1E7 + * @param longitude Longitude (WGS84, in degrees * 1E7 + * @param altitude Altitude (AMSL), in meters * 1000 (positive for up) + * @param x Local X position of this position in the local coordinate frame + * @param y Local Y position of this position in the local coordinate frame + * @param z Local Z position of this position in the local coordinate frame + * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground + * @param approach_x Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_y Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_z Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_set_home_position_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SET_HOME_POSITION_LEN]; + _mav_put_int32_t(buf, 0, latitude); + _mav_put_int32_t(buf, 4, longitude); + _mav_put_int32_t(buf, 8, altitude); + _mav_put_float(buf, 12, x); + _mav_put_float(buf, 16, y); + _mav_put_float(buf, 20, z); + _mav_put_float(buf, 40, approach_x); + _mav_put_float(buf, 44, approach_y); + _mav_put_float(buf, 48, approach_z); + _mav_put_uint8_t(buf, 52, target_system); + _mav_put_float_array(buf, 24, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#else + mavlink_set_home_position_t packet; + packet.latitude = latitude; + packet.longitude = longitude; + packet.altitude = altitude; + packet.x = x; + packet.y = y; + packet.z = z; + packet.approach_x = approach_x; + packet.approach_y = approach_y; + packet.approach_z = approach_z; + packet.target_system = target_system; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SET_HOME_POSITION; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN, MAVLINK_MSG_ID_SET_HOME_POSITION_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#endif +} + +/** + * @brief Pack a set_home_position 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 latitude Latitude (WGS84), in degrees * 1E7 + * @param longitude Longitude (WGS84, in degrees * 1E7 + * @param altitude Altitude (AMSL), in meters * 1000 (positive for up) + * @param x Local X position of this position in the local coordinate frame + * @param y Local Y position of this position in the local coordinate frame + * @param z Local Z position of this position in the local coordinate frame + * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground + * @param approach_x Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_y Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_z Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_set_home_position_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t target_system,int32_t latitude,int32_t longitude,int32_t altitude,float x,float y,float z,const float *q,float approach_x,float approach_y,float approach_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SET_HOME_POSITION_LEN]; + _mav_put_int32_t(buf, 0, latitude); + _mav_put_int32_t(buf, 4, longitude); + _mav_put_int32_t(buf, 8, altitude); + _mav_put_float(buf, 12, x); + _mav_put_float(buf, 16, y); + _mav_put_float(buf, 20, z); + _mav_put_float(buf, 40, approach_x); + _mav_put_float(buf, 44, approach_y); + _mav_put_float(buf, 48, approach_z); + _mav_put_uint8_t(buf, 52, target_system); + _mav_put_float_array(buf, 24, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#else + mavlink_set_home_position_t packet; + packet.latitude = latitude; + packet.longitude = longitude; + packet.altitude = altitude; + packet.x = x; + packet.y = y; + packet.z = z; + packet.approach_x = approach_x; + packet.approach_y = approach_y; + packet.approach_z = approach_z; + packet.target_system = target_system; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SET_HOME_POSITION; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN, MAVLINK_MSG_ID_SET_HOME_POSITION_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#endif +} + +/** + * @brief Encode a set_home_position 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 set_home_position C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_set_home_position_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_home_position_t* set_home_position) +{ + return mavlink_msg_set_home_position_pack(system_id, component_id, msg, set_home_position->target_system, set_home_position->latitude, set_home_position->longitude, set_home_position->altitude, set_home_position->x, set_home_position->y, set_home_position->z, set_home_position->q, set_home_position->approach_x, set_home_position->approach_y, set_home_position->approach_z); +} + +/** + * @brief Encode a set_home_position 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 set_home_position C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_set_home_position_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_set_home_position_t* set_home_position) +{ + return mavlink_msg_set_home_position_pack_chan(system_id, component_id, chan, msg, set_home_position->target_system, set_home_position->latitude, set_home_position->longitude, set_home_position->altitude, set_home_position->x, set_home_position->y, set_home_position->z, set_home_position->q, set_home_position->approach_x, set_home_position->approach_y, set_home_position->approach_z); +} + +/** + * @brief Send a set_home_position message + * @param chan MAVLink channel to send the message + * + * @param target_system System ID. + * @param latitude Latitude (WGS84), in degrees * 1E7 + * @param longitude Longitude (WGS84, in degrees * 1E7 + * @param altitude Altitude (AMSL), in meters * 1000 (positive for up) + * @param x Local X position of this position in the local coordinate frame + * @param y Local Y position of this position in the local coordinate frame + * @param z Local Z position of this position in the local coordinate frame + * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground + * @param approach_x Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_y Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + * @param approach_z Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_set_home_position_send(mavlink_channel_t chan, uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SET_HOME_POSITION_LEN]; + _mav_put_int32_t(buf, 0, latitude); + _mav_put_int32_t(buf, 4, longitude); + _mav_put_int32_t(buf, 8, altitude); + _mav_put_float(buf, 12, x); + _mav_put_float(buf, 16, y); + _mav_put_float(buf, 20, z); + _mav_put_float(buf, 40, approach_x); + _mav_put_float(buf, 44, approach_y); + _mav_put_float(buf, 48, approach_z); + _mav_put_uint8_t(buf, 52, target_system); + _mav_put_float_array(buf, 24, q, 4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_HOME_POSITION, buf, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN, MAVLINK_MSG_ID_SET_HOME_POSITION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_HOME_POSITION, buf, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#endif +#else + mavlink_set_home_position_t packet; + packet.latitude = latitude; + packet.longitude = longitude; + packet.altitude = altitude; + packet.x = x; + packet.y = y; + packet.z = z; + packet.approach_x = approach_x; + packet.approach_y = approach_y; + packet.approach_z = approach_z; + packet.target_system = target_system; + mav_array_memcpy(packet.q, q, sizeof(float)*4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_HOME_POSITION, (const char *)&packet, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN, MAVLINK_MSG_ID_SET_HOME_POSITION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_HOME_POSITION, (const char *)&packet, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_SET_HOME_POSITION_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_set_home_position_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_int32_t(buf, 0, latitude); + _mav_put_int32_t(buf, 4, longitude); + _mav_put_int32_t(buf, 8, altitude); + _mav_put_float(buf, 12, x); + _mav_put_float(buf, 16, y); + _mav_put_float(buf, 20, z); + _mav_put_float(buf, 40, approach_x); + _mav_put_float(buf, 44, approach_y); + _mav_put_float(buf, 48, approach_z); + _mav_put_uint8_t(buf, 52, target_system); + _mav_put_float_array(buf, 24, q, 4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_HOME_POSITION, buf, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN, MAVLINK_MSG_ID_SET_HOME_POSITION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_HOME_POSITION, buf, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#endif +#else + mavlink_set_home_position_t *packet = (mavlink_set_home_position_t *)msgbuf; + packet->latitude = latitude; + packet->longitude = longitude; + packet->altitude = altitude; + packet->x = x; + packet->y = y; + packet->z = z; + packet->approach_x = approach_x; + packet->approach_y = approach_y; + packet->approach_z = approach_z; + packet->target_system = target_system; + mav_array_memcpy(packet->q, q, sizeof(float)*4); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_HOME_POSITION, (const char *)packet, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN, MAVLINK_MSG_ID_SET_HOME_POSITION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_HOME_POSITION, (const char *)packet, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE SET_HOME_POSITION UNPACKING + + +/** + * @brief Get field target_system from set_home_position message + * + * @return System ID. + */ +static inline uint8_t mavlink_msg_set_home_position_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 52); +} + +/** + * @brief Get field latitude from set_home_position message + * + * @return Latitude (WGS84), in degrees * 1E7 + */ +static inline int32_t mavlink_msg_set_home_position_get_latitude(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 0); +} + +/** + * @brief Get field longitude from set_home_position message + * + * @return Longitude (WGS84, in degrees * 1E7 + */ +static inline int32_t mavlink_msg_set_home_position_get_longitude(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 4); +} + +/** + * @brief Get field altitude from set_home_position message + * + * @return Altitude (AMSL), in meters * 1000 (positive for up) + */ +static inline int32_t mavlink_msg_set_home_position_get_altitude(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 8); +} + +/** + * @brief Get field x from set_home_position message + * + * @return Local X position of this position in the local coordinate frame + */ +static inline float mavlink_msg_set_home_position_get_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 12); +} + +/** + * @brief Get field y from set_home_position message + * + * @return Local Y position of this position in the local coordinate frame + */ +static inline float mavlink_msg_set_home_position_get_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 16); +} + +/** + * @brief Get field z from set_home_position message + * + * @return Local Z position of this position in the local coordinate frame + */ +static inline float mavlink_msg_set_home_position_get_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 20); +} + +/** + * @brief Get field q from set_home_position message + * + * @return World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground + */ +static inline uint16_t mavlink_msg_set_home_position_get_q(const mavlink_message_t* msg, float *q) +{ + return _MAV_RETURN_float_array(msg, q, 4, 24); +} + +/** + * @brief Get field approach_x from set_home_position message + * + * @return Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + */ +static inline float mavlink_msg_set_home_position_get_approach_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 40); +} + +/** + * @brief Get field approach_y from set_home_position message + * + * @return Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + */ +static inline float mavlink_msg_set_home_position_get_approach_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 44); +} + +/** + * @brief Get field approach_z from set_home_position message + * + * @return Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. + */ +static inline float mavlink_msg_set_home_position_get_approach_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 48); +} + +/** + * @brief Decode a set_home_position message into a struct + * + * @param msg The message to decode + * @param set_home_position C-struct to decode the message contents into + */ +static inline void mavlink_msg_set_home_position_decode(const mavlink_message_t* msg, mavlink_set_home_position_t* set_home_position) +{ +#if MAVLINK_NEED_BYTE_SWAP + set_home_position->latitude = mavlink_msg_set_home_position_get_latitude(msg); + set_home_position->longitude = mavlink_msg_set_home_position_get_longitude(msg); + set_home_position->altitude = mavlink_msg_set_home_position_get_altitude(msg); + set_home_position->x = mavlink_msg_set_home_position_get_x(msg); + set_home_position->y = mavlink_msg_set_home_position_get_y(msg); + set_home_position->z = mavlink_msg_set_home_position_get_z(msg); + mavlink_msg_set_home_position_get_q(msg, set_home_position->q); + set_home_position->approach_x = mavlink_msg_set_home_position_get_approach_x(msg); + set_home_position->approach_y = mavlink_msg_set_home_position_get_approach_y(msg); + set_home_position->approach_z = mavlink_msg_set_home_position_get_approach_z(msg); + set_home_position->target_system = mavlink_msg_set_home_position_get_target_system(msg); +#else + memcpy(set_home_position, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SET_HOME_POSITION_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_mode.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_mode.h index 4b60a41..849c1a4 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_mode.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_mode.h @@ -4,9 +4,9 @@ typedef struct __mavlink_set_mode_t { - uint32_t custom_mode; ///< The new autopilot-specific mode. This field can be ignored by an autopilot. - uint8_t target_system; ///< The system setting the mode - uint8_t base_mode; ///< The new base mode + uint32_t custom_mode; /*< The new autopilot-specific mode. This field can be ignored by an autopilot.*/ + uint8_t target_system; /*< The system setting the mode*/ + uint8_t base_mode; /*< The new base mode*/ } mavlink_set_mode_t; #define MAVLINK_MSG_ID_SET_MODE_LEN 6 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_position_target_global_int.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_position_target_global_int.h index e528d73..b63b636 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_position_target_global_int.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_position_target_global_int.h @@ -4,22 +4,22 @@ typedef struct __mavlink_set_position_target_global_int_t { - uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot. The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. - int32_t lat_int; ///< X Position in WGS84 frame in 1e7 * meters - int32_t lon_int; ///< Y Position in WGS84 frame in 1e7 * meters - float alt; ///< Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT - float vx; ///< X velocity in NED frame in meter / s - float vy; ///< Y velocity in NED frame in meter / s - float vz; ///< Z velocity in NED frame in meter / s - float afx; ///< X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float afy; ///< Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float afz; ///< Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float yaw; ///< yaw setpoint in rad - float yaw_rate; ///< yaw rate setpoint in rad/s - uint16_t type_mask; ///< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t coordinate_frame; ///< Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 + uint32_t time_boot_ms; /*< Timestamp in milliseconds since system boot. The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency.*/ + int32_t lat_int; /*< X Position in WGS84 frame in 1e7 * meters*/ + int32_t lon_int; /*< Y Position in WGS84 frame in 1e7 * meters*/ + float alt; /*< Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT*/ + float vx; /*< X velocity in NED frame in meter / s*/ + float vy; /*< Y velocity in NED frame in meter / s*/ + float vz; /*< Z velocity in NED frame in meter / s*/ + float afx; /*< X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float afy; /*< Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float afz; /*< Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float yaw; /*< yaw setpoint in rad*/ + float yaw_rate; /*< yaw rate setpoint in rad/s*/ + uint16_t type_mask; /*< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t coordinate_frame; /*< Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11*/ } mavlink_set_position_target_global_int_t; #define MAVLINK_MSG_ID_SET_POSITION_TARGET_GLOBAL_INT_LEN 53 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_position_target_local_ned.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_position_target_local_ned.h index 8fcc3cb..3a8b635 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_position_target_local_ned.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_set_position_target_local_ned.h @@ -4,22 +4,22 @@ typedef struct __mavlink_set_position_target_local_ned_t { - uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot - float x; ///< X Position in NED frame in meters - float y; ///< Y Position in NED frame in meters - float z; ///< Z Position in NED frame in meters (note, altitude is negative in NED) - float vx; ///< X velocity in NED frame in meter / s - float vy; ///< Y velocity in NED frame in meter / s - float vz; ///< Z velocity in NED frame in meter / s - float afx; ///< X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float afy; ///< Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float afz; ///< Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - float yaw; ///< yaw setpoint in rad - float yaw_rate; ///< yaw rate setpoint in rad/s - uint16_t type_mask; ///< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate - uint8_t target_system; ///< System ID - uint8_t target_component; ///< Component ID - uint8_t coordinate_frame; ///< Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 + uint32_t time_boot_ms; /*< Timestamp in milliseconds since system boot*/ + float x; /*< X Position in NED frame in meters*/ + float y; /*< Y Position in NED frame in meters*/ + float z; /*< Z Position in NED frame in meters (note, altitude is negative in NED)*/ + float vx; /*< X velocity in NED frame in meter / s*/ + float vy; /*< Y velocity in NED frame in meter / s*/ + float vz; /*< Z velocity in NED frame in meter / s*/ + float afx; /*< X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float afy; /*< Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float afz; /*< Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/ + float yaw; /*< yaw setpoint in rad*/ + float yaw_rate; /*< yaw rate setpoint in rad/s*/ + uint16_t type_mask; /*< Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t coordinate_frame; /*< Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9*/ } mavlink_set_position_target_local_ned_t; #define MAVLINK_MSG_ID_SET_POSITION_TARGET_LOCAL_NED_LEN 53 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_sim_state.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_sim_state.h index c47fc8c..ad6934d 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_sim_state.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_sim_state.h @@ -4,27 +4,27 @@ typedef struct __mavlink_sim_state_t { - float q1; ///< True attitude quaternion component 1, w (1 in null-rotation) - float q2; ///< True attitude quaternion component 2, x (0 in null-rotation) - float q3; ///< True attitude quaternion component 3, y (0 in null-rotation) - float q4; ///< True attitude quaternion component 4, z (0 in null-rotation) - float roll; ///< Attitude roll expressed as Euler angles, not recommended except for human-readable outputs - float pitch; ///< Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs - float yaw; ///< Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs - float xacc; ///< X acceleration m/s/s - float yacc; ///< Y acceleration m/s/s - float zacc; ///< Z acceleration m/s/s - float xgyro; ///< Angular speed around X axis rad/s - float ygyro; ///< Angular speed around Y axis rad/s - float zgyro; ///< Angular speed around Z axis rad/s - float lat; ///< Latitude in degrees - float lon; ///< Longitude in degrees - float alt; ///< Altitude in meters - float std_dev_horz; ///< Horizontal position standard deviation - float std_dev_vert; ///< Vertical position standard deviation - float vn; ///< True velocity in m/s in NORTH direction in earth-fixed NED frame - float ve; ///< True velocity in m/s in EAST direction in earth-fixed NED frame - float vd; ///< True velocity in m/s in DOWN direction in earth-fixed NED frame + float q1; /*< True attitude quaternion component 1, w (1 in null-rotation)*/ + float q2; /*< True attitude quaternion component 2, x (0 in null-rotation)*/ + float q3; /*< True attitude quaternion component 3, y (0 in null-rotation)*/ + float q4; /*< True attitude quaternion component 4, z (0 in null-rotation)*/ + float roll; /*< Attitude roll expressed as Euler angles, not recommended except for human-readable outputs*/ + float pitch; /*< Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs*/ + float yaw; /*< Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs*/ + float xacc; /*< X acceleration m/s/s*/ + float yacc; /*< Y acceleration m/s/s*/ + float zacc; /*< Z acceleration m/s/s*/ + float xgyro; /*< Angular speed around X axis rad/s*/ + float ygyro; /*< Angular speed around Y axis rad/s*/ + float zgyro; /*< Angular speed around Z axis rad/s*/ + float lat; /*< Latitude in degrees*/ + float lon; /*< Longitude in degrees*/ + float alt; /*< Altitude in meters*/ + float std_dev_horz; /*< Horizontal position standard deviation*/ + float std_dev_vert; /*< Vertical position standard deviation*/ + float vn; /*< True velocity in m/s in NORTH direction in earth-fixed NED frame*/ + float ve; /*< True velocity in m/s in EAST direction in earth-fixed NED frame*/ + float vd; /*< True velocity in m/s in DOWN direction in earth-fixed NED frame*/ } mavlink_sim_state_t; #define MAVLINK_MSG_ID_SIM_STATE_LEN 84 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_statustext.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_statustext.h index c8c2547..9dcbff8 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_statustext.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_statustext.h @@ -4,8 +4,8 @@ typedef struct __mavlink_statustext_t { - uint8_t severity; ///< Severity of status. Relies on the definitions within RFC-5424. See enum MAV_SEVERITY. - char text[50]; ///< Status text message, without null termination character + uint8_t severity; /*< Severity of status. Relies on the definitions within RFC-5424. See enum MAV_SEVERITY.*/ + char text[50]; /*< Status text message, without null termination character*/ } mavlink_statustext_t; #define MAVLINK_MSG_ID_STATUSTEXT_LEN 51 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_sys_status.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_sys_status.h index 1b1730d..e4e4099 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_sys_status.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_sys_status.h @@ -4,19 +4,19 @@ typedef struct __mavlink_sys_status_t { - uint32_t onboard_control_sensors_present; ///< Bitmask showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. Indices defined by ENUM MAV_SYS_STATUS_SENSOR - uint32_t onboard_control_sensors_enabled; ///< Bitmask showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. Indices defined by ENUM MAV_SYS_STATUS_SENSOR - uint32_t onboard_control_sensors_health; ///< Bitmask showing which onboard controllers and sensors are operational or have an error: Value of 0: not enabled. Value of 1: enabled. Indices defined by ENUM MAV_SYS_STATUS_SENSOR - uint16_t load; ///< Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000 - uint16_t voltage_battery; ///< Battery voltage, in millivolts (1 = 1 millivolt) - int16_t current_battery; ///< Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current - uint16_t drop_rate_comm; ///< Communication drops in percent, (0%: 0, 100%: 10'000), (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) - uint16_t errors_comm; ///< Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) - uint16_t errors_count1; ///< Autopilot-specific errors - uint16_t errors_count2; ///< Autopilot-specific errors - uint16_t errors_count3; ///< Autopilot-specific errors - uint16_t errors_count4; ///< Autopilot-specific errors - int8_t battery_remaining; ///< Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot estimate the remaining battery + uint32_t onboard_control_sensors_present; /*< Bitmask showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. Indices defined by ENUM MAV_SYS_STATUS_SENSOR*/ + uint32_t onboard_control_sensors_enabled; /*< Bitmask showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. Indices defined by ENUM MAV_SYS_STATUS_SENSOR*/ + uint32_t onboard_control_sensors_health; /*< Bitmask showing which onboard controllers and sensors are operational or have an error: Value of 0: not enabled. Value of 1: enabled. Indices defined by ENUM MAV_SYS_STATUS_SENSOR*/ + uint16_t load; /*< Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000*/ + uint16_t voltage_battery; /*< Battery voltage, in millivolts (1 = 1 millivolt)*/ + int16_t current_battery; /*< Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current*/ + uint16_t drop_rate_comm; /*< Communication drops in percent, (0%: 0, 100%: 10'000), (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)*/ + uint16_t errors_comm; /*< Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)*/ + uint16_t errors_count1; /*< Autopilot-specific errors*/ + uint16_t errors_count2; /*< Autopilot-specific errors*/ + uint16_t errors_count3; /*< Autopilot-specific errors*/ + uint16_t errors_count4; /*< Autopilot-specific errors*/ + int8_t battery_remaining; /*< Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot estimate the remaining battery*/ } mavlink_sys_status_t; #define MAVLINK_MSG_ID_SYS_STATUS_LEN 31 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_system_time.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_system_time.h index 988c669..e2aab67 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_system_time.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_system_time.h @@ -4,8 +4,8 @@ typedef struct __mavlink_system_time_t { - uint64_t time_unix_usec; ///< Timestamp of the master clock in microseconds since UNIX epoch. - uint32_t time_boot_ms; ///< Timestamp of the component clock since boot time in milliseconds. + uint64_t time_unix_usec; /*< Timestamp of the master clock in microseconds since UNIX epoch.*/ + uint32_t time_boot_ms; /*< Timestamp of the component clock since boot time in milliseconds.*/ } mavlink_system_time_t; #define MAVLINK_MSG_ID_SYSTEM_TIME_LEN 12 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_check.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_check.h index ebdf71a..d4ecaf3 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_check.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_check.h @@ -4,8 +4,8 @@ typedef struct __mavlink_terrain_check_t { - int32_t lat; ///< Latitude (degrees *10^7) - int32_t lon; ///< Longitude (degrees *10^7) + int32_t lat; /*< Latitude (degrees *10^7)*/ + int32_t lon; /*< Longitude (degrees *10^7)*/ } mavlink_terrain_check_t; #define MAVLINK_MSG_ID_TERRAIN_CHECK_LEN 8 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_data.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_data.h index 8fc0b43..2e2f05a 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_data.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_data.h @@ -4,11 +4,11 @@ typedef struct __mavlink_terrain_data_t { - int32_t lat; ///< Latitude of SW corner of first grid (degrees *10^7) - int32_t lon; ///< Longitude of SW corner of first grid (in degrees *10^7) - uint16_t grid_spacing; ///< Grid spacing in meters - int16_t data[16]; ///< Terrain data in meters AMSL - uint8_t gridbit; ///< bit within the terrain request mask + int32_t lat; /*< Latitude of SW corner of first grid (degrees *10^7)*/ + int32_t lon; /*< Longitude of SW corner of first grid (in degrees *10^7)*/ + uint16_t grid_spacing; /*< Grid spacing in meters*/ + int16_t data[16]; /*< Terrain data in meters AMSL*/ + uint8_t gridbit; /*< bit within the terrain request mask*/ } mavlink_terrain_data_t; #define MAVLINK_MSG_ID_TERRAIN_DATA_LEN 43 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_report.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_report.h index 1b61dd4..2ed7db6 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_report.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_report.h @@ -4,13 +4,13 @@ typedef struct __mavlink_terrain_report_t { - int32_t lat; ///< Latitude (degrees *10^7) - int32_t lon; ///< Longitude (degrees *10^7) - float terrain_height; ///< Terrain height in meters AMSL - float current_height; ///< Current vehicle height above lat/lon terrain height (meters) - uint16_t spacing; ///< grid spacing (zero if terrain at this location unavailable) - uint16_t pending; ///< Number of 4x4 terrain blocks waiting to be received or read from disk - uint16_t loaded; ///< Number of 4x4 terrain blocks in memory + int32_t lat; /*< Latitude (degrees *10^7)*/ + int32_t lon; /*< Longitude (degrees *10^7)*/ + float terrain_height; /*< Terrain height in meters AMSL*/ + float current_height; /*< Current vehicle height above lat/lon terrain height (meters)*/ + uint16_t spacing; /*< grid spacing (zero if terrain at this location unavailable)*/ + uint16_t pending; /*< Number of 4x4 terrain blocks waiting to be received or read from disk*/ + uint16_t loaded; /*< Number of 4x4 terrain blocks in memory*/ } mavlink_terrain_report_t; #define MAVLINK_MSG_ID_TERRAIN_REPORT_LEN 22 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_request.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_request.h index 3a85b85..fdab6de 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_request.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_terrain_request.h @@ -4,10 +4,10 @@ typedef struct __mavlink_terrain_request_t { - uint64_t mask; ///< Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits) - int32_t lat; ///< Latitude of SW corner of first grid (degrees *10^7) - int32_t lon; ///< Longitude of SW corner of first grid (in degrees *10^7) - uint16_t grid_spacing; ///< Grid spacing in meters + uint64_t mask; /*< Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)*/ + int32_t lat; /*< Latitude of SW corner of first grid (degrees *10^7)*/ + int32_t lon; /*< Longitude of SW corner of first grid (in degrees *10^7)*/ + uint16_t grid_spacing; /*< Grid spacing in meters*/ } mavlink_terrain_request_t; #define MAVLINK_MSG_ID_TERRAIN_REQUEST_LEN 18 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_timesync.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_timesync.h index 6f1d5e1..be28442 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_timesync.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_timesync.h @@ -4,8 +4,8 @@ typedef struct __mavlink_timesync_t { - int64_t tc1; ///< Time sync timestamp 1 - int64_t ts1; ///< Time sync timestamp 2 + int64_t tc1; /*< Time sync timestamp 1*/ + int64_t ts1; /*< Time sync timestamp 2*/ } mavlink_timesync_t; #define MAVLINK_MSG_ID_TIMESYNC_LEN 16 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_v2_extension.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_v2_extension.h index 59a0ba0..26f18ad 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_v2_extension.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_v2_extension.h @@ -4,11 +4,11 @@ typedef struct __mavlink_v2_extension_t { - uint16_t message_type; ///< A code that identifies the software component that understands this message (analogous to usb device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to https://github.com/mavlink/mavlink/extension-message-ids.xml. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase. - uint8_t target_network; ///< Network ID (0 for broadcast) - uint8_t target_system; ///< System ID (0 for broadcast) - uint8_t target_component; ///< Component ID (0 for broadcast) - uint8_t payload[249]; ///< Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. + uint16_t message_type; /*< A code that identifies the software component that understands this message (analogous to usb device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to https://github.com/mavlink/mavlink/extension-message-ids.xml. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase.*/ + uint8_t target_network; /*< Network ID (0 for broadcast)*/ + uint8_t target_system; /*< System ID (0 for broadcast)*/ + uint8_t target_component; /*< Component ID (0 for broadcast)*/ + uint8_t payload[249]; /*< Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification.*/ } mavlink_v2_extension_t; #define MAVLINK_MSG_ID_V2_EXTENSION_LEN 254 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vfr_hud.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vfr_hud.h index b130ee5..0dc5b82 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vfr_hud.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vfr_hud.h @@ -4,12 +4,12 @@ typedef struct __mavlink_vfr_hud_t { - float airspeed; ///< Current airspeed in m/s - float groundspeed; ///< Current ground speed in m/s - float alt; ///< Current altitude (MSL), in meters - float climb; ///< Current climb rate in meters/second - int16_t heading; ///< Current heading in degrees, in compass units (0..360, 0=north) - uint16_t throttle; ///< Current throttle setting in integer percent, 0 to 100 + float airspeed; /*< Current airspeed in m/s*/ + float groundspeed; /*< Current ground speed in m/s*/ + float alt; /*< Current altitude (MSL), in meters*/ + float climb; /*< Current climb rate in meters/second*/ + int16_t heading; /*< Current heading in degrees, in compass units (0..360, 0=north)*/ + uint16_t throttle; /*< Current throttle setting in integer percent, 0 to 100*/ } mavlink_vfr_hud_t; #define MAVLINK_MSG_ID_VFR_HUD_LEN 20 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vibration.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vibration.h new file mode 100644 index 0000000..7b2d10c --- /dev/null +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vibration.h @@ -0,0 +1,353 @@ +// MESSAGE VIBRATION PACKING + +#define MAVLINK_MSG_ID_VIBRATION 241 + +typedef struct __mavlink_vibration_t +{ + uint64_t time_usec; /*< Timestamp (micros since boot or Unix epoch)*/ + float vibration_x; /*< Vibration levels on X-axis*/ + float vibration_y; /*< Vibration levels on Y-axis*/ + float vibration_z; /*< Vibration levels on Z-axis*/ + uint32_t clipping_0; /*< first accelerometer clipping count*/ + uint32_t clipping_1; /*< second accelerometer clipping count*/ + uint32_t clipping_2; /*< third accelerometer clipping count*/ +} mavlink_vibration_t; + +#define MAVLINK_MSG_ID_VIBRATION_LEN 32 +#define MAVLINK_MSG_ID_241_LEN 32 + +#define MAVLINK_MSG_ID_VIBRATION_CRC 90 +#define MAVLINK_MSG_ID_241_CRC 90 + + + +#define MAVLINK_MESSAGE_INFO_VIBRATION { \ + "VIBRATION", \ + 7, \ + { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_vibration_t, time_usec) }, \ + { "vibration_x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vibration_t, vibration_x) }, \ + { "vibration_y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vibration_t, vibration_y) }, \ + { "vibration_z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vibration_t, vibration_z) }, \ + { "clipping_0", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_vibration_t, clipping_0) }, \ + { "clipping_1", NULL, MAVLINK_TYPE_UINT32_T, 0, 24, offsetof(mavlink_vibration_t, clipping_1) }, \ + { "clipping_2", NULL, MAVLINK_TYPE_UINT32_T, 0, 28, offsetof(mavlink_vibration_t, clipping_2) }, \ + } \ +} + + +/** + * @brief Pack a vibration 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 time_usec Timestamp (micros since boot or Unix epoch) + * @param vibration_x Vibration levels on X-axis + * @param vibration_y Vibration levels on Y-axis + * @param vibration_z Vibration levels on Z-axis + * @param clipping_0 first accelerometer clipping count + * @param clipping_1 second accelerometer clipping count + * @param clipping_2 third accelerometer clipping count + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_vibration_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint64_t time_usec, float vibration_x, float vibration_y, float vibration_z, uint32_t clipping_0, uint32_t clipping_1, uint32_t clipping_2) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_VIBRATION_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, vibration_x); + _mav_put_float(buf, 12, vibration_y); + _mav_put_float(buf, 16, vibration_z); + _mav_put_uint32_t(buf, 20, clipping_0); + _mav_put_uint32_t(buf, 24, clipping_1); + _mav_put_uint32_t(buf, 28, clipping_2); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VIBRATION_LEN); +#else + mavlink_vibration_t packet; + packet.time_usec = time_usec; + packet.vibration_x = vibration_x; + packet.vibration_y = vibration_y; + packet.vibration_z = vibration_z; + packet.clipping_0 = clipping_0; + packet.clipping_1 = clipping_1; + packet.clipping_2 = clipping_2; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VIBRATION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_VIBRATION; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VIBRATION_LEN, MAVLINK_MSG_ID_VIBRATION_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VIBRATION_LEN); +#endif +} + +/** + * @brief Pack a vibration 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 time_usec Timestamp (micros since boot or Unix epoch) + * @param vibration_x Vibration levels on X-axis + * @param vibration_y Vibration levels on Y-axis + * @param vibration_z Vibration levels on Z-axis + * @param clipping_0 first accelerometer clipping count + * @param clipping_1 second accelerometer clipping count + * @param clipping_2 third accelerometer clipping count + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_vibration_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint64_t time_usec,float vibration_x,float vibration_y,float vibration_z,uint32_t clipping_0,uint32_t clipping_1,uint32_t clipping_2) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_VIBRATION_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, vibration_x); + _mav_put_float(buf, 12, vibration_y); + _mav_put_float(buf, 16, vibration_z); + _mav_put_uint32_t(buf, 20, clipping_0); + _mav_put_uint32_t(buf, 24, clipping_1); + _mav_put_uint32_t(buf, 28, clipping_2); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VIBRATION_LEN); +#else + mavlink_vibration_t packet; + packet.time_usec = time_usec; + packet.vibration_x = vibration_x; + packet.vibration_y = vibration_y; + packet.vibration_z = vibration_z; + packet.clipping_0 = clipping_0; + packet.clipping_1 = clipping_1; + packet.clipping_2 = clipping_2; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VIBRATION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_VIBRATION; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VIBRATION_LEN, MAVLINK_MSG_ID_VIBRATION_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VIBRATION_LEN); +#endif +} + +/** + * @brief Encode a vibration 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 vibration C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_vibration_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vibration_t* vibration) +{ + return mavlink_msg_vibration_pack(system_id, component_id, msg, vibration->time_usec, vibration->vibration_x, vibration->vibration_y, vibration->vibration_z, vibration->clipping_0, vibration->clipping_1, vibration->clipping_2); +} + +/** + * @brief Encode a vibration 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 vibration C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_vibration_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vibration_t* vibration) +{ + return mavlink_msg_vibration_pack_chan(system_id, component_id, chan, msg, vibration->time_usec, vibration->vibration_x, vibration->vibration_y, vibration->vibration_z, vibration->clipping_0, vibration->clipping_1, vibration->clipping_2); +} + +/** + * @brief Send a vibration message + * @param chan MAVLink channel to send the message + * + * @param time_usec Timestamp (micros since boot or Unix epoch) + * @param vibration_x Vibration levels on X-axis + * @param vibration_y Vibration levels on Y-axis + * @param vibration_z Vibration levels on Z-axis + * @param clipping_0 first accelerometer clipping count + * @param clipping_1 second accelerometer clipping count + * @param clipping_2 third accelerometer clipping count + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_vibration_send(mavlink_channel_t chan, uint64_t time_usec, float vibration_x, float vibration_y, float vibration_z, uint32_t clipping_0, uint32_t clipping_1, uint32_t clipping_2) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_VIBRATION_LEN]; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, vibration_x); + _mav_put_float(buf, 12, vibration_y); + _mav_put_float(buf, 16, vibration_z); + _mav_put_uint32_t(buf, 20, clipping_0); + _mav_put_uint32_t(buf, 24, clipping_1); + _mav_put_uint32_t(buf, 28, clipping_2); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIBRATION, buf, MAVLINK_MSG_ID_VIBRATION_LEN, MAVLINK_MSG_ID_VIBRATION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIBRATION, buf, MAVLINK_MSG_ID_VIBRATION_LEN); +#endif +#else + mavlink_vibration_t packet; + packet.time_usec = time_usec; + packet.vibration_x = vibration_x; + packet.vibration_y = vibration_y; + packet.vibration_z = vibration_z; + packet.clipping_0 = clipping_0; + packet.clipping_1 = clipping_1; + packet.clipping_2 = clipping_2; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIBRATION, (const char *)&packet, MAVLINK_MSG_ID_VIBRATION_LEN, MAVLINK_MSG_ID_VIBRATION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIBRATION, (const char *)&packet, MAVLINK_MSG_ID_VIBRATION_LEN); +#endif +#endif +} + +#if MAVLINK_MSG_ID_VIBRATION_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_vibration_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, float vibration_x, float vibration_y, float vibration_z, uint32_t clipping_0, uint32_t clipping_1, uint32_t clipping_2) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint64_t(buf, 0, time_usec); + _mav_put_float(buf, 8, vibration_x); + _mav_put_float(buf, 12, vibration_y); + _mav_put_float(buf, 16, vibration_z); + _mav_put_uint32_t(buf, 20, clipping_0); + _mav_put_uint32_t(buf, 24, clipping_1); + _mav_put_uint32_t(buf, 28, clipping_2); + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIBRATION, buf, MAVLINK_MSG_ID_VIBRATION_LEN, MAVLINK_MSG_ID_VIBRATION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIBRATION, buf, MAVLINK_MSG_ID_VIBRATION_LEN); +#endif +#else + mavlink_vibration_t *packet = (mavlink_vibration_t *)msgbuf; + packet->time_usec = time_usec; + packet->vibration_x = vibration_x; + packet->vibration_y = vibration_y; + packet->vibration_z = vibration_z; + packet->clipping_0 = clipping_0; + packet->clipping_1 = clipping_1; + packet->clipping_2 = clipping_2; + +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIBRATION, (const char *)packet, MAVLINK_MSG_ID_VIBRATION_LEN, MAVLINK_MSG_ID_VIBRATION_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIBRATION, (const char *)packet, MAVLINK_MSG_ID_VIBRATION_LEN); +#endif +#endif +} +#endif + +#endif + +// MESSAGE VIBRATION UNPACKING + + +/** + * @brief Get field time_usec from vibration message + * + * @return Timestamp (micros since boot or Unix epoch) + */ +static inline uint64_t mavlink_msg_vibration_get_time_usec(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint64_t(msg, 0); +} + +/** + * @brief Get field vibration_x from vibration message + * + * @return Vibration levels on X-axis + */ +static inline float mavlink_msg_vibration_get_vibration_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 8); +} + +/** + * @brief Get field vibration_y from vibration message + * + * @return Vibration levels on Y-axis + */ +static inline float mavlink_msg_vibration_get_vibration_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 12); +} + +/** + * @brief Get field vibration_z from vibration message + * + * @return Vibration levels on Z-axis + */ +static inline float mavlink_msg_vibration_get_vibration_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 16); +} + +/** + * @brief Get field clipping_0 from vibration message + * + * @return first accelerometer clipping count + */ +static inline uint32_t mavlink_msg_vibration_get_clipping_0(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 20); +} + +/** + * @brief Get field clipping_1 from vibration message + * + * @return second accelerometer clipping count + */ +static inline uint32_t mavlink_msg_vibration_get_clipping_1(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 24); +} + +/** + * @brief Get field clipping_2 from vibration message + * + * @return third accelerometer clipping count + */ +static inline uint32_t mavlink_msg_vibration_get_clipping_2(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 28); +} + +/** + * @brief Decode a vibration message into a struct + * + * @param msg The message to decode + * @param vibration C-struct to decode the message contents into + */ +static inline void mavlink_msg_vibration_decode(const mavlink_message_t* msg, mavlink_vibration_t* vibration) +{ +#if MAVLINK_NEED_BYTE_SWAP + vibration->time_usec = mavlink_msg_vibration_get_time_usec(msg); + vibration->vibration_x = mavlink_msg_vibration_get_vibration_x(msg); + vibration->vibration_y = mavlink_msg_vibration_get_vibration_y(msg); + vibration->vibration_z = mavlink_msg_vibration_get_vibration_z(msg); + vibration->clipping_0 = mavlink_msg_vibration_get_clipping_0(msg); + vibration->clipping_1 = mavlink_msg_vibration_get_clipping_1(msg); + vibration->clipping_2 = mavlink_msg_vibration_get_clipping_2(msg); +#else + memcpy(vibration, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_VIBRATION_LEN); +#endif +} diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vicon_position_estimate.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vicon_position_estimate.h index b3fa7bc..9fb41e7 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vicon_position_estimate.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vicon_position_estimate.h @@ -4,13 +4,13 @@ typedef struct __mavlink_vicon_position_estimate_t { - uint64_t usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot) - float x; ///< Global X position - float y; ///< Global Y position - float z; ///< Global Z position - float roll; ///< Roll angle in rad - float pitch; ///< Pitch angle in rad - float yaw; ///< Yaw angle in rad + uint64_t usec; /*< Timestamp (microseconds, synced to UNIX time or since system boot)*/ + float x; /*< Global X position*/ + float y; /*< Global Y position*/ + float z; /*< Global Z position*/ + float roll; /*< Roll angle in rad*/ + float pitch; /*< Pitch angle in rad*/ + float yaw; /*< Yaw angle in rad*/ } mavlink_vicon_position_estimate_t; #define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN 32 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vision_position_estimate.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vision_position_estimate.h index 8f82fb6..f3d8e5d 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vision_position_estimate.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vision_position_estimate.h @@ -4,13 +4,13 @@ typedef struct __mavlink_vision_position_estimate_t { - uint64_t usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot) - float x; ///< Global X position - float y; ///< Global Y position - float z; ///< Global Z position - float roll; ///< Roll angle in rad - float pitch; ///< Pitch angle in rad - float yaw; ///< Yaw angle in rad + uint64_t usec; /*< Timestamp (microseconds, synced to UNIX time or since system boot)*/ + float x; /*< Global X position*/ + float y; /*< Global Y position*/ + float z; /*< Global Z position*/ + float roll; /*< Roll angle in rad*/ + float pitch; /*< Pitch angle in rad*/ + float yaw; /*< Yaw angle in rad*/ } mavlink_vision_position_estimate_t; #define MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE_LEN 32 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vision_speed_estimate.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vision_speed_estimate.h index 7528014..0154ea4 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vision_speed_estimate.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/mavlink_msg_vision_speed_estimate.h @@ -4,10 +4,10 @@ typedef struct __mavlink_vision_speed_estimate_t { - uint64_t usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot) - float x; ///< Global X speed - float y; ///< Global Y speed - float z; ///< Global Z speed + uint64_t usec; /*< Timestamp (microseconds, synced to UNIX time or since system boot)*/ + float x; /*< Global X speed*/ + float y; /*< Global Y speed*/ + float z; /*< Global Z speed*/ } mavlink_vision_speed_estimate_t; #define MAVLINK_MSG_ID_VISION_SPEED_ESTIMATE_LEN 20 diff --git a/firmware/alce-osd.X/include/mavlink/v1.0/common/testsuite.h b/firmware/alce-osd.X/include/mavlink/v1.0/common/testsuite.h index 708b8a3..de5da4c 100644 --- a/firmware/alce-osd.X/include/mavlink/v1.0/common/testsuite.h +++ b/firmware/alce-osd.X/include/mavlink/v1.0/common/testsuite.h @@ -2135,7 +2135,7 @@ static void mavlink_test_local_position_ned_cov(uint8_t system_id, uint8_t compo uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; mavlink_local_position_ned_cov_t packet_in = { - 93372036854775807ULL,963497880,101.0,129.0,157.0,185.0,213.0,241.0,{ 269.0, 270.0, 271.0, 272.0, 273.0, 274.0, 275.0, 276.0, 277.0, 278.0, 279.0, 280.0, 281.0, 282.0, 283.0, 284.0, 285.0, 286.0, 287.0, 288.0, 289.0, 290.0, 291.0, 292.0, 293.0, 294.0, 295.0, 296.0, 297.0, 298.0, 299.0, 300.0, 301.0, 302.0, 303.0, 304.0 },33 + 93372036854775807ULL,963497880,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,{ 353.0, 354.0, 355.0, 356.0, 357.0, 358.0, 359.0, 360.0, 361.0, 362.0, 363.0, 364.0, 365.0, 366.0, 367.0, 368.0, 369.0, 370.0, 371.0, 372.0, 373.0, 374.0, 375.0, 376.0, 377.0, 378.0, 379.0, 380.0, 381.0, 382.0, 383.0, 384.0, 385.0, 386.0, 387.0, 388.0, 389.0, 390.0, 391.0, 392.0, 393.0, 394.0, 395.0, 396.0, 397.0 },177 }; mavlink_local_position_ned_cov_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); @@ -2147,9 +2147,12 @@ static void mavlink_test_local_position_ned_cov(uint8_t system_id, uint8_t compo packet1.vx = packet_in.vx; packet1.vy = packet_in.vy; packet1.vz = packet_in.vz; + packet1.ax = packet_in.ax; + packet1.ay = packet_in.ay; + packet1.az = packet_in.az; packet1.estimator_type = packet_in.estimator_type; - mav_array_memcpy(packet1.covariance, packet_in.covariance, sizeof(float)*36); + mav_array_memcpy(packet1.covariance, packet_in.covariance, sizeof(float)*45); memset(&packet2, 0, sizeof(packet2)); @@ -2158,12 +2161,12 @@ static void mavlink_test_local_position_ned_cov(uint8_t system_id, uint8_t compo MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_local_position_ned_cov_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.covariance ); + mavlink_msg_local_position_ned_cov_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az , packet1.covariance ); mavlink_msg_local_position_ned_cov_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_local_position_ned_cov_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.covariance ); + mavlink_msg_local_position_ned_cov_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az , packet1.covariance ); mavlink_msg_local_position_ned_cov_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -2176,7 +2179,7 @@ static void mavlink_test_local_position_ned_cov(uint8_t system_id, uint8_t compo MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_local_position_ned_cov_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.covariance ); + mavlink_msg_local_position_ned_cov_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az , packet1.covariance ); mavlink_msg_local_position_ned_cov_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); } @@ -3898,6 +3901,50 @@ static void mavlink_test_timesync(uint8_t system_id, uint8_t component_id, mavli MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); } +static void mavlink_test_camera_trigger(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_camera_trigger_t packet_in = { + 93372036854775807ULL,963497880 + }; + mavlink_camera_trigger_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.time_usec = packet_in.time_usec; + packet1.seq = packet_in.seq; + + + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_camera_trigger_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_camera_trigger_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_camera_trigger_pack(system_id, component_id, &msg , packet1.time_usec , packet1.seq ); + mavlink_msg_camera_trigger_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_camera_trigger_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.seq ); + mavlink_msg_camera_trigger_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 -#include -#include -#include - -#include -#include -#include -#include - -namespace mavlink -{ - -class ProtobufManager -{ -public: - ProtobufManager() - : mRegisteredTypeCount(0) - , mStreamID(0) - , mVerbose(false) - , kExtendedHeaderSize(MAVLINK_EXTENDED_HEADER_LEN) - , kExtendedPayloadMaxSize(MAVLINK_MAX_EXTENDED_PAYLOAD_LEN) - { - // register GLOverlay - { - std::tr1::shared_ptr msg(new px::GLOverlay); - registerType(msg); - } - - // register ObstacleList - { - std::tr1::shared_ptr msg(new px::ObstacleList); - registerType(msg); - } - - // register ObstacleMap - { - std::tr1::shared_ptr msg(new px::ObstacleMap); - registerType(msg); - } - - // register Path - { - std::tr1::shared_ptr msg(new px::Path); - registerType(msg); - } - - // register PointCloudXYZI - { - std::tr1::shared_ptr msg(new px::PointCloudXYZI); - registerType(msg); - } - - // register PointCloudXYZRGB - { - std::tr1::shared_ptr msg(new px::PointCloudXYZRGB); - registerType(msg); - } - - // register RGBDImage - { - std::tr1::shared_ptr msg(new px::RGBDImage); - registerType(msg); - } - - srand(time(NULL)); - mStreamID = rand() + 1; - } - - bool fragmentMessage(uint8_t system_id, uint8_t component_id, - uint8_t target_system, uint8_t target_component, - const google::protobuf::Message& protobuf_msg, - std::vector& fragments) const - { - TypeMap::const_iterator it = mTypeMap.find(protobuf_msg.GetTypeName()); - if (it == mTypeMap.end()) - { - std::cout << "# WARNING: Protobuf message with type " - << protobuf_msg.GetTypeName() << " is not registered." - << std::endl; - return false; - } - - uint8_t typecode = it->second; - - std::string data = protobuf_msg.SerializeAsString(); - - int fragmentCount = (protobuf_msg.ByteSize() + kExtendedPayloadMaxSize - 1) / kExtendedPayloadMaxSize; - unsigned int offset = 0; - - for (int i = 0; i < fragmentCount; ++i) - { - mavlink_extended_message_t fragment; - - // write extended header data - uint8_t* payload = reinterpret_cast(fragment.base_msg.payload64); - unsigned int length = 0; - uint8_t flags = 0; - - if (i < fragmentCount - 1) - { - length = kExtendedPayloadMaxSize; - flags |= 0x1; - } - else - { - length = protobuf_msg.ByteSize() - kExtendedPayloadMaxSize * (fragmentCount - 1); - } - - memcpy(payload, &target_system, 1); - memcpy(payload + 1, &target_component, 1); - memcpy(payload + 2, &typecode, 1); - memcpy(payload + 3, &length, 4); - memcpy(payload + 7, &mStreamID, 2); - memcpy(payload + 9, &offset, 4); - memcpy(payload + 13, &flags, 1); - - fragment.base_msg.msgid = MAVLINK_MSG_ID_EXTENDED_MESSAGE; - mavlink_finalize_message(&fragment.base_msg, system_id, component_id, kExtendedHeaderSize, 0); - - // write extended payload data - fragment.extended_payload_len = length; - memcpy(fragment.extended_payload, &data[offset], length); - - fragments.push_back(fragment); - offset += length; - } - - if (mVerbose) - { - std::cerr << "# INFO: Split extended message with size " - << protobuf_msg.ByteSize() << " into " - << fragmentCount << " fragments." << std::endl; - } - - return true; - } - - bool cacheFragment(mavlink_extended_message_t& msg) - { - if (!validFragment(msg)) - { - if (mVerbose) - { - std::cerr << "# WARNING: Message is not a valid fragment. " - << "Dropping message..." << std::endl; - } - return false; - } - - // read extended header - uint8_t* payload = reinterpret_cast(msg.base_msg.payload64); - uint8_t typecode = 0; - unsigned int length = 0; - unsigned short streamID = 0; - unsigned int offset = 0; - uint8_t flags = 0; - - memcpy(&typecode, payload + 2, 1); - memcpy(&length, payload + 3, 4); - memcpy(&streamID, payload + 7, 2); - memcpy(&offset, payload + 9, 4); - memcpy(&flags, payload + 13, 1); - - if (typecode >= mTypeMap.size()) - { - std::cout << "# WARNING: Protobuf message with type code " - << static_cast(typecode) << " is not registered." << std::endl; - return false; - } - - bool reassemble = false; - - FragmentQueue::iterator it = mFragmentQueue.find(streamID); - if (it == mFragmentQueue.end()) - { - if (offset == 0) - { - mFragmentQueue[streamID].push_back(msg); - - if ((flags & 0x1) != 0x1) - { - reassemble = true; - } - - if (mVerbose) - { - std::cerr << "# INFO: Added fragment to new queue." - << std::endl; - } - } - else - { - if (mVerbose) - { - std::cerr << "# WARNING: Message is not a valid fragment. " - << "Dropping message..." << std::endl; - } - } - } - else - { - std::deque& queue = it->second; - - if (queue.empty()) - { - if (offset == 0) - { - queue.push_back(msg); - - if ((flags & 0x1) != 0x1) - { - reassemble = true; - } - } - else - { - if (mVerbose) - { - std::cerr << "# WARNING: Message is not a valid fragment. " - << "Dropping message..." << std::endl; - } - } - } - else - { - if (fragmentDataSize(queue.back()) + fragmentOffset(queue.back()) != offset) - { - if (mVerbose) - { - std::cerr << "# WARNING: Previous fragment(s) have been lost. " - << "Dropping message and clearing queue..." << std::endl; - } - queue.clear(); - } - else - { - queue.push_back(msg); - - if ((flags & 0x1) != 0x1) - { - reassemble = true; - } - } - } - } - - if (reassemble) - { - std::deque& queue = mFragmentQueue[streamID]; - - std::string data; - for (size_t i = 0; i < queue.size(); ++i) - { - mavlink_extended_message_t& mavlink_msg = queue.at(i); - - data.append(reinterpret_cast(&mavlink_msg.extended_payload[0]), - static_cast(mavlink_msg.extended_payload_len)); - } - - mMessages.at(typecode)->ParseFromString(data); - - mMessageAvailable.at(typecode) = true; - - queue.clear(); - - if (mVerbose) - { - std::cerr << "# INFO: Reassembled fragments for message with typename " - << mMessages.at(typecode)->GetTypeName() << " and size " - << mMessages.at(typecode)->ByteSize() - << "." << std::endl; - } - } - - return true; - } - - bool getMessage(std::tr1::shared_ptr& msg) - { - for (size_t i = 0; i < mMessageAvailable.size(); ++i) - { - if (mMessageAvailable.at(i)) - { - msg = mMessages.at(i); - mMessageAvailable.at(i) = false; - - return true; - } - } - - return false; - } - -private: - void registerType(const std::tr1::shared_ptr& msg) - { - mTypeMap[msg->GetTypeName()] = mRegisteredTypeCount; - ++mRegisteredTypeCount; - mMessages.push_back(msg); - mMessageAvailable.push_back(false); - } - - bool validFragment(const mavlink_extended_message_t& msg) const - { - if (msg.base_msg.magic != MAVLINK_STX || - msg.base_msg.len != kExtendedHeaderSize || - msg.base_msg.msgid != MAVLINK_MSG_ID_EXTENDED_MESSAGE) - { - return false; - } - - uint16_t checksum; - checksum = crc_calculate(reinterpret_cast(&msg.base_msg.len), MAVLINK_CORE_HEADER_LEN); - crc_accumulate_buffer(&checksum, reinterpret_cast(&msg.base_msg.payload64), kExtendedHeaderSize); -#if MAVLINK_CRC_EXTRA - static const uint8_t mavlink_message_crcs[256] = MAVLINK_MESSAGE_CRCS; - crc_accumulate(mavlink_message_crcs[msg.base_msg.msgid], &checksum); -#endif - - if (mavlink_ck_a(&(msg.base_msg)) != (uint8_t)(checksum & 0xFF) && - mavlink_ck_b(&(msg.base_msg)) != (uint8_t)(checksum >> 8)) - { - return false; - } - - return true; - } - - unsigned int fragmentDataSize(const mavlink_extended_message_t& msg) const - { - const uint8_t* payload = reinterpret_cast(msg.base_msg.payload64); - - return *(reinterpret_cast(payload + 3)); - } - - unsigned int fragmentOffset(const mavlink_extended_message_t& msg) const - { - const uint8_t* payload = reinterpret_cast(msg.base_msg.payload64); - - return *(reinterpret_cast(payload + 9)); - } - - int mRegisteredTypeCount; - unsigned short mStreamID; - bool mVerbose; - - typedef std::map TypeMap; - TypeMap mTypeMap; - std::vector< std::tr1::shared_ptr > mMessages; - std::vector mMessageAvailable; - - typedef std::map > FragmentQueue; - FragmentQueue mFragmentQueue; - - const int kExtendedHeaderSize; - /** - * Extended header structure - * ========================= - * byte 0 - target_system - * byte 1 - target_component - * byte 2 - extended message id (type code) - * bytes 3-6 - extended payload size in bytes - * byte 7-8 - stream ID - * byte 9-12 - fragment offset - * byte 13 - fragment flags (bit 0 - 1=more fragments, 0=last fragment) - */ - - const int kExtendedPayloadMaxSize; -}; - -} - -#endif