Testing OP25 Improvements

- New system of handling thread
This commit is contained in:
Logan Cusano
2022-03-19 01:18:45 -04:00
parent 4f230f8d33
commit 126ba907af
2 changed files with 31 additions and 8 deletions

6
bot.py
View File

@@ -312,6 +312,7 @@ class Bot(commands.Bot):
print("Starting OP25 handler")
from op25Handler import OP25Handler
self.OP25Handler = OP25Handler()
self.OP25Handler.start()
self.possible_modes = BotResources.PDB_ACCEPTABLE_HANDLERS['op25']['Modes']
# Load the proper OPUS library for the device being used
@@ -399,8 +400,7 @@ class Bot(commands.Bot):
self.GQRXHandler.set_all_settings(self.mode, self.squelch, self.freq)
elif self.Handler == 'op25':
self.OP25Handler.set_op25_parameters(self.freq)
self.OP25Handler.start()
self.OP25Handler.set_op25_parameters(self.freq, _start=True)
# Set the started variable for later checks
self.sdr_started = True
@@ -411,7 +411,7 @@ class Bot(commands.Bot):
# Wait for the running processes to close
# Close the OP25 handler
if self.Handler == 'op25':
self.OP25Handler.close_op25()
self.OP25Handler.set_op25_parameters(_stop=True)
# self.OP25Handler.join()
# Need a way to 'close' GQRX
self.sdr_started = False