2023-09-05 09:22:00 +00:00
< script setup lang = "ts" >
2023-09-05 17:35:54 +00:00
import { setActivePinia } from 'pinia' ;
import pinia from '../store/index' ;
setActivePinia ( pinia ) ;
import { useSettingsStore } from '../store/settingsStore.js' ;
const settings = useSettingsStore ( pinia ) ;
2023-09-05 09:22:00 +00:00
// TEST HAMLIB
function testHamlib ( ) {
var data _bits = document . getElementById ( "hamlib_data_bits" ) . value ;
var stop _bits = document . getElementById ( "hamlib_stop_bits" ) . value ;
var handshake = document . getElementById ( "hamlib_handshake" ) . value ;
var pttport = document . getElementById ( "hamlib_ptt_port" ) . value ;
var rigctld _ip = document . getElementById ( "hamlib_rigctld_ip" ) . value ;
var rigctld _port = document . getElementById ( "hamlib_rigctld_port" ) . value ;
var deviceid = document . getElementById ( "hamlib_deviceid" ) . value ;
var deviceport = document . getElementById ( "hamlib_deviceport" ) . value ;
var serialspeed = document . getElementById ( "hamlib_serialspeed" ) . value ;
var pttprotocol = document . getElementById ( "hamlib_pttprotocol" ) . value ;
if ( document . getElementById ( "radio-control-switch-disabled" ) . checked ) {
var radiocontrol = "disabled" ;
} else {
var radiocontrol = "rigctld" ;
}
daemon . testHamlib (
radiocontrol ,
deviceid ,
deviceport ,
serialspeed ,
pttprotocol ,
pttport ,
data _bits ,
stop _bits ,
handshake ,
rigctld _ip ,
rigctld _port ,
) ;
} ;
< / script >
2023-09-02 12:03:50 +00:00
< template >
< div class = "card mb-0" >
< div class = "card-header p-1" >
< div class = "container" >
< div class = "row" >
< div class = "col-1" >
< i class = "bi bi-projector" style = "font-size: 1.2rem" > < / i >
< / div >
< div class = "col-4" >
< strong class = "fs-5" > Rig control < / strong >
< / div >
2023-09-05 13:28:58 +00:00
2023-09-02 12:03:50 +00:00
< div class = "col-6" >
2023-09-05 13:28:58 +00:00
< div class = "list-group list-group-horizontal" id = "rig-control-list-tab" role = "rig-control-tablist" >
2023-09-05 17:35:54 +00:00
< 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 >
2023-09-05 13:28:58 +00:00
< / div >
2023-09-02 12:03:50 +00:00
< / div >
< div class = "col-1 text-end" >
< button
type = "button"
id = "openHelpModalRigControl"
data - bs - toggle = "modal"
data - bs - target = "#rigcontrolHelpModal"
class = "btn m-0 p-0 border-0"
>
< i
class = "bi bi-question-circle"
style = "font-size: 1rem"
> < / i >
< / button >
< / div >
< / div >
< / div >
< / div >
< div class = "card-body p-2" style = "height: 100px" >
2023-09-05 13:28:58 +00:00
< div class = "tab-content" id = "rig-control-nav-tabContent" >
< div class = "tab-pane fade show active" id = "list-rig-control-none" role = "tabpanel" aria -labelledby = " list -rig -control -none -list " > < p class = "small" >
2023-09-02 12:03:50 +00:00
TNC will not utilize rig control and features will be
limited . While functional ; it is recommended to configure
hamlib .
2023-09-05 13:28:58 +00:00
< / p > < / div >
< div class = "tab-pane fade" id = "list-rig-control-rigctld" role = "tabpanel" aria -labelledby = " list -rig -control -rigctld -list " > < div class = "input-group input-group-sm mb-1" >
2023-09-02 12:03:50 +00:00
< div class = "input-group input-group-sm mb-1" >
< span class = "input-group-text" > Rigctld < / span >
< span class = "input-group-text" > Address < / span >
< input
type = "text"
class = "form-control"
placeholder = "rigctld IP"
id = "hamlib_rigctld_ip"
aria - label = "Device IP"
2023-09-05 17:35:54 +00:00
v - model = "settings.hamlib_rigctld_ip"
2023-09-02 12:03:50 +00:00
/ >
< span class = "input-group-text" > Port < / span >
< input
type = "text"
class = "form-control"
placeholder = "rigctld port"
id = "hamlib_rigctld_port"
aria - label = "Device Port"
2023-09-05 17:35:54 +00:00
v - model = "settings.hamlib_rigctld_port"
/ >
2023-09-02 12:03:50 +00:00
< / div >
< div class = "input-group input-group-sm mb-1" >
< span class = "input-group-text" > Rigctld < / span >
< button
class = "btn btn-outline-success"
type = "button"
id = "hamlib_rigctld_start"
>
Start
< / button >
< button
class = "btn btn-outline-danger"
type = "button"
id = "hamlib_rigctld_stop"
>
Stop
< / button >
< input
type = "text"
class = "form-control"
placeholder = "Status"
id = "hamlib_rigctld_status"
aria - label = "State"
aria - describedby = "basic-addon1"
/ >
< button
type = "button"
id = "testHamlib"
class = "btn btn-sm btn-outline-secondary ms-1"
data - bs - placement = "bottom"
data - bs - toggle = "tooltip"
data - bs - trigger = "hover"
data - bs - html = "true"
2023-09-05 09:22:00 +00:00
@ click = "testHamlib"
2023-09-02 12:03:50 +00:00
title = "Test your hamlib settings and toggle PTT once. Button will become <strong class='text-success'>green</strong> on success and <strong class='text-danger'>red</strong> if fails."
>
PTT Test
< / button >
< / div >
2023-09-05 13:28:58 +00:00
< / div > < / div >
< div class = "tab-pane fade" id = "list-rig-control-tci" role = "tabpanel" aria -labelledby = " list -rig -control -tci -list " > < div class = "input-group input-group-sm mb-1" >
2023-09-02 12:03:50 +00:00
< div class = "input-group input-group-sm mb-1" >
< span class = "input-group-text" > TCI < / span >
< span class = "input-group-text" > Address < / span >
< input
type = "text"
class = "form-control"
placeholder = "tci IP"
id = "tci_ip"
aria - label = "Device IP"
2023-09-05 17:35:54 +00:00
v - model = "settings.tci_ip"
2023-09-02 12:03:50 +00:00
/ >
< / div >
< div class = "input-group input-group-sm mb-1" >
< span class = "input-group-text" > Port < / span >
< input
type = "text"
class = "form-control"
placeholder = "tci port"
id = "tci_port"
aria - label = "Device Port"
2023-09-05 17:35:54 +00:00
v - model = "settings.tci_port"
2023-09-02 12:03:50 +00:00
/ >
< / div >
2023-09-05 13:28:58 +00:00
< / div > < / div >
< / div >
<!-- RADIO CONTROL DISABLED -- >
< div id = "radio-control-disabled" >
< / div >
<!-- RADIO CONTROL RIGCTLD -- >
< div id = "radio-control-rigctld" >
< / div >
<!-- RADIO CONTROL TCI -- >
< div id = "radio-control-tci" >
2023-09-02 12:03:50 +00:00
< / div >
<!-- RADIO CONTROL HELP -- >
< div id = "radio-control-help" >
2023-09-05 13:28:58 +00:00
<!--
2023-09-02 12:03:50 +00:00
< strong > VOX : < / strong > Use rig control mode 'none'
< br / >
< strong > HAMLIB locally : < / strong > configure in settings , then
start / stop service .
< br / >
< strong > HAMLIB remotely : < / strong > Enter IP / Port , connection
happens automatically .
2023-09-05 13:28:58 +00:00
-- >
2023-09-02 12:03:50 +00:00
< / div >
2023-09-05 13:28:58 +00:00
2023-09-02 12:03:50 +00:00
< / div >
<!-- < div class = "card-footer text-muted small" id = "hamlib_info_field" >
Define TNC rig control mode ( none / hamlib )
< / div >
-- >
< / div >
< / template >