mirror of
https://github.com/jketterl/openwebrx.git
synced 2025-12-06 07:12:09 +01:00
handle changes to the always-on option
This commit is contained in:
parent
7195a41598
commit
e66a8d1dff
|
|
@ -161,6 +161,8 @@ class SdrSource(ABC):
|
||||||
if self.isAlwaysOn() and self.isEnabled():
|
if self.isAlwaysOn() and self.isEnabled():
|
||||||
self.start()
|
self.start()
|
||||||
|
|
||||||
|
props.filter("always-on").wire(self._handleAlwaysOnChanged)
|
||||||
|
|
||||||
def isEnabled(self):
|
def isEnabled(self):
|
||||||
return self.enabled
|
return self.enabled
|
||||||
|
|
||||||
|
|
@ -177,6 +179,12 @@ class SdrSource(ABC):
|
||||||
else:
|
else:
|
||||||
c.onDisable()
|
c.onDisable()
|
||||||
|
|
||||||
|
def _handleAlwaysOnChanged(self, changes):
|
||||||
|
if self.isAlwaysOn():
|
||||||
|
self.start()
|
||||||
|
else:
|
||||||
|
self.checkStatus()
|
||||||
|
|
||||||
def isFailed(self):
|
def isFailed(self):
|
||||||
return self.failed
|
return self.failed
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue