some quick nudges to allow reconfiguration of the rtl_sdr command on the fly

This commit is contained in:
Jakob Ketterl
2019-05-07 18:19:53 +02:00
parent fa05249a9d
commit 9fc77c2804
3 changed files with 22 additions and 4 deletions

View File

@ -72,6 +72,7 @@ class WebSocketMessageHandler(object):
def __init__(self):
self.handshake = None
self.client = None
self.dsp = None
def handleTextMessage(self, conn, message):
pm = PropertyManager.getSharedInstance()

View File

@ -126,11 +126,12 @@ class SpectrumThread(threading.Thread):
while self.doRun:
data=dsp.read(bytes_to_read)
if len(data) == 0:
self.shutdown()
time.sleep(1)
else:
for c in self.clients:
c.write_spectrum_data(data)
dsp.stop()
print("spectrum thread shut down")
def add_client(self, c):