mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 10:04:33 +02:00
first attempt getting sock working
This commit is contained in:
parent
e9d8b786b1
commit
00a4803f00
|
@ -57,7 +57,7 @@ function useLoading() {
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #282c34;
|
||||
z-index: 9;
|
||||
z-index: 99999;
|
||||
}
|
||||
`
|
||||
const oStyle = document.createElement('style')
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
|
||||
import { setActivePinia } from 'pinia';
|
||||
import pinia from '../store/index';
|
||||
setActivePinia(pinia);
|
||||
|
||||
import { useSettingsStore } from '../store/settingsStore.js';
|
||||
const settings = useSettingsStore(pinia);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
|
||||
|
@ -56,6 +67,7 @@
|
|||
maxlength="8"
|
||||
aria-label="Input group"
|
||||
aria-describedby="btnGroupAddon"
|
||||
v-model="settings.mycall"
|
||||
/>
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
|
@ -102,6 +114,7 @@
|
|||
maxlength="6"
|
||||
aria-label="Input group"
|
||||
aria-describedby="btnGroupAddon"
|
||||
v-model="settings.mygrid"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
|
||||
import { setActivePinia } from 'pinia';
|
||||
import pinia from '../store/index';
|
||||
setActivePinia(pinia);
|
||||
|
||||
import { useSettingsStore } from '../store/settingsStore.js';
|
||||
const settings = useSettingsStore(pinia);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// TEST HAMLIB
|
||||
function testHamlib(){
|
||||
var data_bits = document.getElementById("hamlib_data_bits").value;
|
||||
|
@ -58,9 +70,9 @@ function testHamlib(){
|
|||
|
||||
|
||||
<div class="list-group list-group-horizontal" id="rig-control-list-tab" role="rig-control-tablist">
|
||||
<a class="list-group-item list-group-item-action active" id="list-rig-control-none-list" data-bs-toggle="list" href="#list-rig-control-none" role="tab" aria-controls="list-rig-control-none">None/Vox</a>
|
||||
<a class="list-group-item list-group-item-action" id="list-rig-control-rigctld-list" data-bs-toggle="list" href="#list-rig-control-rigctld" role="tab" aria-controls="list-rig-control-rigctld">Rigctld</a>
|
||||
<a class="list-group-item list-group-item-action" id="list-rig-control-tci-list" data-bs-toggle="list" href="#list-rig-control-tci" role="tab" aria-controls="list-rig-control-tci">TCI</a>
|
||||
<a class="py-1 list-group-item list-group-item-action active" id="list-rig-control-none-list" data-bs-toggle="list" href="#list-rig-control-none" role="tab" aria-controls="list-rig-control-none">None/Vox</a>
|
||||
<a class="py-1 list-group-item list-group-item-action" id="list-rig-control-rigctld-list" data-bs-toggle="list" href="#list-rig-control-rigctld" role="tab" aria-controls="list-rig-control-rigctld">Rigctld</a>
|
||||
<a class="py-1 list-group-item list-group-item-action" id="list-rig-control-tci-list" data-bs-toggle="list" href="#list-rig-control-tci" role="tab" aria-controls="list-rig-control-tci">TCI</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -103,7 +115,7 @@ function testHamlib(){
|
|||
placeholder="rigctld IP"
|
||||
id="hamlib_rigctld_ip"
|
||||
aria-label="Device IP"
|
||||
aria-describedby="basic-addon1"
|
||||
v-model="settings.hamlib_rigctld_ip"
|
||||
/>
|
||||
<span class="input-group-text">Port</span>
|
||||
<input
|
||||
|
@ -112,8 +124,8 @@ function testHamlib(){
|
|||
placeholder="rigctld port"
|
||||
id="hamlib_rigctld_port"
|
||||
aria-label="Device Port"
|
||||
aria-describedby="basic-addon1"
|
||||
/>
|
||||
v-model="settings.hamlib_rigctld_port"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm mb-1">
|
||||
|
@ -166,7 +178,7 @@ function testHamlib(){
|
|||
placeholder="tci IP"
|
||||
id="tci_ip"
|
||||
aria-label="Device IP"
|
||||
aria-describedby="basic-addon1"
|
||||
v-model="settings.tci_ip"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -178,7 +190,7 @@ function testHamlib(){
|
|||
placeholder="tci port"
|
||||
id="tci_port"
|
||||
aria-label="Device Port"
|
||||
aria-describedby="basic-addon1"
|
||||
v-model="settings.tci_port"
|
||||
/>
|
||||
</div>
|
||||
</div></div>
|
||||
|
|
103
gui_vue/src/store/settingsStore.js
Normal file
103
gui_vue/src/store/settingsStore.js
Normal file
|
@ -0,0 +1,103 @@
|
|||
import { defineStore } from 'pinia'
|
||||
import { ref, computed } from 'vue';
|
||||
|
||||
export const useSettingsStore = defineStore('settingsStore', () => {
|
||||
|
||||
// station
|
||||
var mycall = ref("AA0AA-0")
|
||||
var mygrid = ref("JN40aa")
|
||||
|
||||
// rigctld
|
||||
var hamlib_rigctld_port = ref(4532)
|
||||
var hamlib_rigctld_ip = ref("127.0.0.1")
|
||||
/*
|
||||
"radiocontrol" : "disabled",\
|
||||
"hamlib_deviceid": "RIG_MODEL_DUMMY_NOVFO",\
|
||||
"hamlib_deviceport": "ignore",\
|
||||
"hamlib_stop_bits": "ignore",\
|
||||
"hamlib_data_bits": "ignore",\
|
||||
"hamlib_handshake": "ignore",\
|
||||
"hamlib_serialspeed": "ignore",\
|
||||
"hamlib_dtrstate": "ignore",\
|
||||
"hamlib_pttprotocol": "ignore",\
|
||||
"hamlib_ptt_port": "ignore",\
|
||||
"hamlib_dcd": "ignore",\
|
||||
"hamlbib_serialspeed_ptt": "9600",\
|
||||
"hamlib_rigctld_port" : "4532",\
|
||||
"hamlib_rigctld_ip" : "127.0.0.1",\
|
||||
"hamlib_rigctld_path" : "",\
|
||||
"hamlib_rigctld_server_port" : "4532",\
|
||||
"hamlib_rigctld_custom_args": "",\
|
||||
*/
|
||||
|
||||
// tci
|
||||
var tci_ip = ref('127.0.0.1')
|
||||
var tci_port = ref(50001)
|
||||
|
||||
|
||||
/*
|
||||
"tnc_host": "127.0.0.1",\
|
||||
"tnc_port": "3000",\
|
||||
"daemon_host": "127.0.0.1",\
|
||||
"daemon_port": "3001",\
|
||||
|
||||
"radiocontrol" : "disabled",\
|
||||
"hamlib_deviceid": "RIG_MODEL_DUMMY_NOVFO",\
|
||||
"hamlib_deviceport": "ignore",\
|
||||
"hamlib_stop_bits": "ignore",\
|
||||
"hamlib_data_bits": "ignore",\
|
||||
"hamlib_handshake": "ignore",\
|
||||
"hamlib_serialspeed": "ignore",\
|
||||
"hamlib_dtrstate": "ignore",\
|
||||
"hamlib_pttprotocol": "ignore",\
|
||||
"hamlib_ptt_port": "ignore",\
|
||||
"hamlib_dcd": "ignore",\
|
||||
"hamlbib_serialspeed_ptt": "9600",\
|
||||
"hamlib_rigctld_port" : "4532",\
|
||||
"hamlib_rigctld_ip" : "127.0.0.1",\
|
||||
"hamlib_rigctld_path" : "",\
|
||||
"hamlib_rigctld_server_port" : "4532",\
|
||||
"hamlib_rigctld_custom_args": "",\
|
||||
|
||||
"spectrum": "waterfall",\
|
||||
"tnclocation": "localhost",\
|
||||
"enable_scatter" : "False",\
|
||||
"enable_fft" : "False",\
|
||||
"enable_fsk" : "False",\
|
||||
"low_bandwidth_mode" : "False",\
|
||||
"theme" : "default",\
|
||||
"screen_height" : 430,\
|
||||
"screen_width" : 1050,\
|
||||
"update_channel" : "latest",\
|
||||
"beacon_interval" : 300,\
|
||||
"received_files_folder" : "None",\
|
||||
"tuning_range_fmin" : "-50.0",\
|
||||
"tuning_range_fmax" : "50.0",\
|
||||
"respond_to_cq" : "True",\
|
||||
"rx_buffer_size" : "16", \
|
||||
"enable_explorer" : "False", \
|
||||
"wftheme": 2, \
|
||||
"high_graphics" : "True",\
|
||||
"explorer_stats" : "False", \
|
||||
"auto_tune" : "False", \
|
||||
"enable_is_writing" : "True", \
|
||||
"shared_folder_path" : ".", \
|
||||
"enable_request_profile" : "True", \
|
||||
"enable_request_shared_folder" : "False", \
|
||||
"max_retry_attempts" : 5, \
|
||||
"enable_auto_retry" : "False", \
|
||||
"tx_delay" : 0, \
|
||||
"auto_start": 0, \
|
||||
"enable_sys_notification": 1, \
|
||||
"enable_mesh_features": "False" \
|
||||
*/
|
||||
return {
|
||||
mycall,
|
||||
mygrid,
|
||||
tci_ip,
|
||||
tci_port,
|
||||
hamlib_rigctld_ip,
|
||||
hamlib_rigctld_port
|
||||
};
|
||||
|
||||
});
|
|
@ -1,14 +0,0 @@
|
|||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useCounterStore = defineStore('counter', {
|
||||
state: () => {
|
||||
return { count: 0 }
|
||||
},
|
||||
// could also be defined as
|
||||
// state: () => ({ count: 0 })
|
||||
actions: {
|
||||
increment() {
|
||||
this.count++
|
||||
},
|
||||
},
|
||||
})
|
|
@ -15,7 +15,7 @@
|
|||
"jsx": "preserve",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"strict": false,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
|
|
|
@ -130,7 +130,7 @@ class TCIParam:
|
|||
|
||||
@dataclass
|
||||
class TNC:
|
||||
version = "0.10.3-alpha.1-hmac-exp4"
|
||||
version = "0.11.0-alpha.1-vuejs"
|
||||
host: str = "0.0.0.0"
|
||||
port: int = 3000
|
||||
SOCKET_TIMEOUT: int = 1 # seconds
|
||||
|
|
Loading…
Reference in a new issue