DI = 1 correction for uplink messages (#157)

* Update uplink.py

Adding lockout for DI = 1

* Update uplink.py
This commit is contained in:
Flyer350 2023-12-18 23:03:34 +01:00 committed by GitHub
parent 45ae55d965
commit 582a0d2188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,7 @@ def lockout(msg):
if uf(msg) in {4, 5, 20, 21}:
lockout = False
di = mbytes[1] & 0x7
if di == 7:
if (di == 1 or di == 7):
# LOS
if ((mbytes[3] & 0x40) >> 6) == 1:
lockout = True
@ -187,10 +187,16 @@ def uplink_fields(msg):
if RR > 15:
BDS1 = RR - 16
BDS2 = 0
if di == 0 or di == 1:
if di == 0:
# II
II = (mbytes[2] >> 4) & 0xF
IC = "II" + str(II)
elif di == 1:
# II
II = (mbytes[2] >> 4) & 0xF
IC = "II" + str(II)
if ((mbytes[3] & 0x40) >> 6) == 1:
lockout = True
elif di == 7:
# LOS
if ((mbytes[3] & 0x40) >> 6) == 1: