From 0c626f9434d45fbd2be4869cf013c7877c4c0339 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 11 Sep 2016 10:29:49 +0200 Subject: Replace lib_crc by crc from ODR-DabMux lib_crc had no licence associated with it. The licence situation of ODR-DabMux code is clearer and has the same licence as this project --- src/mot-encoder.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/mot-encoder.cpp') diff --git a/src/mot-encoder.cpp b/src/mot-encoder.cpp index 4cb6688..5b02c36 100644 --- a/src/mot-encoder.cpp +++ b/src/mot-encoder.cpp @@ -58,7 +58,7 @@ #define SLEEPDELAY_DEFAULT 10 //seconds extern "C" { -#include "lib_crc.h" +#include "crc.h" } #define MIN(a,b) (((a)<(b))?(a):(b)) @@ -254,8 +254,7 @@ struct DATA_GROUP { void AppendCRC() { uint16_t crc = 0xFFFF; - for (size_t i = 0; i < data.size(); i++) - crc = update_crc_ccitt(crc, data[i]); + crc = crc16(crc, &data[0], data.size()); crc = ~crc; #if DEBUG fprintf(stderr, "crc=%04x ~crc=%04x\n", crc, ~crc); -- cgit v1.2.3