Remove high and low byte union for message length

This commit is contained in:
2023-02-21 14:23:58 -06:00
parent ca82982a76
commit 6e10db0e07
3 changed files with 4 additions and 10 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
enum MESSAGEERR
message_validate(const union Message* message) {
uint16_t length = (message->header.length_h & 0x3) * 0xFF + message->header.length_l;
uint16_t length = message->header.length;
if(message->header.crc != crc8(message, 3))
return MESSAGEERR_HEADERCRC;