updates to handler

This commit is contained in:
Magnus Lundmark
2019-01-18 17:44:19 +01:00
parent fb4cef7085
commit 1795d2f3c0
2 changed files with 74 additions and 54 deletions

View File

@@ -31,7 +31,7 @@ def np2bin(npbin):
def df(msg):
"""Decode Downlink Format vaule, bits 1 to 5."""
msgbin = hex2bin(msg)
return bin2int(msgbin[0:5])
return min( bin2int(msgbin[0:5]) , 24 )
def crc(msg, encode=False):