DI = 1 correction for uplink messages (#157)
* Update uplink.py Adding lockout for DI = 1 * Update uplink.py
This commit is contained in:
@@ -131,7 +131,7 @@ def lockout(msg):
|
|||||||
if uf(msg) in {4, 5, 20, 21}:
|
if uf(msg) in {4, 5, 20, 21}:
|
||||||
lockout = False
|
lockout = False
|
||||||
di = mbytes[1] & 0x7
|
di = mbytes[1] & 0x7
|
||||||
if di == 7:
|
if (di == 1 or di == 7):
|
||||||
# LOS
|
# LOS
|
||||||
if ((mbytes[3] & 0x40) >> 6) == 1:
|
if ((mbytes[3] & 0x40) >> 6) == 1:
|
||||||
lockout = True
|
lockout = True
|
||||||
@@ -187,10 +187,16 @@ def uplink_fields(msg):
|
|||||||
if RR > 15:
|
if RR > 15:
|
||||||
BDS1 = RR - 16
|
BDS1 = RR - 16
|
||||||
BDS2 = 0
|
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
|
||||||
II = (mbytes[2] >> 4) & 0xF
|
II = (mbytes[2] >> 4) & 0xF
|
||||||
IC = "II" + str(II)
|
IC = "II" + str(II)
|
||||||
|
if ((mbytes[3] & 0x40) >> 6) == 1:
|
||||||
|
lockout = True
|
||||||
elif di == 7:
|
elif di == 7:
|
||||||
# LOS
|
# LOS
|
||||||
if ((mbytes[3] & 0x40) >> 6) == 1:
|
if ((mbytes[3] & 0x40) >> 6) == 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user