mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-04-04 22:19:04 +00:00
add rockprog interface
This commit is contained in:
parent
9aa6f72152
commit
406d06fef2
2 changed files with 36 additions and 1 deletions
|
|
@ -125,6 +125,11 @@ class SdrSource(ABC):
|
|||
if self.monitor:
|
||||
return
|
||||
|
||||
try:
|
||||
self.preStart()
|
||||
except Exception:
|
||||
logger.exception("Exception during preStart()")
|
||||
|
||||
cmd = self.getCommand()
|
||||
cmd = [c for c in cmd if c is not None]
|
||||
|
||||
|
|
@ -176,7 +181,16 @@ class SdrSource(ABC):
|
|||
|
||||
self.setState(SdrSource.STATE_FAILED if self.failed else SdrSource.STATE_RUNNING)
|
||||
|
||||
def preStart(self):
|
||||
"""
|
||||
override this method in subclasses if there's anything to be done before starting up the actual SDR
|
||||
"""
|
||||
pass
|
||||
|
||||
def postStart(self):
|
||||
"""
|
||||
override this method in subclasses if there's things to do after the actual SDR has started up
|
||||
"""
|
||||
pass
|
||||
|
||||
def isAvailable(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue