mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
audio device selection
This commit is contained in:
parent
1085c439f5
commit
63b218d128
12
daemon.py
12
daemon.py
|
@ -107,13 +107,13 @@ class CMDTCPRequestHandler(socketserver.BaseRequestHandler):
|
|||
|
||||
|
||||
if received_json["type"] == 'SET' and received_json["command"] == 'STARTTNC' and not static.TNCSTARTED:
|
||||
rx_audio = parameter = received_json["parameter"][0]["rx_audio"]
|
||||
tx_audio = parameter = received_json["parameter"][0]["tx_audio"]
|
||||
deviceid = parameter = received_json["parameter"][0]["deviceid"]
|
||||
deviceport = parameter = received_json["parameter"][0]["deviceport"]
|
||||
ptt = parameter = received_json["parameter"][0]["ptt"]
|
||||
rx_audio = received_json["parameter"][0]["rx_audio"]
|
||||
tx_audio = received_json["parameter"][0]["tx_audio"]
|
||||
deviceid = received_json["parameter"][0]["deviceid"]
|
||||
deviceport = received_json["parameter"][0]["deviceport"]
|
||||
ptt = received_json["parameter"][0]["ptt"]
|
||||
print("STARTING TNC !!!!!")
|
||||
#print(deviceid)
|
||||
print(received_json["parameter"][0])
|
||||
#os.system("python3 main.py --rx 3 --tx 3 --deviceport /dev/ttyUSB0 --deviceid 2028")
|
||||
p = subprocess.Popen("exec python3 main.py --rx "+ str(rx_audio) +" --tx "+ str(tx_audio) +" --deviceport "+ str(deviceport) +" --deviceid "+ str(deviceid) + " --ptt "+ str(ptt), shell=True)
|
||||
static.TNCPROCESS = p#.pid
|
||||
|
|
|
@ -524,10 +524,8 @@ def open_dc_and_transmit(data_out, mode, n_frames):
|
|||
static.ARQ_START_OF_TRANSMISSION = int(time.time())
|
||||
|
||||
|
||||
# lets wait a little bit so RX station is ready for receiving
|
||||
wait_before_data_timer = time.time() + 0.5
|
||||
while time.time() < wait_before_data_timer:
|
||||
pass
|
||||
# lets wait a little bit
|
||||
#time.sleep(5)
|
||||
|
||||
# transmit data
|
||||
arq_transmit(data_out)
|
||||
|
|
Loading…
Reference in a new issue