Commit 2c8f11af authored by PX4BuildBot's avatar PX4BuildBot

autogenerated headers for rev...

autogenerated headers for rev https://github.com/mavlink/mavlink/tree/193d2bde436eadce1fb930eb19bc71b0879a812d
parent 5744b130
This diff is collapsed.
......@@ -706,23 +706,6 @@ 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_BAD_ORIENTATION=6, /* | */
MAG_CAL_BAD_RADIUS=7, /* | */
MAG_CAL_STATUS_ENUM_END=8, /* | */
} 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
......@@ -931,7 +914,6 @@ typedef enum TRACKER_MODE
#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_deepstall.h"
......
......@@ -2162,77 +2162,6 @@ static void mavlink_test_mag_cal_progress(uint8_t system_id, uint8_t component_i
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_mag_cal_report(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_MAG_CAL_REPORT >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mag_cal_report_t packet_in = {
17.0,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,125,192,3,70,325.0,149,216,367.0
};
mavlink_mag_cal_report_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.fitness = packet_in.fitness;
packet1.ofs_x = packet_in.ofs_x;
packet1.ofs_y = packet_in.ofs_y;
packet1.ofs_z = packet_in.ofs_z;
packet1.diag_x = packet_in.diag_x;
packet1.diag_y = packet_in.diag_y;
packet1.diag_z = packet_in.diag_z;
packet1.offdiag_x = packet_in.offdiag_x;
packet1.offdiag_y = packet_in.offdiag_y;
packet1.offdiag_z = packet_in.offdiag_z;
packet1.compass_id = packet_in.compass_id;
packet1.cal_mask = packet_in.cal_mask;
packet1.cal_status = packet_in.cal_status;
packet1.autosaved = packet_in.autosaved;
packet1.orientation_confidence = packet_in.orientation_confidence;
packet1.old_orientation = packet_in.old_orientation;
packet1.new_orientation = packet_in.new_orientation;
packet1.scale_factor = packet_in.scale_factor;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mag_cal_report_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mag_cal_report_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mag_cal_report_pack(system_id, component_id, &msg , packet1.compass_id , packet1.cal_mask , packet1.cal_status , packet1.autosaved , packet1.fitness , packet1.ofs_x , packet1.ofs_y , packet1.ofs_z , packet1.diag_x , packet1.diag_y , packet1.diag_z , packet1.offdiag_x , packet1.offdiag_y , packet1.offdiag_z , packet1.orientation_confidence , packet1.old_orientation , packet1.new_orientation , packet1.scale_factor );
mavlink_msg_mag_cal_report_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mag_cal_report_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.compass_id , packet1.cal_mask , packet1.cal_status , packet1.autosaved , packet1.fitness , packet1.ofs_x , packet1.ofs_y , packet1.ofs_z , packet1.diag_x , packet1.diag_y , packet1.diag_z , packet1.offdiag_x , packet1.offdiag_y , packet1.offdiag_z , packet1.orientation_confidence , packet1.old_orientation , packet1.new_orientation , packet1.scale_factor );
mavlink_msg_mag_cal_report_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mag_cal_report_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mag_cal_report_send(MAVLINK_COMM_1 , packet1.compass_id , packet1.cal_mask , packet1.cal_status , packet1.autosaved , packet1.fitness , packet1.ofs_x , packet1.ofs_y , packet1.ofs_z , packet1.diag_x , packet1.diag_y , packet1.diag_z , packet1.offdiag_x , packet1.offdiag_y , packet1.offdiag_z , packet1.orientation_confidence , packet1.old_orientation , packet1.new_orientation , packet1.scale_factor );
mavlink_msg_mag_cal_report_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_ekf_status_report(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
......@@ -3635,7 +3564,6 @@ static void mavlink_test_ardupilotmega(uint8_t system_id, uint8_t component_id,
mavlink_test_remote_log_block_status(system_id, component_id, last_msg);
mavlink_test_led_control(system_id, component_id, last_msg);
mavlink_test_mag_cal_progress(system_id, component_id, last_msg);
mavlink_test_mag_cal_report(system_id, component_id, last_msg);
mavlink_test_ekf_status_report(system_id, component_id, last_msg);
mavlink_test_pid_tuning(system_id, component_id, last_msg);
mavlink_test_deepstall(system_id, component_id, last_msg);
......
This diff is collapsed.
This diff is collapsed.
......@@ -7406,6 +7406,77 @@ static void mavlink_test_fence_status(uint8_t system_id, uint8_t component_id, m
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_mag_cal_report(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_MAG_CAL_REPORT >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_mag_cal_report_t packet_in = {
17.0,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,125,192,3,70,325.0,149,216,367.0
};
mavlink_mag_cal_report_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.fitness = packet_in.fitness;
packet1.ofs_x = packet_in.ofs_x;
packet1.ofs_y = packet_in.ofs_y;
packet1.ofs_z = packet_in.ofs_z;
packet1.diag_x = packet_in.diag_x;
packet1.diag_y = packet_in.diag_y;
packet1.diag_z = packet_in.diag_z;
packet1.offdiag_x = packet_in.offdiag_x;
packet1.offdiag_y = packet_in.offdiag_y;
packet1.offdiag_z = packet_in.offdiag_z;
packet1.compass_id = packet_in.compass_id;
packet1.cal_mask = packet_in.cal_mask;
packet1.cal_status = packet_in.cal_status;
packet1.autosaved = packet_in.autosaved;
packet1.orientation_confidence = packet_in.orientation_confidence;
packet1.old_orientation = packet_in.old_orientation;
packet1.new_orientation = packet_in.new_orientation;
packet1.scale_factor = packet_in.scale_factor;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mag_cal_report_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_mag_cal_report_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mag_cal_report_pack(system_id, component_id, &msg , packet1.compass_id , packet1.cal_mask , packet1.cal_status , packet1.autosaved , packet1.fitness , packet1.ofs_x , packet1.ofs_y , packet1.ofs_z , packet1.diag_x , packet1.diag_y , packet1.diag_z , packet1.offdiag_x , packet1.offdiag_y , packet1.offdiag_z , packet1.orientation_confidence , packet1.old_orientation , packet1.new_orientation , packet1.scale_factor );
mavlink_msg_mag_cal_report_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mag_cal_report_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.compass_id , packet1.cal_mask , packet1.cal_status , packet1.autosaved , packet1.fitness , packet1.ofs_x , packet1.ofs_y , packet1.ofs_z , packet1.diag_x , packet1.diag_y , packet1.diag_z , packet1.offdiag_x , packet1.offdiag_y , packet1.offdiag_z , packet1.orientation_confidence , packet1.old_orientation , packet1.new_orientation , packet1.scale_factor );
mavlink_msg_mag_cal_report_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_mag_cal_report_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_mag_cal_report_send(MAVLINK_COMM_1 , packet1.compass_id , packet1.cal_mask , packet1.cal_status , packet1.autosaved , packet1.fitness , packet1.ofs_x , packet1.ofs_y , packet1.ofs_z , packet1.diag_x , packet1.diag_y , packet1.diag_z , packet1.offdiag_x , packet1.offdiag_y , packet1.offdiag_z , packet1.orientation_confidence , packet1.old_orientation , packet1.new_orientation , packet1.scale_factor );
mavlink_msg_mag_cal_report_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_estimator_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
......@@ -13005,6 +13076,7 @@ static void mavlink_test_common(uint8_t system_id, uint8_t component_id, mavlink
mavlink_test_autopilot_version(system_id, component_id, last_msg);
mavlink_test_landing_target(system_id, component_id, last_msg);
mavlink_test_fence_status(system_id, component_id, last_msg);
mavlink_test_mag_cal_report(system_id, component_id, last_msg);
mavlink_test_estimator_status(system_id, component_id, last_msg);
mavlink_test_wind_cov(system_id, component_id, last_msg);
mavlink_test_gps_input(system_id, component_id, last_msg);
......
This diff is collapsed.
......@@ -854,16 +854,6 @@
<entry value="5" name="PID_TUNING_STEER"/>
<entry value="6" name="PID_TUNING_LANDING"/>
</enum>
<enum name="MAG_CAL_STATUS">
<entry value="0" name="MAG_CAL_NOT_STARTED"/>
<entry value="1" name="MAG_CAL_WAITING_TO_START"/>
<entry value="2" name="MAG_CAL_RUNNING_STEP_ONE"/>
<entry value="3" name="MAG_CAL_RUNNING_STEP_TWO"/>
<entry value="4" name="MAG_CAL_SUCCESS"/>
<entry value="5" name="MAG_CAL_FAILED"/>
<entry value="6" name="MAG_CAL_BAD_ORIENTATION"/>
<entry value="7" name="MAG_CAL_BAD_RADIUS"/>
</enum>
<enum name="MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS">
<description>Special ACK block numbers control activation of dataflash log streaming.</description>
<!-- C uses signed integers for enumerations; these constants start at MAX_INT32_T and go down -->
......@@ -1358,28 +1348,7 @@
<field type="float" name="direction_y">Body frame direction vector for display.</field>
<field type="float" name="direction_z">Body frame direction vector for display.</field>
</message>
<message id="192" name="MAG_CAL_REPORT">
<description>Reports results of completed compass calibration. Sent until MAG_CAL_ACK received.</description>
<field type="uint8_t" name="compass_id">Compass being calibrated.</field>
<field type="uint8_t" name="cal_mask" display="bitmask">Bitmask of compasses being calibrated.</field>
<field type="uint8_t" name="cal_status" enum="MAG_CAL_STATUS">Calibration Status.</field>
<field type="uint8_t" name="autosaved">0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters.</field>
<field type="float" name="fitness" units="mgauss">RMS milligauss residuals.</field>
<field type="float" name="ofs_x">X offset.</field>
<field type="float" name="ofs_y">Y offset.</field>
<field type="float" name="ofs_z">Z offset.</field>
<field type="float" name="diag_x">X diagonal (matrix 11).</field>
<field type="float" name="diag_y">Y diagonal (matrix 22).</field>
<field type="float" name="diag_z">Z diagonal (matrix 33).</field>
<field type="float" name="offdiag_x">X off-diagonal (matrix 12 and 21).</field>
<field type="float" name="offdiag_y">Y off-diagonal (matrix 13 and 31).</field>
<field type="float" name="offdiag_z">Z off-diagonal (matrix 32 and 23).</field>
<extensions/>
<field type="float" name="orientation_confidence">Confidence in orientation (higher is better).</field>
<field type="uint8_t" name="old_orientation" enum="MAV_SENSOR_ORIENTATION">orientation before calibration.</field>
<field type="uint8_t" name="new_orientation" enum="MAV_SENSOR_ORIENTATION">orientation after calibration.</field>
<field type="float" name="scale_factor">field radius correction factor</field>
</message>
<!-- 192 MAG_CAL_REPORT moved to common.xml -->
<!-- EKF status message from autopilot to GCS. -->
<message id="193" name="EKF_STATUS_REPORT">
<description>EKF Status message including flags and variances.</description>
......
......@@ -4190,6 +4190,16 @@
<description>Winch clutch is engaged allowing motor to move freely</description>
</entry>
</enum>
<enum name="MAG_CAL_STATUS">
<entry value="0" name="MAG_CAL_NOT_STARTED"/>
<entry value="1" name="MAG_CAL_WAITING_TO_START"/>
<entry value="2" name="MAG_CAL_RUNNING_STEP_ONE"/>
<entry value="3" name="MAG_CAL_RUNNING_STEP_TWO"/>
<entry value="4" name="MAG_CAL_SUCCESS"/>
<entry value="5" name="MAG_CAL_FAILED"/>
<entry value="6" name="MAG_CAL_BAD_ORIENTATION"/>
<entry value="7" name="MAG_CAL_BAD_RADIUS"/>
</enum>
</enums>
<messages>
<message id="1" name="SYS_STATUS">
......@@ -5586,6 +5596,30 @@
<field type="uint8_t" name="breach_mitigation" enum="FENCE_MITIGATE">Active action to prevent fence breach</field>
</message>
<!-- MESSAGE IDs 180 - 229: Space for custom messages in individual projectname_messages.xml files -->
<!-- 192 MAG_CAL_REPORT imported from ardupilotmega.xml -->
<message id="192" name="MAG_CAL_REPORT">
<description>Reports results of completed compass calibration. Sent until MAG_CAL_ACK received.</description>
<field type="uint8_t" name="compass_id">Compass being calibrated.</field>
<field type="uint8_t" name="cal_mask" display="bitmask">Bitmask of compasses being calibrated.</field>
<field type="uint8_t" name="cal_status" enum="MAG_CAL_STATUS">Calibration Status.</field>
<field type="uint8_t" name="autosaved">0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters.</field>
<field type="float" name="fitness" units="mgauss">RMS milligauss residuals.</field>
<field type="float" name="ofs_x">X offset.</field>
<field type="float" name="ofs_y">Y offset.</field>
<field type="float" name="ofs_z">Z offset.</field>
<field type="float" name="diag_x">X diagonal (matrix 11).</field>
<field type="float" name="diag_y">Y diagonal (matrix 22).</field>
<field type="float" name="diag_z">Z diagonal (matrix 33).</field>
<field type="float" name="offdiag_x">X off-diagonal (matrix 12 and 21).</field>
<field type="float" name="offdiag_y">Y off-diagonal (matrix 13 and 31).</field>
<field type="float" name="offdiag_z">Z off-diagonal (matrix 32 and 23).</field>
<extensions/>
<field type="float" name="orientation_confidence">Confidence in orientation (higher is better).</field>
<field type="uint8_t" name="old_orientation" enum="MAV_SENSOR_ORIENTATION">orientation before calibration.</field>
<field type="uint8_t" name="new_orientation" enum="MAV_SENSOR_ORIENTATION">orientation after calibration.</field>
<field type="float" name="scale_factor">field radius correction factor</field>
</message>
<!-- MESSAGE IDs 180 - 229: Space for custom messages in individual projectname_messages.xml files -->
<message id="230" name="ESTIMATOR_STATUS">
<description>Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user.</description>
<field type="uint64_t" name="time_usec" units="us">Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.</field>
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment