diff --git a/generator/C/include_v0.9/mavlink_helpers.h b/generator/C/include_v0.9/mavlink_helpers.h index d8f2c70e0..b7f9fd039 100644 --- a/generator/C/include_v0.9/mavlink_helpers.h +++ b/generator/C/include_v0.9/mavlink_helpers.h @@ -245,7 +245,6 @@ the headers. mavlink_message_t* rxmsg = mavlink_get_channel_buffer(chan); ///< The currently decoded message mavlink_status_t* status = mavlink_get_channel_status(chan); ///< The current decode status - int bufferIndex = 0; status->msg_received = 0; @@ -381,7 +380,6 @@ the headers. break; } - bufferIndex++; // If a message has been successfully decoded, check index if (status->msg_received == 1) { diff --git a/generator/C/include_v1.0/mavlink_helpers.h b/generator/C/include_v1.0/mavlink_helpers.h index 22e5d406c..3d82a4dff 100644 --- a/generator/C/include_v1.0/mavlink_helpers.h +++ b/generator/C/include_v1.0/mavlink_helpers.h @@ -248,8 +248,6 @@ MAVLINK_HELPER uint8_t mavlink_frame_char_buffer(mavlink_message_t* rxmsg, #endif #endif - int bufferIndex = 0; - status->msg_received = MAVLINK_FRAMING_INCOMPLETE; switch (status->parse_state) @@ -364,7 +362,6 @@ MAVLINK_HELPER uint8_t mavlink_frame_char_buffer(mavlink_message_t* rxmsg, break; } - bufferIndex++; // If a message has been successfully decoded, check index if (status->msg_received == MAVLINK_FRAMING_OK) { diff --git a/generator/C/include_v2.0/mavlink_helpers.h b/generator/C/include_v2.0/mavlink_helpers.h index 717389930..b5e49bdfa 100644 --- a/generator/C/include_v2.0/mavlink_helpers.h +++ b/generator/C/include_v2.0/mavlink_helpers.h @@ -574,8 +574,6 @@ MAVLINK_HELPER uint8_t mavlink_frame_char_buffer(mavlink_message_t* rxmsg, mavlink_message_t* r_message, mavlink_status_t* r_mavlink_status) { - int bufferIndex = 0; - status->msg_received = MAVLINK_FRAMING_INCOMPLETE; switch (status->parse_state) @@ -801,7 +799,6 @@ MAVLINK_HELPER uint8_t mavlink_frame_char_buffer(mavlink_message_t* rxmsg, break; } - bufferIndex++; // If a message has been successfully decoded, check index if (status->msg_received == MAVLINK_FRAMING_OK) { diff --git a/mavnative/mavnative.c b/mavnative/mavnative.c index 49ab25658..2172a2825 100644 --- a/mavnative/mavnative.c +++ b/mavnative/mavnative.c @@ -148,8 +148,6 @@ MAVLINK_HELPER uint8_t py_mavlink_parse_char(uint8_t c, py_message_t* pymsg, mav { mavlink_message_t *rxmsg = &pymsg->msg; - int bufferIndex = 0; - status->msg_received = 0; switch (status->parse_state) @@ -296,7 +294,6 @@ MAVLINK_HELPER uint8_t py_mavlink_parse_char(uint8_t c, py_message_t* pymsg, mav break; } - bufferIndex++; // If a message has been successfully decoded, check index if (status->msg_received == 1) {