fixed daemon startup

This commit is contained in:
DJ2LS 2023-10-31 16:45:18 +01:00
parent 6268a4f5eb
commit b0d2c195ae
4 changed files with 18 additions and 17 deletions

View file

@ -173,8 +173,8 @@ client.on("data", function (socketdata) {
stateStore.arq_state = data["arq_state"]; stateStore.arq_state = data["arq_state"];
stateStore.mode = data["mode"]; stateStore.mode = data["mode"];
stateStore.bandwidth = data["bandwidth"]; stateStore.bandwidth = data["bandwidth"];
stateStore.tx_audio_level = data["audio_level"]; stateStore.tx_audio_level = data["tx_audio_level"];
stateStore.rx_audio_level = data["audio_level"]; stateStore.rx_audio_level = data["rx_audio_level"];
// if audio level is different from config one, send new audio level to modem // if audio level is different from config one, send new audio level to modem
//console.log(parseInt(stateStore.tx_audio_level)) //console.log(parseInt(stateStore.tx_audio_level))
//console.log(parseInt(settings.tx_audio_level)) //console.log(parseInt(settings.tx_audio_level))

View file

@ -58,7 +58,7 @@ class CONFIG:
'rx': data[3], 'rx': data[3],
'tx': data[4], 'tx': data[4],
'txaudiolevel': data[14], 'txaudiolevel': data[14],
'rxaudiolevel': data[26], 'rxaudiolevel': data[25],
'auto_tune': data[19] 'auto_tune': data[19]
} }
@ -79,7 +79,7 @@ class CONFIG:
'stats': data[19], 'stats': data[19],
'fsk': data[13], 'fsk': data[13],
'tx_delay': data[21], 'tx_delay': data[21],
'transmit_morse_identifier' : data[25] 'transmit_morse_identifier' : data[26]
} }
self.config['TCI'] = {'#TCI settings': None, self.config['TCI'] = {'#TCI settings': None,
'ip': data[22], 'ip': data[22],

View file

@ -212,7 +212,7 @@ class DAEMON:
data[13] hamlib_rigctld_ip, data[13] hamlib_rigctld_ip,
data[14] hamlib_rigctld_path, data[14] hamlib_rigctld_path,
data[15] hamlib_rigctld_server_port, data[15] hamlib_rigctld_server_port,
data[16] hamlib_rigctld_custom_args data[16] hamlib_rigctld_custom_args
""" """
self.start_rigctld(data) self.start_rigctld(data)
@ -417,11 +417,8 @@ class DAEMON:
except Exception as err: except Exception as err:
self.log.warning("[DMN] err starting rigctld: ", e=err) self.log.warning("[DMN] err starting rigctld: ", e=err)
def start_modem(self, data): def start_modem(self, data):
self.log.warning("[DMN] Starting Modem", rig=data[5], port=data[6]) self.log.warning("[DMN] Starting Modem", rig=data[5], port=data[6])
# list of parameters, necessary for running subprocess command as a list # list of parameters, necessary for running subprocess command as a list
options = ["--port", str(DAEMON.port - 1)] options = ["--port", str(DAEMON.port - 1)]
@ -492,17 +489,18 @@ class DAEMON:
options.append(data[21]) options.append(data[21])
#Mesh #Mesh
print(data[24])
if data[24] == "True": if data[24] == "True":
options.append("--mesh") options.append("--mesh")
#Morse identifier
print(data[25])
if data[25] == "True":
options.append("--morse")
options.append("--rx-audio-level") options.append("--rx-audio-level")
options.append(data[26]) options.append(data[25])
#Morse identifier
if data[26] == "True":
options.append("--morse")
# safe data to config file # safe data to config file
config.write_entire_config(data) config.write_entire_config(data)

View file

@ -1096,7 +1096,8 @@ class ThreadedTCPRequestHandler(socketserver.StreamRequestHandler):
low_bandwidth_mode = str(helpers.return_key_from_object("False", startparam, "low_bandwidth_mode")) low_bandwidth_mode = str(helpers.return_key_from_object("False", startparam, "low_bandwidth_mode"))
tuning_range_fmin = str(helpers.return_key_from_object("-50", startparam, "tuning_range_fmin")) tuning_range_fmin = str(helpers.return_key_from_object("-50", startparam, "tuning_range_fmin"))
tuning_range_fmax = str(helpers.return_key_from_object("50", startparam, "tuning_range_fmax")) tuning_range_fmax = str(helpers.return_key_from_object("50", startparam, "tuning_range_fmax"))
tx_audio_level = str(helpers.return_key_from_object("100", startparam, "tx_audio_level")) tx_audio_level = str(helpers.return_key_from_object("0", startparam, "tx_audio_level"))
rx_audio_level = str(helpers.return_key_from_object("0", startparam, "rx_audio_level"))
respond_to_cq = str(helpers.return_key_from_object("False", startparam, "respond_to_cq")) respond_to_cq = str(helpers.return_key_from_object("False", startparam, "respond_to_cq"))
rx_buffer_size = str(helpers.return_key_from_object("16", startparam, "rx_buffer_size")) rx_buffer_size = str(helpers.return_key_from_object("16", startparam, "rx_buffer_size"))
enable_explorer = str(helpers.return_key_from_object("False", startparam, "enable_explorer")) enable_explorer = str(helpers.return_key_from_object("False", startparam, "enable_explorer"))
@ -1149,7 +1150,8 @@ class ThreadedTCPRequestHandler(socketserver.StreamRequestHandler):
tx_delay, tx_delay,
tci_ip, tci_ip,
tci_port, tci_port,
enable_mesh enable_mesh,
rx_audio_level,
] ]
) )
command_response("start_modem", True) command_response("start_modem", True)
@ -1363,7 +1365,8 @@ def send_modem_state():
"rf_level": str(HamlibParam.hamlib_rf), "rf_level": str(HamlibParam.hamlib_rf),
"strength": str(HamlibParam.hamlib_strength), "strength": str(HamlibParam.hamlib_strength),
"alc": str(HamlibParam.alc), "alc": str(HamlibParam.alc),
"audio_level": str(AudioParam.tx_audio_level), "tx_audio_level": str(AudioParam.tx_audio_level),
"rx_audio_level": str(AudioParam.tx_audio_level),
"audio_auto_tune": str(AudioParam.audio_auto_tune), "audio_auto_tune": str(AudioParam.audio_auto_tune),
"speed_level": str(ARQ.arq_speed_level), "speed_level": str(ARQ.arq_speed_level),
"mode": str(HamlibParam.hamlib_mode), "mode": str(HamlibParam.hamlib_mode),