From 1fe88515f7736a78f45e57e1394086ca752feb09 Mon Sep 17 00:00:00 2001 From: csrichter Date: Wed, 26 Apr 2017 23:23:09 +0200 Subject: [PATCH] added Decoding of missing tmc tuning/service provider info --- python/rds_parser_table_qt.py | 15 ++++++++++++--- python/tmc_parser.py | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/python/rds_parser_table_qt.py b/python/rds_parser_table_qt.py index 82c86ae..68acbf6 100644 --- a/python/rds_parser_table_qt.py +++ b/python/rds_parser_table_qt.py @@ -790,16 +790,25 @@ class rds_parser_table_qt(gr.sync_block):#START seg_adr_start=(adr-4)*4#start of segment text_list[seg_adr_start:seg_adr_start+4]=segment self.RDS_data[PI]["AID_list"][52550]["provider name"]="".join(text_list) - + if adr==6: + AF1_ON=tmc_y>>8 + AF2_ON=tmc_y&0xff + PI_ON=tmc_z if adr== 7:#freq of tuned an mapped station (not seen yet) freq_TN=tmc_y>>8 freq_ON=tmc_y&0xff#mapped frequency + PI_ON=tmc_z if self.debug: print("TMC-info: TN:%i, station:%s"%(freq_TN,self.RDS_data[PI]["PSN"])) self.RDS_data[PI]["TMC_TN"]=freq_TN + if adr== 9: + LTN_ON=(tmc_y>>10) + MGS_ON=(tmc_y>>6)&0xf + SID_ON=(tmc_y)&0x3f + PI_ON=tmc_z else: - if self.log or self.debug: - print("alert plus on station %s (%s)"%(PI,self.RDS_data[PI]["PSN"]))#(not seen yet) + if self.log or self.debug or True:#not seen yet -> always print + print("alert plus on station %s (%s) , encrypted TMC?"%(PI,self.RDS_data[PI]["PSN"]))#(not seen yet) #~ #self.tableobj.RDS_data["D301"]["AID_list"][52550]["provider name"]="test____" #RadioText+ (grouptype mostly 12A): diff --git a/python/tmc_parser.py b/python/tmc_parser.py index f4697c5..23078c8 100644 --- a/python/tmc_parser.py +++ b/python/tmc_parser.py @@ -193,13 +193,23 @@ class tmc_parser(gr.sync_block): segment=self.decode_chars(chr(chr1)+chr(chr2)+chr(chr3)+chr(chr4)) if self.log: print("TMC-info adr:%i (provider name), segment:%s, station:%s"%(adr,psn)) + if adr==6: + AF1_ON=tmc_y>>8 + AF2_ON=tmc_y&0xff + PI_ON=tmc_z if adr== 7:#freq of tuned an mapped station (not seen yet) freq_TN=tmc_y>>8 freq_ON=tmc_y&0xff#mapped frequency - if self.log: + PI_ON=tmc_z + if self.debug: print("TMC-info: TN:%i, station:%s"%(freq_TN,psn)) + if adr== 9: + LTN_ON=(tmc_y>>10) + MGS_ON=(tmc_y>>6)&0xf + SID_ON=(tmc_y)&0x3f + PI_ON=tmc_z else: - if self.log: + if self.log or True:#not seen yet -> always print print("alert plus on station %s (%s)"%(PI,psn))#(not seen yet) def getqtwidget(self):