handle changes to the always-on option

This commit is contained in:
Jakob Ketterl 2024-01-29 23:33:41 +01:00
parent 7195a41598
commit e66a8d1dff

View file

@ -161,6 +161,8 @@ class SdrSource(ABC):
if self.isAlwaysOn() and self.isEnabled():
self.start()
props.filter("always-on").wire(self._handleAlwaysOnChanged)
def isEnabled(self):
return self.enabled
@ -177,6 +179,12 @@ class SdrSource(ABC):
else:
c.onDisable()
def _handleAlwaysOnChanged(self, changes):
if self.isAlwaysOn():
self.start()
else:
self.checkStatus()
def isFailed(self):
return self.failed