Skip to content

Commit

Permalink
Fixed wrong MSB LSB order in id filtering as well
Browse files Browse the repository at this point in the history
  • Loading branch information
bemabalu committed Sep 4, 2024
1 parent e17d143 commit 3914592
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/type1/CollarRxType1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ void CollarRxType1::buffer_to_collar_message(const uint8_t buffer[5], struct col
bool CollarRxType1::is_message_valid(const uint8_t buffer[5])
{
// if we're filtering by ID, check it matches
if (_use_id && (memcmp(buffer, &_id, 2)))
uint16_t id= ((buffer[0]<<8)|buffer[1]);
if (_use_id && (id!=_id))
return false;

// calculate checksum
Expand Down

0 comments on commit 3914592

Please sign in to comment.