From ab5a4c229711e014095a38f7190548d42a1e62ce Mon Sep 17 00:00:00 2001 From: Nick Willard Date: Thu, 3 Aug 2023 15:00:51 +1000 Subject: [PATCH] Fix bitshifting issue on 8bit AVR boards when using msgid > 255 Fix stray full stop --- generator/C/include_v2.0/mavlink_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/C/include_v2.0/mavlink_helpers.h b/generator/C/include_v2.0/mavlink_helpers.h index b36f51e42..75c75d078 100644 --- a/generator/C/include_v2.0/mavlink_helpers.h +++ b/generator/C/include_v2.0/mavlink_helpers.h @@ -707,7 +707,7 @@ MAVLINK_HELPER uint8_t mavlink_frame_char_buffer(mavlink_message_t* rxmsg, break; case MAVLINK_PARSE_STATE_GOT_MSGID1: - rxmsg->msgid |= c<<8; + rxmsg->msgid |= ((uint32_t)c)<<8; mavlink_update_checksum(rxmsg, c); status->parse_state = MAVLINK_PARSE_STATE_GOT_MSGID2; break;