Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Implemented channel parse state reset

  • Loading branch information...
commit 654a2a6797d7bf5e0249969013e7758aba9e6bfc 1 parent 4b5a966
@LorenzMeier LorenzMeier authored
View
13 pymavlink/generator/C/include_v1.0/mavlink_helpers.h
@@ -9,8 +9,17 @@
#define MAVLINK_HELPER
#endif
+/**
+ * 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;
+}
+
/*
- 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 +28,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)
{
View
1  pymavlink/generator/C/include_v1.0/protocol.h
@@ -43,6 +43,7 @@
/* always include the prototypes to ensure we don't get out of sync */
MAVLINK_HELPER mavlink_status_t* mavlink_get_channel_status(uint8_t chan);
+MAVLINK_HELPER void mavlink_reset_channel_status(uint8_t chan);
#if MAVLINK_CRC_EXTRA
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t* msg, uint8_t system_id, uint8_t component_id,
uint8_t chan, uint8_t length, uint8_t crc_extra);

0 comments on commit 654a2a6

Please sign in to comment.
Something went wrong with that request. Please try again.