Fixed TCAS packet reporting -- the slicer wasn't reporting long pkt type for types 20/21. Hardcoded constant.
This commit is contained in:
@@ -194,17 +194,17 @@ class output_print(air_modes.parse):
|
||||
bds2 = data["bds2"]
|
||||
|
||||
if bds2 != 0:
|
||||
retstr = "No handler for BDS2 == %i from %x" % (bds2, ecc)
|
||||
retstr = "No handler in type %i for BDS2 == %i from %x" % (msgtype, bds2, ecc)
|
||||
|
||||
elif bds1 == 0:
|
||||
retstr = "No handler for BDS1 == 0 from %x" % ecc
|
||||
retstr = "No handler in type %i for BDS1 == 0 from %x" % (msgtype, ecc)
|
||||
elif bds1 == 1:
|
||||
retstr = "Type 20 link capability report from %x: ACS: 0x%x, BCS: 0x%x, ECS: 0x%x, continues %i" \
|
||||
% (ecc, data["acs"], data["bcs"], data["ecs"], data["cfs"])
|
||||
retstr = "Type %i link capability report from %x: ACS: 0x%x, BCS: 0x%x, ECS: 0x%x, continues %i" \
|
||||
% (msgtype, ecc, data["acs"], data["bcs"], data["ecs"], data["cfs"])
|
||||
elif bds1 == 2:
|
||||
retstr = "Type 20 identification from %x with text %s" % (ecc, self.parseMB_id(data))
|
||||
elif bds2 == 3:
|
||||
retstr = "Type 20 TCAS report from %x: " % ecc
|
||||
retstr = "Type %i identification from %x with text %s" % (msgtype, ecc, self.parseMB_id(data))
|
||||
elif bds1 == 3:
|
||||
retstr = "Type %i TCAS report from %x: " % (msgtype, ecc)
|
||||
tti = data["tti"]
|
||||
if tti == 1:
|
||||
(resolutions, complements, rat, mte, threat_id) = self.parseMB_TCAS_threatid(data)
|
||||
@@ -221,9 +221,9 @@ class output_print(air_modes.parse):
|
||||
else:
|
||||
retstr = "No handler for BDS1 == %i from %x" % (bds1, ecc)
|
||||
|
||||
# if(msgtype == 20):
|
||||
# retstr += " at %ift" % altitude
|
||||
# else:
|
||||
# retstr += " ident %x" % ident
|
||||
if(msgtype == 20):
|
||||
retstr += " at %ift" % alt
|
||||
else:
|
||||
retstr += " ident %x" % ident
|
||||
|
||||
return retstr
|
||||
|
||||
Reference in New Issue
Block a user