diff --git a/lib/rds_decoder_redsea_impl.cc b/lib/rds_decoder_redsea_impl.cc index f385a73..63c9b55 100644 --- a/lib/rds_decoder_redsea_impl.cc +++ b/lib/rds_decoder_redsea_impl.cc @@ -293,33 +293,36 @@ int rds_decoder_redsea_impl::work (int noutput_items, checkword=reg & 0x3ff;//checkword part of received block (lower 10 bits) /* manage special case of C or C' offset word */ if (block_number==2) { - if (variant==0){//A - offset_char = 'C'; - block_received_crc=checkword^offset_word[2]; - } - else{//B - offset_char = 'c'; - block_received_crc=checkword^offset_word[4]; - //dout<<"B"<>10) & 0xffff; - checkword=corrected_block & 0x3ff; - - - //dout << "corrected error"<>10) & 0xffff; + checkword=corrected_block & 0x3ff; + + + //dout << "corrected error"< read group type variant variant=(dataword>>11)& 0x1; @@ -406,6 +409,7 @@ int rds_decoder_redsea_impl::work (int noutput_items, group_good_blocks_counter++; } if (group_good_blocks_counter==5) decode_group(group); + //if (group_good_blocks_counter==5 and group_corrected_blocks_counter>0) decode_group(group);//test corrected blocks } block_bit_counter=0; block_number=(block_number+1) % 4; diff --git a/python/tmc_classes.py b/python/tmc_classes.py index 1ca13b7..e7c8829 100644 --- a/python/tmc_classes.py +++ b/python/tmc_classes.py @@ -428,7 +428,7 @@ class tmc_location: print("lcn is segment %i"%lcn) elif self.lcl_obj.roads.has_key(lcn) and self.tableobj.debug: print("lcn is road %i"%lcn) - else: + elif self.tableobj.debug: print("lcn not found %i"%lcn) elif self.tableobj.log or self.tableobj.debug: diff --git a/python/tmc_parser.py b/python/tmc_parser.py index 9c96170..58ddac8 100644 --- a/python/tmc_parser.py +++ b/python/tmc_parser.py @@ -100,7 +100,7 @@ class tmc_parser(gr.sync_block): print("closing tmc display") def save_data(self): print_dbg('saving data..', end="") - self.dataLock.acquire(1) + #self.dataLock.acquire(1) #disabled 2017-06-06 for performance if self.writeDB: self.dbLock.acquire(1) self.db.commit() @@ -108,7 +108,7 @@ class tmc_parser(gr.sync_block): f=open(self.workdir+'google_maps_markers.js', 'w') markerstring=self.tmc_messages.getMarkerString() - self.dataLock.release(1) + #self.dataLock.release(1) markerstring+='\n console.log("loaded "+markers.length+" markers")' markerstring+='\n document.getElementById("errorid").innerHTML = "loaded "+markers.length+" markers";' f.write(markerstring) @@ -287,7 +287,7 @@ class tmc_parser(gr.sync_block): pass return return_string def print_dbg(message,end="\n"): - dbg=True + dbg=False if dbg: print(message,end=end) class tmc_parser_Widget(QtGui.QWidget):