Skip to content

Commit

Permalink
Fixed crc check
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Oct 8, 2023
1 parent ef08c90 commit b483f12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/devices/bresser_leakage.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static int bresser_leakage_decode(r_device *decoder, bitbuffer_t *bitbuffer)
decoder_log_bitrow(decoder, 2, __func__, msg, sizeof(msg) * 8, "");

// CRC check
uint16_t crc_calculated = crc16(msg[2], 5, 0x1021, 0x0000);
uint16_t crc_calculated = crc16(&msg[2], 5, 0x1021, 0x0000);
uint16_t crc_received = msg[0] << 8 | msg[1];
decoder_logf(decoder, 2, __func__, "CRC 0x%04X = 0x%04X", crc_calculated, crc_received);
if (crc_received != crc_calculated) {
Expand Down

0 comments on commit b483f12

Please sign in to comment.