mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
possible fix of broken tci module
This commit is contained in:
parent
a2ee95e53a
commit
23c60e80e8
1 changed files with 14 additions and 23 deletions
|
@ -108,32 +108,23 @@ class RF:
|
||||||
self.tci_module.push_audio(audio_48k)
|
self.tci_module.push_audio(audio_48k)
|
||||||
|
|
||||||
def start_modem(self):
|
def start_modem(self):
|
||||||
# testmode: We need to call the modem without audio parts for running protocol tests
|
if TESTMODE:
|
||||||
|
return True
|
||||||
if self.radiocontrol not in ["tci"]:
|
elif self.radiocontrol.lower() == "tci":
|
||||||
result = self.init_audio() if not TESTMODE else True
|
if not self.init_tci():
|
||||||
if not result:
|
return False
|
||||||
raise RuntimeError("Unable to init audio devices")
|
|
||||||
if not TESTMODE:
|
|
||||||
self.demodulator.start(self.sd_input_stream)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
result = self.init_tci()
|
if not self.init_audio():
|
||||||
|
raise RuntimeError("Unable to init audio devices")
|
||||||
if result not in [False]:
|
self.demodulator.start(self.sd_input_stream)
|
||||||
# init codec2 instances
|
|
||||||
self.init_codec2()
|
|
||||||
|
|
||||||
# init rig control
|
|
||||||
self.init_rig_control()
|
|
||||||
|
|
||||||
# init data thread
|
|
||||||
self.init_data_threads()
|
|
||||||
if not TESTMODE:
|
|
||||||
atexit.register(self.sd_input_stream.stop)
|
atexit.register(self.sd_input_stream.stop)
|
||||||
|
|
||||||
else:
|
# Initialize codec2, rig control, and data threads
|
||||||
return False
|
self.init_codec2()
|
||||||
|
self.init_rig_control()
|
||||||
|
self.init_data_threads()
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
def stop_modem(self):
|
def stop_modem(self):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue