mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
removed old hamlib settings
This commit is contained in:
parent
41293590cb
commit
175aeb1a11
5 changed files with 12 additions and 173 deletions
|
@ -63,15 +63,6 @@ class CONFIG:
|
|||
}
|
||||
self.config['RADIO'] = {'#Radio settings': None,
|
||||
'radiocontrol': data[13],
|
||||
# TODO: disabled because we dont need these settings anymore
|
||||
#'devicename': data[5],
|
||||
#'deviceport': data[6],
|
||||
#'serialspeed': data[7],
|
||||
#'pttprotocol': data[8],
|
||||
#'pttport': data[9],
|
||||
#'data_bits': data[10],
|
||||
#'stop_bits': data[11],
|
||||
#'handshake': data[12],
|
||||
'rigctld_ip': data[14],
|
||||
'rigctld_port': data[15]
|
||||
}
|
||||
|
|
|
@ -135,14 +135,14 @@ class DAEMON:
|
|||
# data[2] mygrid
|
||||
# data[3] rx_audio
|
||||
# data[4] tx_audio
|
||||
# data[5] devicename
|
||||
# data[6] deviceport
|
||||
# data[7] serialspeed
|
||||
# data[8] pttprotocol
|
||||
# data[9] pttport
|
||||
# data[10] data_bits
|
||||
# data[11] stop_bits
|
||||
# data[12] handshake
|
||||
# REMOVED - data[5] devicename
|
||||
# REMOVED - data[6] deviceport
|
||||
# REMOVED - data[7] serialspeed
|
||||
# REMOVED - data[8] pttprotocol
|
||||
# REMOVED - data[9] pttport
|
||||
# REMOVED - data[10] data_bits
|
||||
# REMOVED - data[11] stop_bits
|
||||
# REMOVED - data[12] handshake
|
||||
# data[13] radiocontrol
|
||||
# data[14] rigctld_ip
|
||||
# data[15] rigctld_port
|
||||
|
@ -188,29 +188,6 @@ class DAEMON:
|
|||
# disabled mode
|
||||
|
||||
if data[13] != "disabled":
|
||||
options.append("--devicename")
|
||||
options.append(data[5])
|
||||
|
||||
options.append("--deviceport")
|
||||
options.append(data[6])
|
||||
|
||||
options.append("--serialspeed")
|
||||
options.append(data[7])
|
||||
|
||||
options.append("--pttprotocol")
|
||||
options.append(data[8])
|
||||
|
||||
options.append("--pttport")
|
||||
options.append(data[9])
|
||||
|
||||
options.append("--data_bits")
|
||||
options.append(data[10])
|
||||
|
||||
options.append("--stop_bits")
|
||||
options.append(data[11])
|
||||
|
||||
options.append("--handshake")
|
||||
options.append(data[12])
|
||||
|
||||
options.append("--radiocontrol")
|
||||
options.append(data[13])
|
||||
|
|
88
tnc/main.py
88
tnc/main.py
|
@ -123,77 +123,6 @@ if __name__ == "__main__":
|
|||
help="Socket port in the range of 1024-65536",
|
||||
type=int,
|
||||
)
|
||||
PARSER.add_argument(
|
||||
"--deviceport",
|
||||
dest="hamlib_device_port",
|
||||
default="/dev/ttyUSB0",
|
||||
help="Hamlib device port",
|
||||
type=str,
|
||||
)
|
||||
PARSER.add_argument(
|
||||
"--devicename",
|
||||
dest="hamlib_device_name",
|
||||
default="2028",
|
||||
help="Hamlib device name",
|
||||
type=str,
|
||||
)
|
||||
PARSER.add_argument(
|
||||
"--serialspeed",
|
||||
dest="hamlib_serialspeed",
|
||||
choices=[1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200],
|
||||
default=9600,
|
||||
help="Serialspeed",
|
||||
type=int,
|
||||
)
|
||||
PARSER.add_argument(
|
||||
"--pttprotocol",
|
||||
dest="hamlib_ptt_type",
|
||||
choices=[
|
||||
"USB",
|
||||
"RIG",
|
||||
"RTS",
|
||||
"DTR",
|
||||
"CM108",
|
||||
"MICDATA",
|
||||
"PARALLEL",
|
||||
"DTR-H",
|
||||
"DTR-L",
|
||||
"NONE",
|
||||
],
|
||||
default="USB",
|
||||
help="PTT Type",
|
||||
type=str,
|
||||
)
|
||||
PARSER.add_argument(
|
||||
"--pttport",
|
||||
dest="hamlib_ptt_port",
|
||||
default="/dev/ttyUSB0",
|
||||
help="PTT Port",
|
||||
type=str,
|
||||
)
|
||||
PARSER.add_argument(
|
||||
"--data_bits",
|
||||
dest="hamlib_data_bits",
|
||||
choices=[7, 8],
|
||||
default=8,
|
||||
help="Hamlib data bits",
|
||||
type=int,
|
||||
)
|
||||
PARSER.add_argument(
|
||||
"--stop_bits",
|
||||
dest="hamlib_stop_bits",
|
||||
choices=[1, 2],
|
||||
default=1,
|
||||
help="Hamlib stop bits",
|
||||
type=int,
|
||||
)
|
||||
PARSER.add_argument(
|
||||
"--handshake",
|
||||
dest="hamlib_handshake",
|
||||
default="None",
|
||||
help="Hamlib handshake",
|
||||
type=str,
|
||||
)
|
||||
PARSER.add_argument(
|
||||
"--radiocontrol",
|
||||
dest="hamlib_radiocontrol",
|
||||
|
@ -326,14 +255,6 @@ if __name__ == "__main__":
|
|||
static.AUDIO_OUTPUT_DEVICE = ARGS.audio_output_device
|
||||
|
||||
static.PORT = ARGS.socket_port
|
||||
# static.HAMLIB_DEVICE_NAME = ARGS.hamlib_device_name
|
||||
# static.HAMLIB_DEVICE_PORT = ARGS.hamlib_device_port
|
||||
# static.HAMLIB_PTT_TYPE = ARGS.hamlib_ptt_type
|
||||
# static.HAMLIB_PTT_PORT = ARGS.hamlib_ptt_port
|
||||
# static.HAMLIB_SERIAL_SPEED = str(ARGS.hamlib_serialspeed)
|
||||
# static.HAMLIB_DATA_BITS = str(ARGS.hamlib_data_bits)
|
||||
# static.HAMLIB_STOP_BITS = str(ARGS.hamlib_stop_bits)
|
||||
# static.HAMLIB_HANDSHAKE = ARGS.hamlib_handshake
|
||||
static.HAMLIB_RADIOCONTROL = ARGS.hamlib_radiocontrol
|
||||
static.HAMLIB_RIGCTLD_IP = ARGS.rigctld_ip
|
||||
static.HAMLIB_RIGCTLD_PORT = str(ARGS.rigctld_port)
|
||||
|
@ -381,15 +302,6 @@ if __name__ == "__main__":
|
|||
static.AUDIO_OUTPUT_DEVICE = config['AUDIO']['tx']
|
||||
|
||||
static.PORT = int(config['NETWORK']['tncport'])
|
||||
# TODO: disabled because we don't need these settings anymore.
|
||||
#static.HAMLIB_DEVICE_NAME = config['RADIO']['devicename']
|
||||
#static.HAMLIB_DEVICE_PORT = config['RADIO']['deviceport']
|
||||
#static.HAMLIB_PTT_TYPE = config['RADIO']['pttprotocol']
|
||||
#static.HAMLIB_PTT_PORT = config['RADIO']['pttport']
|
||||
#static.HAMLIB_SERIAL_SPEED = str(config['RADIO']['serialspeed'])
|
||||
#static.HAMLIB_DATA_BITS = str(config['RADIO']['data_bits'])
|
||||
#static.HAMLIB_STOP_BITS = str(config['RADIO']['stop_bits'])
|
||||
#static.HAMLIB_HANDSHAKE = config['RADIO']['handshake']
|
||||
static.HAMLIB_RADIOCONTROL = config['RADIO']['radiocontrol']
|
||||
static.HAMLIB_RIGCTLD_IP = config['RADIO']['rigctld_ip']
|
||||
static.HAMLIB_RIGCTLD_PORT = str(config['RADIO']['rigctld_port'])
|
||||
|
|
38
tnc/sock.py
38
tnc/sock.py
|
@ -770,17 +770,9 @@ def process_daemon_commands(data):
|
|||
mygrid = str(helpers.return_key_from_object("JN12ab", startparam,"mygrid"))
|
||||
rx_audio = str(helpers.return_key_from_object("0", startparam,"rx_audio"))
|
||||
tx_audio = str(helpers.return_key_from_object("0", startparam,"tx_audio"))
|
||||
devicename = str(received_json["parameter"][0]["devicename"])
|
||||
deviceport = str(received_json["parameter"][0]["deviceport"])
|
||||
serialspeed = str(received_json["parameter"][0]["serialspeed"])
|
||||
pttprotocol = str(received_json["parameter"][0]["pttprotocol"])
|
||||
pttport = str(received_json["parameter"][0]["pttport"])
|
||||
data_bits = str(received_json["parameter"][0]["data_bits"])
|
||||
stop_bits = str(received_json["parameter"][0]["stop_bits"])
|
||||
handshake = str(received_json["parameter"][0]["handshake"])
|
||||
radiocontrol = str(received_json["parameter"][0]["radiocontrol"])
|
||||
rigctld_ip = str(received_json["parameter"][0]["rigctld_ip"])
|
||||
rigctld_port = str(received_json["parameter"][0]["rigctld_port"])
|
||||
radiocontrol = str(helpers.return_key_from_object("disabled", startparam,"radiocontrol"))
|
||||
rigctld_ip = str(helpers.return_key_from_object("127.0.0.1", startparam,"rigctld_ip"))
|
||||
rigctld_port = str(helpers.return_key_from_object("4532", startparam,"rigctld_port"))
|
||||
enable_scatter = str(helpers.return_key_from_object("True", startparam,"enable_scatter"))
|
||||
enable_fft = str(helpers.return_key_from_object("True", startparam,"enable_fft"))
|
||||
enable_fsk = str(helpers.return_key_from_object("False", startparam,"enable_fsk"))
|
||||
|
@ -817,14 +809,6 @@ def process_daemon_commands(data):
|
|||
mygrid,
|
||||
rx_audio,
|
||||
tx_audio,
|
||||
devicename,
|
||||
deviceport,
|
||||
serialspeed,
|
||||
pttprotocol,
|
||||
pttport,
|
||||
data_bits,
|
||||
stop_bits,
|
||||
handshake,
|
||||
radiocontrol,
|
||||
rigctld_ip,
|
||||
rigctld_port,
|
||||
|
@ -851,14 +835,6 @@ def process_daemon_commands(data):
|
|||
|
||||
if received_json["type"] == "get" and received_json["command"] == "test_hamlib":
|
||||
try:
|
||||
devicename = str(received_json["parameter"][0]["devicename"])
|
||||
deviceport = str(received_json["parameter"][0]["deviceport"])
|
||||
serialspeed = str(received_json["parameter"][0]["serialspeed"])
|
||||
pttprotocol = str(received_json["parameter"][0]["pttprotocol"])
|
||||
pttport = str(received_json["parameter"][0]["pttport"])
|
||||
data_bits = str(received_json["parameter"][0]["data_bits"])
|
||||
stop_bits = str(received_json["parameter"][0]["stop_bits"])
|
||||
handshake = str(received_json["parameter"][0]["handshake"])
|
||||
radiocontrol = str(received_json["parameter"][0]["radiocontrol"])
|
||||
rigctld_ip = str(received_json["parameter"][0]["rigctld_ip"])
|
||||
rigctld_port = str(received_json["parameter"][0]["rigctld_port"])
|
||||
|
@ -866,14 +842,6 @@ def process_daemon_commands(data):
|
|||
DAEMON_QUEUE.put(
|
||||
[
|
||||
"TEST_HAMLIB",
|
||||
devicename,
|
||||
deviceport,
|
||||
serialspeed,
|
||||
pttprotocol,
|
||||
pttport,
|
||||
data_bits,
|
||||
stop_bits,
|
||||
handshake,
|
||||
radiocontrol,
|
||||
rigctld_ip,
|
||||
rigctld_port,
|
||||
|
|
|
@ -48,16 +48,7 @@ LISTEN: bool = True
|
|||
PTT_STATE: bool = False
|
||||
TRANSMITTING: bool = False
|
||||
|
||||
HAMLIB_VERSION: str = "0"
|
||||
HAMLIB_PTT_TYPE: str = "RTS"
|
||||
HAMLIB_DEVICE_NAME: str = "RIG_MODEL_DUMMY_NOVFO"
|
||||
HAMLIB_DEVICE_PORT: str = "/dev/ttyUSB0"
|
||||
HAMLIB_SERIAL_SPEED: str = "9600"
|
||||
HAMLIB_PTT_PORT: str = "/dev/ttyUSB0"
|
||||
HAMLIB_STOP_BITS: str = "1"
|
||||
HAMLIB_DATA_BITS: str = "8"
|
||||
HAMLIB_HANDSHAKE: str = "None"
|
||||
HAMLIB_RADIOCONTROL: str = "direct"
|
||||
HAMLIB_RADIOCONTROL: str = "disabled"
|
||||
HAMLIB_RIGCTLD_IP: str = "127.0.0.1"
|
||||
HAMLIB_RIGCTLD_PORT: str = "4532"
|
||||
|
||||
|
|
Loading…
Reference in a new issue