mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
pylint code audit test run
This commit is contained in:
parent
0a1e9c5ee3
commit
2d9c53a101
2 changed files with 16 additions and 25 deletions
|
@ -91,7 +91,7 @@ def arq_data_received(data_in):
|
|||
ack_frame[:1] = bytes([60])
|
||||
ack_frame[1:2] = static.DXCALLSIGN_CRC8
|
||||
ack_frame[2:3] = static.MYCALLSIGN_CRC8
|
||||
print(ack_frame)
|
||||
#print(ack_frame)
|
||||
#TRANSMIT ACK FRAME FOR BURST-----------------------------------------------
|
||||
modem.transmit_signalling(ack_frame)
|
||||
while static.CHANNEL_STATE == 'SENDING_SIGNALLING':
|
||||
|
|
35
main.py
35
main.py
|
@ -7,42 +7,33 @@ Created on Tue Dec 22 16:58:45 2020
|
|||
|
||||
"""
|
||||
|
||||
import socketserver
|
||||
import argparse
|
||||
import logging
|
||||
import threading
|
||||
|
||||
import argparse
|
||||
import threading
|
||||
import static
|
||||
import helpers
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
# config logging
|
||||
helpers.setup_logging()
|
||||
|
||||
|
||||
#--------------------------------------------GET PARAMETER INPUTS
|
||||
parser = argparse.ArgumentParser(description='Simons TEST TNC')
|
||||
parser.add_argument('--rx', dest="audio_input_device", default=0, help="sound card for listening.", type=int)
|
||||
parser.add_argument('--tx', dest="audio_output_device", default=0, help="sound card for transmitting.", type=int)
|
||||
parser.add_argument('--port', dest="socket_port", default=3000, help="Set the port, the socket is listening on.", type=int)
|
||||
PARSER = argparse.ArgumentParser(description='Simons TEST TNC')
|
||||
PARSER.add_argument('--rx', dest="audio_input_device", default=0, help="listening sound card", type=int)
|
||||
PARSER.add_argument('--tx', dest="audio_output_device", default=0, help="transmitting sound card", type=int)
|
||||
PARSER.add_argument('--port', dest="socket_port", default=3000, help="Socket port", type=int)
|
||||
#parser.add_argument('--mode', dest="freedv_data_mode", default=12, help="Set the mode.", type=int)
|
||||
|
||||
args = parser.parse_args()
|
||||
ARGS = PARSER.parse_args()
|
||||
|
||||
#static.FREEDV_DATA_MODE = args.freedv_data_mode
|
||||
static.AUDIO_INPUT_DEVICE = args.audio_input_device
|
||||
static.AUDIO_OUTPUT_DEVICE = args.audio_output_device
|
||||
static.PORT = args.socket_port
|
||||
static.AUDIO_INPUT_DEVICE = ARGS.audio_input_device
|
||||
static.AUDIO_OUTPUT_DEVICE = ARGS.audio_output_device
|
||||
static.PORT = ARGS.socket_port
|
||||
|
||||
#--------------------------------------------START CMD SERVER
|
||||
import sock # we need to wait until we got all parameters from argparse first before loading sock
|
||||
|
||||
cmd_server_thread = threading.Thread(target=sock.start_cmd_socket, name="cmd server")
|
||||
cmd_server_thread.start()
|
||||
|
||||
|
||||
import sock # we need to wait until we got all parameters from argparse first
|
||||
|
||||
CMD_SERVER_THREAD = threading.Thread(target=sock.start_cmd_socket, name="cmd server")
|
||||
CMD_SERVER_THREAD.start()
|
||||
|
|
Loading…
Reference in a new issue