aboutsummaryrefslogtreecommitdiff
path: root/mavlink/include/mavlink/v1.0/mavlink_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'mavlink/include/mavlink/v1.0/mavlink_helpers.h')
-rw-r--r--mavlink/include/mavlink/v1.0/mavlink_helpers.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/mavlink/include/mavlink/v1.0/mavlink_helpers.h b/mavlink/include/mavlink/v1.0/mavlink_helpers.h
index 28ef24cbf..f0f3404a2 100644
--- a/mavlink/include/mavlink/v1.0/mavlink_helpers.h
+++ b/mavlink/include/mavlink/v1.0/mavlink_helpers.h
@@ -10,7 +10,7 @@
#endif
/*
- internal function to give access to the channel status for each channel
+ * Internal function to give access to the channel status for each channel
*/
MAVLINK_HELPER mavlink_status_t* mavlink_get_channel_status(uint8_t chan)
{
@@ -19,7 +19,7 @@ MAVLINK_HELPER mavlink_status_t* mavlink_get_channel_status(uint8_t chan)
}
/*
- internal function to give access to the channel buffer for each channel
+ * Internal function to give access to the channel buffer for each channel
*/
MAVLINK_HELPER mavlink_message_t* mavlink_get_channel_buffer(uint8_t chan)
{
@@ -37,6 +37,15 @@ MAVLINK_HELPER mavlink_message_t* mavlink_get_channel_buffer(uint8_t chan)
}
/**
+ * @brief Reset the status of a channel.
+ */
+MAVLINK_HELPER void mavlink_reset_channel_status(uint8_t chan)
+{
+ mavlink_status_t *status = mavlink_get_channel_status(chan);
+ status->parse_state = MAVLINK_PARSE_STATE_IDLE;
+}
+
+/**
* @brief Finalize a MAVLink message with channel assignment
*
* This function calculates the checksum and sets length and aircraft id correctly.