Skip to content

Commit

Permalink
generator: remove written-only bufferIndex state
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jul 14, 2021
1 parent e011673 commit 183dec6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions generator/C/include_v0.9/mavlink_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -381,7 +380,6 @@ the headers.
break;
}

bufferIndex++;
// If a message has been successfully decoded, check index
if (status->msg_received == 1)
{
Expand Down
3 changes: 0 additions & 3 deletions generator/C/include_v1.0/mavlink_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down
3 changes: 0 additions & 3 deletions generator/C/include_v2.0/mavlink_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down
3 changes: 0 additions & 3 deletions mavnative/mavnative.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 183dec6

Please sign in to comment.