diff --git a/apps/fft-multi-decoder_fixed_hackrf.grc b/apps/fft-multi-decoder_fixed_hackrf.grc
index adddc17..6f15ef8 100644
--- a/apps/fft-multi-decoder_fixed_hackrf.grc
+++ b/apps/fft-multi-decoder_fixed_hackrf.grc
@@ -3170,7 +3170,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in
writeDB
- False
+ True
@@ -3244,7 +3244,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in
_enabled
- 0
+ 1
_coordinate
diff --git a/python/rds_parser_table_qt.py b/python/rds_parser_table_qt.py
index 3f44764..37a86cd 100644
--- a/python/rds_parser_table_qt.py
+++ b/python/rds_parser_table_qt.py
@@ -105,6 +105,7 @@ class rds_parser_table_qt(gr.sync_block):#START
db_name=workdir+'RDS_data'+datetime.now().strftime("%Y%m%d_%H%M%S")+'.db'
db=sqlite3.connect(db_name, check_same_thread=False)
self.db=db
+ self.dbLock=QtCore.QSemaphore(1)
#create tables
try:
db.execute('''CREATE TABLE stations
@@ -186,7 +187,9 @@ class rds_parser_table_qt(gr.sync_block):#START
self.PI_dict[PI]-=1
#print(self.PI_dict)
if self.writeDB:
+ self.dbLock.acquire(1)
self.db.commit()
+ self.dbLock.release(1)
def update_freq(self):
# " " is a tab character
message_string="decoder frequencies:"
@@ -299,6 +302,7 @@ class rds_parser_table_qt(gr.sync_block):#START
#self.signals.DataUpdateEvent.emit({'group_count':self.minute_count,'group_count_max':self.minute_count_max})
if self.writeDB:
#db=sqlite3.connect(self.db_name)
+ #self.dbLock.acquire(1)
db=self.db
@@ -974,6 +978,8 @@ class rds_parser_table_qt(gr.sync_block):#START
#print("group of type %s not decoded on station %s"% (groupType,PI))
pr.disable() #disabled-internal-profiling
+ #if self.writeDB:
+ # self.dbLock.release(1)
#end of handle_msg
def print_results(self):
s = StringIO.StringIO()