mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
removed hamlib enable/disable setting
This commit is contained in:
parent
d0c8af2623
commit
8f7f510e5f
|
@ -53,21 +53,13 @@ const configDefaultSettings =
|
|||
"mygrid": "JN40aa",\
|
||||
"radiocontrol" : "disabled",\
|
||||
"hamlib_deviceid": "RIG_MODEL_DUMMY_NOVFO",\
|
||||
"enable_hamlib_deviceport" : "False",\
|
||||
"hamlib_deviceport": "/dev/ttyACM1",\
|
||||
"enable_hamlib_stop_bits" : "False",\
|
||||
"hamlib_stop_bits" : "1",\
|
||||
"enable_hamlib_data_bits" : "False",\
|
||||
"hamlib_data_bits" : "8",\
|
||||
"enable_hamlib_handshake" : "False",\
|
||||
"hamlib_handshake" : "None",\
|
||||
"enable_hamlib_serialspeed" : "False",\
|
||||
"hamlib_serialspeed" : "9600",\
|
||||
"enable_hamlib_pttprotocol" : "False",\
|
||||
"hamlib_dtrstate" : "OFF",\
|
||||
"enable_hamlib_dtrstate" : "False",\
|
||||
"hamlib_pttprotocol" : "USB",\
|
||||
"enable_hamlib_pttport" : "False",\
|
||||
"hamlib_pttport": "/dev/ttyACM1",\
|
||||
"hamlib_dcd": "None",\
|
||||
"hamlbib_serialspeed_ptt": "9600",\
|
||||
|
|
|
@ -196,68 +196,6 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
// hamlib settings
|
||||
document.getElementById("hamlib_deviceid").value = config.hamlib_deviceid;
|
||||
|
||||
set_setting_switch(
|
||||
"enable_hamlib_deviceport",
|
||||
"hamlib_deviceport",
|
||||
config.enable_hamlib_deviceport
|
||||
);
|
||||
set_setting_switch(
|
||||
"enable_hamlib_ptt_port",
|
||||
"hamlib_ptt_port",
|
||||
config.enable_hamlib_ptt_port
|
||||
);
|
||||
|
||||
document.getElementById("hamlib_serialspeed").value =
|
||||
config.hamlib_serialspeed;
|
||||
set_setting_switch(
|
||||
"enable_hamlib_serialspeed",
|
||||
"hamlib_serialspeed",
|
||||
config.enable_hamlib_serialspeed
|
||||
);
|
||||
|
||||
document.getElementById("hamlib_pttprotocol").value =
|
||||
config.hamlib_pttprotocol;
|
||||
set_setting_switch(
|
||||
"enable_hamlib_pttprotocol",
|
||||
"hamlib_pttprotocol",
|
||||
config.enable_hamlib_pttprotocol
|
||||
);
|
||||
|
||||
document.getElementById("hamlib_databits").value = config.hamlib_data_bits;
|
||||
set_setting_switch(
|
||||
"enable_hamlib_databits",
|
||||
"hamlib_databits",
|
||||
config.enable_hamlib_databits
|
||||
);
|
||||
|
||||
document.getElementById("hamlib_stopbits").value = config.hamlib_stop_bits;
|
||||
set_setting_switch(
|
||||
"enable_hamlib_stopbits",
|
||||
"hamlib_stopbits",
|
||||
config.enable_hamlib_stopbits
|
||||
);
|
||||
|
||||
document.getElementById("hamlib_handshake").value = config.hamlib_handshake;
|
||||
set_setting_switch(
|
||||
"enable_hamlib_handshake",
|
||||
"hamlib_handshake",
|
||||
config.enable_hamlib_handshake
|
||||
);
|
||||
|
||||
document.getElementById("hamlib_dcd").value = config.hamlib_dcd;
|
||||
set_setting_switch(
|
||||
"enable_hamlib_dcd",
|
||||
"hamlib_dcd",
|
||||
config.enable_hamlib_dcd
|
||||
);
|
||||
|
||||
document.getElementById("hamlib_dtrstate").value = config.hamlib_dtrstate;
|
||||
set_setting_switch(
|
||||
"enable_hamlib_dtrstate",
|
||||
"hamlib_dtrstate",
|
||||
config.enable_hamlib_dtrstate
|
||||
);
|
||||
|
||||
document.getElementById("hamlib_rigctld_ip").value = config.hamlib_rigctld_ip;
|
||||
document.getElementById("hamlib_rigctld_port").value =
|
||||
config.hamlib_rigctld_port;
|
||||
|
@ -577,75 +515,6 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
||||
});
|
||||
|
||||
// radio settings 'enable hamlib deviceport' event listener
|
||||
document
|
||||
.getElementById("enable_hamlib_deviceport")
|
||||
.addEventListener("change", () => {
|
||||
enable_setting("enable_hamlib_deviceport", "hamlib_deviceport");
|
||||
});
|
||||
|
||||
// radio settings 'enable hamlib serialspeed' event listener
|
||||
document
|
||||
.getElementById("enable_hamlib_serialspeed")
|
||||
.addEventListener("change", () => {
|
||||
enable_setting("enable_hamlib_serialspeed", "hamlib_serialspeed");
|
||||
});
|
||||
|
||||
// radio settings 'enable hamlib data bits' event listener
|
||||
document
|
||||
.getElementById("enable_hamlib_databits")
|
||||
.addEventListener("change", () => {
|
||||
enable_setting("enable_hamlib_databits", "hamlib_databits");
|
||||
});
|
||||
|
||||
// radio settings 'enable hamlib stop bits' event listener
|
||||
document
|
||||
.getElementById("enable_hamlib_stopbits")
|
||||
.addEventListener("change", () => {
|
||||
enable_setting("enable_hamlib_stopbits", "hamlib_stopbits");
|
||||
});
|
||||
|
||||
// radio settings 'enable hamlib handshake' event listener
|
||||
document
|
||||
.getElementById("enable_hamlib_handshake")
|
||||
.addEventListener("change", () => {
|
||||
enable_setting("enable_hamlib_handshake", "hamlib_handshake");
|
||||
});
|
||||
|
||||
// radio settings 'enable hamlib ptt port' event listener
|
||||
document
|
||||
.getElementById("enable_hamlib_ptt_port")
|
||||
.addEventListener("change", () => {
|
||||
enable_setting("enable_hamlib_ptt_port", "hamlib_ptt_port");
|
||||
});
|
||||
|
||||
// radio settings 'enable hamlib ptt protocol' event listener
|
||||
document
|
||||
.getElementById("enable_hamlib_pttprotocol")
|
||||
.addEventListener("change", () => {
|
||||
enable_setting("enable_hamlib_pttprotocol", "hamlib_pttprotocol");
|
||||
});
|
||||
// radio settings 'enable hamlib dcd' event listener
|
||||
document
|
||||
.getElementById("enable_hamlib_dcd")
|
||||
.addEventListener("change", () => {
|
||||
enable_setting("enable_hamlib_dcd", "hamlib_dcd");
|
||||
});
|
||||
|
||||
// radio settings 'enable hamlib dtr state' event listener
|
||||
document
|
||||
.getElementById("enable_hamlib_dtrstate")
|
||||
.addEventListener("change", () => {
|
||||
enable_setting("enable_hamlib_dtrstate", "hamlib_dtrstate");
|
||||
});
|
||||
|
||||
/*
|
||||
document.getElementById('hamlib_rigctld_path').addEventListener('change', () => {
|
||||
var fileList = document.getElementById("dataModalFile").files;
|
||||
console.log(fileList)
|
||||
|
||||
})
|
||||
*/
|
||||
|
||||
document
|
||||
.getElementById("hamlib_rigctld_path")
|
||||
|
@ -683,33 +552,33 @@ var fileList = document.getElementById("dataModalFile").files;
|
|||
paramList = paramList.concat("-m", hamlib_deviceid);
|
||||
|
||||
// hamlib deviceport setting
|
||||
if (document.getElementById("enable_hamlib_deviceport").checked) {
|
||||
if (document.getElementById("hamlib_deviceport").value !== 'ignore') {
|
||||
var hamlib_deviceport =
|
||||
document.getElementById("hamlib_deviceport").value;
|
||||
paramList = paramList.concat("-r", hamlib_deviceport);
|
||||
}
|
||||
|
||||
// hamlib serialspeed setting
|
||||
if (document.getElementById("enable_hamlib_serialspeed").checked) {
|
||||
if (document.getElementById("hamlib_serialspeed").value !== 'ignore') {
|
||||
var hamlib_serialspeed =
|
||||
document.getElementById("hamlib_serialspeed").value;
|
||||
paramList = paramList.concat("-s", hamlib_serialspeed);
|
||||
}
|
||||
|
||||
// hamlib databits setting
|
||||
if (document.getElementById("enable_hamlib_databits").checked) {
|
||||
if (document.getElementById("hamlib_databits").value !== 'ignore') {
|
||||
var hamlib_databits = document.getElementById("hamlib_databits").value;
|
||||
paramList = paramList.concat("--set-conf=data_bits=" + hamlib_databits);
|
||||
}
|
||||
|
||||
// hamlib stopbits setting
|
||||
if (document.getElementById("enable_hamlib_stopbits").checked) {
|
||||
if (document.getElementById("hamlib_stopbits").value !== 'ignore') {
|
||||
var hamlib_stopbits = document.getElementById("hamlib_stopbits").value;
|
||||
paramList = paramList.concat("--set-conf=stop_bits=" + hamlib_stopbits);
|
||||
}
|
||||
|
||||
// hamlib handshake setting
|
||||
if (document.getElementById("enable_hamlib_handshake").checked) {
|
||||
if (document.getElementById("hamlib_handshake").value !== 'ignore') {
|
||||
var hamlib_handshake =
|
||||
document.getElementById("hamlib_handshake").value;
|
||||
paramList = paramList.concat(
|
||||
|
@ -718,26 +587,26 @@ var fileList = document.getElementById("dataModalFile").files;
|
|||
}
|
||||
|
||||
// hamlib dcd setting
|
||||
if (document.getElementById("enable_hamlib_dcd").checked) {
|
||||
if (document.getElementById("hamlib_dcd").value !== 'ignore') {
|
||||
var hamlib_dcd = document.getElementById("hamlib_dcd").value;
|
||||
paramList = paramList.concat("--dcd-type=" + hamlib_dcd);
|
||||
}
|
||||
|
||||
// hamlib ptt port
|
||||
if (document.getElementById("enable_hamlib_ptt_port").checked) {
|
||||
if (document.getElementById("hamlib_ptt_port").value !== 'ignore') {
|
||||
var hamlib_ptt_port = document.getElementById("hamlib_ptt_port").value;
|
||||
paramList = paramList.concat("-p", hamlib_ptt_port);
|
||||
}
|
||||
|
||||
// hamlib ptt type
|
||||
if (document.getElementById("enable_hamlib_pttprotocol").checked) {
|
||||
if (document.getElementById("hamlib_pttprotocol").value !== 'ignore') {
|
||||
var hamlib_ptt_type =
|
||||
document.getElementById("hamlib_pttprotocol").value;
|
||||
paramList = paramList.concat("--ptt-type=" + hamlib_ptt_type);
|
||||
}
|
||||
|
||||
// hamlib dtr state
|
||||
if (document.getElementById("enable_hamlib_dtrstate").checked) {
|
||||
if (document.getElementById("hamlib_dtrstate").value !== 'ignore') {
|
||||
var hamlib_dtrstate = document.getElementById("hamlib_dtrstate").value;
|
||||
paramList = paramList.concat("--set-conf=dtr_state=" + hamlib_dtrstate);
|
||||
}
|
||||
|
|
|
@ -2031,12 +2031,7 @@
|
|||
></i>
|
||||
Device Port
|
||||
</span>
|
||||
<span class="input-group-text">
|
||||
<input
|
||||
class="form-check-sm form-check-input"
|
||||
type="checkbox"
|
||||
id="enable_hamlib_deviceport"
|
||||
/>
|
||||
|
||||
</span>
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
|
@ -2056,22 +2051,18 @@
|
|||
></i>
|
||||
Serial Speed</span
|
||||
>
|
||||
<span class="input-group-text">
|
||||
<input
|
||||
class="form-check-sm form-check-input"
|
||||
type="checkbox"
|
||||
id="enable_hamlib_serialspeed"
|
||||
/>
|
||||
|
||||
</span>
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
aria-label=".form-select-sm"
|
||||
id="hamlib_serialspeed"
|
||||
>
|
||||
<option selected value="ignore">-- ignore --</option>
|
||||
<option value="1200">1200</option>
|
||||
<option value="2400">2400</option>
|
||||
<option value="4800">4800</option>
|
||||
<option selected value="9600">9600</option>
|
||||
<option value="9600">9600</option>
|
||||
<option value="14400">14400</option>
|
||||
<option value="19200">19200</option>
|
||||
<option value="28800">28800</option>
|
||||
|
@ -2084,18 +2075,14 @@
|
|||
<span class="input-group-text" style="width: 180px"
|
||||
>Data bits</span
|
||||
>
|
||||
<span class="input-group-text">
|
||||
<input
|
||||
class="form-check-sm form-check-input"
|
||||
type="checkbox"
|
||||
id="enable_hamlib_databits"
|
||||
/>
|
||||
|
||||
</span>
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
aria-label=".form-select-sm"
|
||||
id="hamlib_databits"
|
||||
>
|
||||
<option selected value="ignore">-- ignore --</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
</select>
|
||||
|
@ -2104,18 +2091,14 @@
|
|||
<span class="input-group-text" style="width: 180px"
|
||||
>Stop Bits</span
|
||||
>
|
||||
<span class="input-group-text">
|
||||
<input
|
||||
class="form-check-sm form-check-input"
|
||||
type="checkbox"
|
||||
id="enable_hamlib_stopbits"
|
||||
/>
|
||||
|
||||
</span>
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
aria-label=".form-select-sm"
|
||||
id="hamlib_stopbits"
|
||||
>
|
||||
<option selected value="ignore">-- ignore --</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
</select>
|
||||
|
@ -2124,18 +2107,14 @@
|
|||
<span class="input-group-text" style="width: 180px"
|
||||
>Serial Handshake</span
|
||||
>
|
||||
<span class="input-group-text">
|
||||
<input
|
||||
class="form-check-sm form-check-input"
|
||||
type="checkbox"
|
||||
id="enable_hamlib_handshake"
|
||||
/>
|
||||
|
||||
</span>
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
aria-label=".form-select-sm"
|
||||
id="hamlib_handshake"
|
||||
>
|
||||
<option selected value="ignore">-- ignore --</option>
|
||||
<option value="None">None (Default)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
@ -2148,31 +2127,21 @@
|
|||
></i
|
||||
>PTT Device Port</span
|
||||
>
|
||||
<span class="input-group-text">
|
||||
<input
|
||||
class="form-check-sm form-check-input"
|
||||
type="checkbox"
|
||||
id="enable_hamlib_ptt_port"
|
||||
/>
|
||||
|
||||
</span>
|
||||
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
aria-label=".form-select-sm"
|
||||
id="hamlib_ptt_port"
|
||||
>
|
||||
<!--<option value="None">None</option>-->
|
||||
> <option selected value="ignore">-- ignore --</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group input-group-sm mb-1">
|
||||
<span class="input-group-text" style="width: 180px"
|
||||
>PTT Type</span
|
||||
>
|
||||
<span class="input-group-text">
|
||||
<input
|
||||
class="form-check-sm form-check-input"
|
||||
type="checkbox"
|
||||
id="enable_hamlib_pttprotocol"
|
||||
/>
|
||||
|
||||
</span>
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
|
@ -2180,6 +2149,7 @@
|
|||
id="hamlib_pttprotocol"
|
||||
style="width: 0.5rem"
|
||||
>
|
||||
<option selected value="ignore">-- ignore --</option>
|
||||
<option value="NONE">NONE</option>
|
||||
<option value="RIG">RIG</option>
|
||||
<option value="USB">USB</option>
|
||||
|
@ -2191,12 +2161,7 @@
|
|||
</div>
|
||||
<div class="input-group input-group-sm mb-1">
|
||||
<span class="input-group-text" style="width: 180px">DCD</span>
|
||||
<span class="input-group-text">
|
||||
<input
|
||||
class="form-check-sm form-check-input"
|
||||
type="checkbox"
|
||||
id="enable_hamlib_dcd"
|
||||
/>
|
||||
|
||||
</span>
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
|
@ -2204,6 +2169,7 @@
|
|||
id="hamlib_dcd"
|
||||
style="width: 0.5rem"
|
||||
>
|
||||
<option selected value="ignore">-- ignore --</option>
|
||||
<option value="NONE">NONE</option>
|
||||
<option value="RIG">RIG/CAT</option>
|
||||
<option value="DSR">DSR</option>
|
||||
|
@ -2214,12 +2180,7 @@
|
|||
</div>
|
||||
<div class="input-group input-group-sm mb-1">
|
||||
<span class="input-group-text" style="width: 180px">DTR</span>
|
||||
<span class="input-group-text">
|
||||
<input
|
||||
class="form-check-sm form-check-input"
|
||||
type="checkbox"
|
||||
id="enable_hamlib_dtrstate"
|
||||
/>
|
||||
|
||||
</span>
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
|
@ -2227,6 +2188,7 @@
|
|||
id="hamlib_dtrstate"
|
||||
style="width: 0.5rem"
|
||||
>
|
||||
<option selected value="ignore">-- ignore --</option>
|
||||
<option value="OFF">OFF</option>
|
||||
<option value="ON">ON</option>
|
||||
</select>
|
||||
|
@ -2248,6 +2210,7 @@
|
|||
class="form-select form-select-sm"
|
||||
id="tuning_range_fmin"
|
||||
>
|
||||
|
||||
<option value="-50.0">-50.0</option>
|
||||
<option value="-100.0">-100.0</option>
|
||||
<option value="-150.0">-150.0</option>
|
||||
|
|
Loading…
Reference in a new issue