improve sdr failure detection
This commit is contained in:
parent
b5c5bcb9f1
commit
4d0d316fdd
@ -158,7 +158,7 @@ class OpenWebRxReceiverClient(Client):
|
||||
next = SdrService.getSource(id)
|
||||
|
||||
if next is None:
|
||||
self.handleSdrFailure("sdr device failed")
|
||||
self.handleSdrFailure("sdr device unavailable")
|
||||
return
|
||||
|
||||
if next == self.sdr:
|
||||
@ -207,7 +207,7 @@ class OpenWebRxReceiverClient(Client):
|
||||
self.write_sdr_error(message)
|
||||
|
||||
def startDsp(self):
|
||||
if self.dsp is None:
|
||||
if self.dsp is None and self.sdr is not None:
|
||||
self.dsp = DspManager(self, self.sdr)
|
||||
self.dsp.start()
|
||||
|
||||
|
@ -110,9 +110,9 @@ class Schedule(object):
|
||||
class ServiceScheduler(object):
|
||||
def __init__(self, source, schedule):
|
||||
self.source = source
|
||||
self.selectionTimer = None
|
||||
self.schedule = Schedule.parse(schedule)
|
||||
self.source.addClient(self)
|
||||
self.selectionTimer = None
|
||||
self.source.getProps().collect("center_freq", "samp_rate").wire(self.onFrequencyChange)
|
||||
self.scheduleSelection()
|
||||
|
||||
|
@ -190,7 +190,11 @@ class SdrSource(object):
|
||||
if not available:
|
||||
self.failed = True
|
||||
|
||||
self.postStart()
|
||||
try:
|
||||
self.postStart()
|
||||
except Exception:
|
||||
logger.exception("Exception during postStart()")
|
||||
self.failed = True
|
||||
|
||||
self.modificationLock.release()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user