Fix broken msgq assumption
This commit is contained in:
parent
9dad60303a
commit
2ace332b89
@ -92,8 +92,8 @@ class modes_radio (gr.top_block):
|
||||
self._sender = air_modes.zmq_pubsub_iface(context, subaddr=None, pubaddr="inproc://modes-radio-pub")
|
||||
self._async_sender = gru.msgq_runner(self._queue, self.send)
|
||||
|
||||
def send(self, data):
|
||||
self._sender["dl_data"] = data
|
||||
def send(self, msg):
|
||||
self._sender["dl_data"] = msg.to_string()
|
||||
|
||||
@staticmethod
|
||||
def add_radio_options(parser):
|
||||
|
@ -76,7 +76,7 @@ class zmq_pubsub_iface(threading.Thread):
|
||||
if not self._pubaddr:
|
||||
raise Exception("No publisher address set")
|
||||
if not self.shutdown.is_set():
|
||||
self._queue.put([key, val.to_string()]) #TODO FIXME MSGQ
|
||||
self._queue.put([key, val])
|
||||
|
||||
def __getitem__(self, key):
|
||||
return self._pubsub[key]
|
||||
@ -97,9 +97,9 @@ class zmq_pubsub_iface(threading.Thread):
|
||||
#snooze
|
||||
time.sleep(0.1)
|
||||
|
||||
#one more send loop to clean up on shutdown
|
||||
while not self._queue.empty():
|
||||
self._pubsocket.send_multipart(self._queue.get())
|
||||
|
||||
|
||||
self._subsocket.close()
|
||||
self._pubsocket.close()
|
||||
|
Loading…
Reference in New Issue
Block a user