aboutsummaryrefslogtreecommitdiff
path: root/mavlink/include/mavlink/v1.0/matrixpilot/mavlink_msg_serial_udb_extra_f2_b.h
diff options
context:
space:
mode:
Diffstat (limited to 'mavlink/include/mavlink/v1.0/matrixpilot/mavlink_msg_serial_udb_extra_f2_b.h')
-rw-r--r--mavlink/include/mavlink/v1.0/matrixpilot/mavlink_msg_serial_udb_extra_f2_b.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/mavlink/include/mavlink/v1.0/matrixpilot/mavlink_msg_serial_udb_extra_f2_b.h b/mavlink/include/mavlink/v1.0/matrixpilot/mavlink_msg_serial_udb_extra_f2_b.h
index 7cb8c87da..3e1757f74 100644
--- a/mavlink/include/mavlink/v1.0/matrixpilot/mavlink_msg_serial_udb_extra_f2_b.h
+++ b/mavlink/include/mavlink/v1.0/matrixpilot/mavlink_msg_serial_udb_extra_f2_b.h
@@ -498,6 +498,102 @@ static inline void mavlink_msg_serial_udb_extra_f2_b_send(mavlink_channel_t chan
#endif
}
+#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_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_serial_udb_extra_f2_b_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t sue_time, int16_t sue_pwm_input_1, int16_t sue_pwm_input_2, int16_t sue_pwm_input_3, int16_t sue_pwm_input_4, int16_t sue_pwm_input_5, int16_t sue_pwm_input_6, int16_t sue_pwm_input_7, int16_t sue_pwm_input_8, int16_t sue_pwm_input_9, int16_t sue_pwm_input_10, int16_t sue_pwm_output_1, int16_t sue_pwm_output_2, int16_t sue_pwm_output_3, int16_t sue_pwm_output_4, int16_t sue_pwm_output_5, int16_t sue_pwm_output_6, int16_t sue_pwm_output_7, int16_t sue_pwm_output_8, int16_t sue_pwm_output_9, int16_t sue_pwm_output_10, int16_t sue_imu_location_x, int16_t sue_imu_location_y, int16_t sue_imu_location_z, uint32_t sue_flags, int16_t sue_osc_fails, int16_t sue_imu_velocity_x, int16_t sue_imu_velocity_y, int16_t sue_imu_velocity_z, int16_t sue_waypoint_goal_x, int16_t sue_waypoint_goal_y, int16_t sue_waypoint_goal_z, int16_t sue_memory_stack_free)
+{
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
+ char *buf = (char *)msgbuf;
+ _mav_put_uint32_t(buf, 0, sue_time);
+ _mav_put_uint32_t(buf, 4, sue_flags);
+ _mav_put_int16_t(buf, 8, sue_pwm_input_1);
+ _mav_put_int16_t(buf, 10, sue_pwm_input_2);
+ _mav_put_int16_t(buf, 12, sue_pwm_input_3);
+ _mav_put_int16_t(buf, 14, sue_pwm_input_4);
+ _mav_put_int16_t(buf, 16, sue_pwm_input_5);
+ _mav_put_int16_t(buf, 18, sue_pwm_input_6);
+ _mav_put_int16_t(buf, 20, sue_pwm_input_7);
+ _mav_put_int16_t(buf, 22, sue_pwm_input_8);
+ _mav_put_int16_t(buf, 24, sue_pwm_input_9);
+ _mav_put_int16_t(buf, 26, sue_pwm_input_10);
+ _mav_put_int16_t(buf, 28, sue_pwm_output_1);
+ _mav_put_int16_t(buf, 30, sue_pwm_output_2);
+ _mav_put_int16_t(buf, 32, sue_pwm_output_3);
+ _mav_put_int16_t(buf, 34, sue_pwm_output_4);
+ _mav_put_int16_t(buf, 36, sue_pwm_output_5);
+ _mav_put_int16_t(buf, 38, sue_pwm_output_6);
+ _mav_put_int16_t(buf, 40, sue_pwm_output_7);
+ _mav_put_int16_t(buf, 42, sue_pwm_output_8);
+ _mav_put_int16_t(buf, 44, sue_pwm_output_9);
+ _mav_put_int16_t(buf, 46, sue_pwm_output_10);
+ _mav_put_int16_t(buf, 48, sue_imu_location_x);
+ _mav_put_int16_t(buf, 50, sue_imu_location_y);
+ _mav_put_int16_t(buf, 52, sue_imu_location_z);
+ _mav_put_int16_t(buf, 54, sue_osc_fails);
+ _mav_put_int16_t(buf, 56, sue_imu_velocity_x);
+ _mav_put_int16_t(buf, 58, sue_imu_velocity_y);
+ _mav_put_int16_t(buf, 60, sue_imu_velocity_z);
+ _mav_put_int16_t(buf, 62, sue_waypoint_goal_x);
+ _mav_put_int16_t(buf, 64, sue_waypoint_goal_y);
+ _mav_put_int16_t(buf, 66, sue_waypoint_goal_z);
+ _mav_put_int16_t(buf, 68, sue_memory_stack_free);
+
+#if MAVLINK_CRC_EXTRA
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC);
+#else
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN);
+#endif
+#else
+ mavlink_serial_udb_extra_f2_b_t *packet = (mavlink_serial_udb_extra_f2_b_t *)msgbuf;
+ packet->sue_time = sue_time;
+ packet->sue_flags = sue_flags;
+ packet->sue_pwm_input_1 = sue_pwm_input_1;
+ packet->sue_pwm_input_2 = sue_pwm_input_2;
+ packet->sue_pwm_input_3 = sue_pwm_input_3;
+ packet->sue_pwm_input_4 = sue_pwm_input_4;
+ packet->sue_pwm_input_5 = sue_pwm_input_5;
+ packet->sue_pwm_input_6 = sue_pwm_input_6;
+ packet->sue_pwm_input_7 = sue_pwm_input_7;
+ packet->sue_pwm_input_8 = sue_pwm_input_8;
+ packet->sue_pwm_input_9 = sue_pwm_input_9;
+ packet->sue_pwm_input_10 = sue_pwm_input_10;
+ packet->sue_pwm_output_1 = sue_pwm_output_1;
+ packet->sue_pwm_output_2 = sue_pwm_output_2;
+ packet->sue_pwm_output_3 = sue_pwm_output_3;
+ packet->sue_pwm_output_4 = sue_pwm_output_4;
+ packet->sue_pwm_output_5 = sue_pwm_output_5;
+ packet->sue_pwm_output_6 = sue_pwm_output_6;
+ packet->sue_pwm_output_7 = sue_pwm_output_7;
+ packet->sue_pwm_output_8 = sue_pwm_output_8;
+ packet->sue_pwm_output_9 = sue_pwm_output_9;
+ packet->sue_pwm_output_10 = sue_pwm_output_10;
+ packet->sue_imu_location_x = sue_imu_location_x;
+ packet->sue_imu_location_y = sue_imu_location_y;
+ packet->sue_imu_location_z = sue_imu_location_z;
+ packet->sue_osc_fails = sue_osc_fails;
+ packet->sue_imu_velocity_x = sue_imu_velocity_x;
+ packet->sue_imu_velocity_y = sue_imu_velocity_y;
+ packet->sue_imu_velocity_z = sue_imu_velocity_z;
+ packet->sue_waypoint_goal_x = sue_waypoint_goal_x;
+ packet->sue_waypoint_goal_y = sue_waypoint_goal_y;
+ packet->sue_waypoint_goal_z = sue_waypoint_goal_z;
+ packet->sue_memory_stack_free = sue_memory_stack_free;
+
+#if MAVLINK_CRC_EXTRA
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC);
+#else
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN);
+#endif
+#endif
+}
+#endif
+
#endif
// MESSAGE SERIAL_UDB_EXTRA_F2_B UNPACKING