1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-26 12:04:13 -04:00

Reverse byte ordering of CRC in packet mode

This commit is contained in:
Jon Beniston
2023-11-14 16:57:51 +00:00
parent bdfe1a9ab3
commit 70b074e6d5
2 changed files with 3 additions and 3 deletions
@@ -328,7 +328,7 @@ bool M17DemodProcessor::decode_packet(modemm17::M17FrameDecoder::packet_buffer_t
crc16(*it);
}
uint16_t calcChecksum = crc16.get_bytes()[0] + (crc16.get_bytes()[1]<<8);
uint16_t calcChecksum = crc16.get_bytes()[1] + (crc16.get_bytes()[0]<<8);
uint16_t xmitChecksum = m_currentPacket.back() + (m_currentPacket.end()[-2]<<8);
if (calcChecksum == xmitChecksum) // (checksum == 0x0f47)