summaryrefslogtreecommitdiffstats
path: root/src/mot-encoder.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-11 10:29:49 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-11 10:29:49 +0200
commit0c626f9434d45fbd2be4869cf013c7877c4c0339 (patch)
tree8bd9522453b50abc8feafeee565503170b3f15d7 /src/mot-encoder.cpp
parented3d028a3e271aeeb823544f9adc8c6ad655f603 (diff)
downloadODR-PadEnc-0c626f9434d45fbd2be4869cf013c7877c4c0339.tar.gz
ODR-PadEnc-0c626f9434d45fbd2be4869cf013c7877c4c0339.tar.bz2
ODR-PadEnc-0c626f9434d45fbd2be4869cf013c7877c4c0339.zip
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
Diffstat (limited to 'src/mot-encoder.cpp')
-rw-r--r--src/mot-encoder.cpp5
1 files changed, 2 insertions, 3 deletions
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);