diff options
Diffstat (limited to 'src/mot-encoder.cpp')
-rw-r--r-- | src/mot-encoder.cpp | 5 |
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); |