handle device shudown when schedule is off

This commit is contained in:
Jakob Ketterl
2021-02-26 22:36:15 +01:00
parent 4e7f02fc2c
commit 3164683e74
2 changed files with 26 additions and 14 deletions

View File

@ -319,6 +319,9 @@ class SdrSource(ABC):
self.clients.remove(c)
self.checkStatus()
def checkStatus(self):
hasUsers = self.hasClients(SdrClientClass.USER)
self.setBusyState(SdrBusyState.BUSY if hasUsers else SdrBusyState.IDLE)