diff --git a/daemon.py b/daemon.py index e3090a15..8f6a28af 100644 --- a/daemon.py +++ b/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 diff --git a/data_handler.py b/data_handler.py index 29ca4e25..3f6c9902 100644 --- a/data_handler.py +++ b/data_handler.py @@ -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)