add EHS BDS44 decoding (not reliable though...)

This commit is contained in:
junzis
2016-10-05 17:37:50 +02:00
parent a08c91a3a1
commit b648f4e7a5
8 changed files with 4275 additions and 9 deletions

15
tests/test_util.py Normal file
View File

@@ -0,0 +1,15 @@
from pyModeS import util
def test_hex2bin():
assert util.hex2bin('6E406B') == "011011100100000001101011"
def test_crc_decode():
checksum = util.crc("8D406B902015A678D4D220AA4BDA")
assert checksum == "000000000000000000000000"
def test_crc_encode():
parity = util.crc("8D406B902015A678D4D220AA4BDA", encode=True)
assert util.hex2bin("AA4BDA") == parity