mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
fixed rigctld daemon port
This commit is contained in:
parent
77fc7bdd2f
commit
7304246f69
|
@ -363,6 +363,12 @@ function openWebExternal(url) {
|
|||
FreeDATA - {{ version }}
|
||||
</h1>
|
||||
|
||||
<h4 class="fs-5">
|
||||
tnc version - {{ state.tnc_version }}
|
||||
</h4>
|
||||
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row mt-2">
|
||||
<div
|
||||
|
|
|
@ -14,6 +14,24 @@ const settings = useSettingsStore(pinia);
|
|||
import { useStateStore } from "../store/stateStore.js";
|
||||
const state = useStateStore(pinia);
|
||||
|
||||
function startStopRigctld() {
|
||||
switch (state.rigctld_started) {
|
||||
case "stopped":
|
||||
|
||||
settings.hamlib_deviceport = (<HTMLInputElement>document.getElementById("hamlib_deviceport")).value;
|
||||
|
||||
|
||||
startRigctld();
|
||||
|
||||
break;
|
||||
case "running":
|
||||
stopRigctld();
|
||||
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
function selectRadioControl() {
|
||||
// @ts-expect-error
|
||||
switch (event.target.id) {
|
||||
|
@ -142,12 +160,10 @@ alert("not yet implemented")
|
|||
id="hamlib_deviceport"
|
||||
style="width: 7rem"
|
||||
@change="saveSettings"
|
||||
v-model="settings.hamlib_deviceport"
|
||||
v-html="settings.getSerialDevices()"
|
||||
>
|
||||
<!--<option selected value="/dev/ttyUSB0">/dev/ttyUSB0</option>
|
||||
<option value="/dev/ttyUSB1">/dev/ttyUSB1</option>-->
|
||||
</select>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -158,7 +174,7 @@ alert("not yet implemented")
|
|||
class="btn btn-outline-success"
|
||||
type="button"
|
||||
id="hamlib_rigctld_start"
|
||||
@click="startRigctld"
|
||||
@click="startStopRigctld"
|
||||
>
|
||||
Start
|
||||
</button>
|
||||
|
@ -166,7 +182,7 @@ alert("not yet implemented")
|
|||
class="btn btn-outline-danger"
|
||||
type="button"
|
||||
id="hamlib_rigctld_stop"
|
||||
@click="stopRigctld"
|
||||
@click="startStopRigctld"
|
||||
|
||||
>
|
||||
Stop
|
||||
|
|
|
@ -150,21 +150,13 @@ daemon.on("data", function (socketdata) {
|
|||
|
||||
console.log(data)
|
||||
if (data["command"] == "daemon_state") {
|
||||
let Data = {
|
||||
input_devices: data["input_devices"],
|
||||
output_devices: data["output_devices"],
|
||||
python_version: data["python_version"],
|
||||
hamlib_version: data["hamlib_version"],
|
||||
serial_devices: data["serial_devices"],
|
||||
tnc_running_state: data["daemon_state"][0]["status"],
|
||||
ram_usage: data["ram"],
|
||||
cpu_usage: data["cpu"],
|
||||
version: data["version"],
|
||||
};
|
||||
|
||||
// update audio devices by putting them to audio store
|
||||
audioStore.inputDevices = data["input_devices"];
|
||||
audioStore.outputDevices = data["output_devices"];
|
||||
settings.serial_devices = data["serial_devices"];
|
||||
state.python_version = data["python_version"]
|
||||
state.tnc_version = data["version"]
|
||||
state.tnc_running_state = data["daemon_state"][0]["status"];
|
||||
state.rigctld_started = data["rigctld_state"][0]["status"];
|
||||
//state.rigctld_process = data["daemon_state"][0]["rigctld_process"];
|
||||
|
|
|
@ -75,6 +75,16 @@ export const useSettingsStore = defineStore("settingsStore", () => {
|
|||
var enable_is_writing = ref("True");
|
||||
var tx_delay = ref(0);
|
||||
var enable_mesh_features = ref("False");
|
||||
var serial_devices = ref();
|
||||
|
||||
|
||||
function getSerialDevices() {
|
||||
var html = "";
|
||||
for (var key in serial_devices.value) {
|
||||
html += `<option value="${serial_devices.value[key]["port"]}">${serial_devices.value[key]["port"]} - ${serial_devices.value[key]["description"]}</option>`;
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
function getJSON() {
|
||||
var config_export = {
|
||||
|
@ -200,6 +210,8 @@ export const useSettingsStore = defineStore("settingsStore", () => {
|
|||
enable_mesh_features,
|
||||
getJSON,
|
||||
tx_audio,
|
||||
rx_audio
|
||||
rx_audio,
|
||||
getSerialDevices,
|
||||
serial_devices
|
||||
};
|
||||
});
|
||||
|
|
|
@ -56,6 +56,8 @@ export const useStateStore = defineStore("stateStore", () => {
|
|||
var rigctld_started = ref();
|
||||
var rigctld_process = ref();
|
||||
|
||||
var python_version = ref();
|
||||
var tnc_version = ref();
|
||||
|
||||
function updateTncState(state) {
|
||||
tnc_connection.value = state;
|
||||
|
@ -151,6 +153,8 @@ export const useStateStore = defineStore("stateStore", () => {
|
|||
heard_stations,
|
||||
beacon_state,
|
||||
rigctld_started,
|
||||
rigctld_process
|
||||
rigctld_process,
|
||||
python_version,
|
||||
tnc_version
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue