diff --git a/python/msprint.py b/python/msprint.py index 5f726e2..6858e0c 100644 --- a/python/msprint.py +++ b/python/msprint.py @@ -197,7 +197,7 @@ class output_print(air_modes.parse): elif bds1 == 2: retstr = "Type 20 identification from %x with text %s" % (ecc, self.parseMB_id(data)) elif bds2 == 3: - retstr = "TCAS report from %x: " % ecc + retstr = "Type 20 TCAS report from %x: " % ecc tti = data["tti"] if tti == 1: (resolutions, complements, rat, mte, threat_id) = self.parseMB_TCAS_threatid(data) @@ -214,9 +214,9 @@ class output_print(air_modes.parse): else: retstr = "No handler for BDS1 == %i from %x" % (bds1, ecc) - if(msgtype == 20): - retstr += " at %ift" % alt - else: - retstr += " ident %x" % ident +# if(msgtype == 20): +# retstr += " at %ift" % altitude +# else: +# retstr += " ident %x" % ident return retstr diff --git a/python/parse.py b/python/parse.py index b76cf8c..032c9f9 100644 --- a/python/parse.py +++ b/python/parse.py @@ -77,6 +77,7 @@ class data_field: def get_bits(self, *args): startbit = args[0] num = args[1] + bits = 0 try: bits = (self.data \ >> (self.get_numbits() - startbit - num + self.offset)) \ @@ -86,7 +87,7 @@ class data_field: #which reports itself as a short packet but of type long. #TODO: should find more productive way to throw this out except ValueError: - bits = 0 + print "Short packet received for long packet type: %x" % self.data return bits class bds09_reply(data_field):