Hi Pavel,
2017-05-15 19:40 GMT+03:00 Pavel Kretov
Hi Sergei.
I've discovered that current typedef crc_xmodem_type uses wrong poly.
I'm not an expert in CRCs and I have no idea whether Boost's implementation is wrong, but it's interesting that:
bin(0x8408) = reverse(bin(0x1021))
Maybe this isn't a real problem, but simply someone decided to intentionally flip the poly in the CRC implementation, and the computation still leads to correct results?
——— Pavel K.
I believe this is real problem CRC16 calculator from here https://www.lammertbies.nl/comm/info/crc-calculation.html XMODEM for string "123456789" gives 0x31C3 Test case
>>>>>>>> cut here <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file #include "catch.hpp"
#include
>>>>>>>> cut here <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
First one check fails with ../test/test_3.cpp:136: FAILED: CHECK( xmv == 0x31C3 ) with expansion: 3187 (0xc73) == 12739 (0x31c3) The second one is passed. -- Best Regards, Sergei Nikulov