add DF 0 and 16 to altcode

This commit is contained in:
Junzi Sun 2018-12-14 17:22:55 +01:00
parent 8a43d711aa
commit b24c1101b6

View File

@ -205,8 +205,8 @@ def altcode(msg):
int: altitude in ft int: altitude in ft
""" """
if df(msg) not in [4, 20]: if df(msg) not in [0, 4, 16, 20]:
raise RuntimeError("Message must be Downlink Format 4 or 20.") raise RuntimeError("Message must be Downlink Format 0, 4, 16, or 20.")
# Altitude code, bit 20-32 # Altitude code, bit 20-32
mbin = hex2bin(msg) mbin = hex2bin(msg)