From e74fc2ecbab43a083766502610efb7b36dfac5c4 Mon Sep 17 00:00:00 2001 From: marshmellow42 Date: Fri, 13 Mar 2015 14:00:11 -0400 Subject: [PATCH] give credit where credit is due thanks iceman for the crc :) --- client/cmddata.c | 1 + common/crc.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/cmddata.c b/client/cmddata.c index d5b072c0..e96fb517 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -1485,6 +1485,7 @@ int CmdFSKdemodPyramid(const char *Cmd) csBuff[i] = bytebits_to_byte(BitStream + idx + 16 + (i*8), 8); } //check checksum calc + //checksum calc thanks to ICEMAN!! uint32_t checkCS = CRC8Maxim(csBuff,13); //get raw ID before removing parities diff --git a/common/crc.c b/common/crc.c index b8eb227e..0c73474f 100644 --- a/common/crc.c +++ b/common/crc.c @@ -42,7 +42,8 @@ uint32_t crc_finish(crc_t *crc) return ( crc->state ^ crc->final_xor ) & crc->mask; } -uint32_t CRC8Maxim(uint8_t *buff, size_t size ) +//credits to iceman +uint32_t CRC8Maxim(uint8_t *buff, size_t size) { crc_t crc; crc_init(&crc, 9, 0x8c, 0x00, 0x00); -- 2.39.2