Add rig control settings to settings area

This commit is contained in:
Pedro 2023-11-02 16:12:30 +01:00
parent 5f76a0d283
commit d0a2eca8be
2 changed files with 82 additions and 0 deletions

View file

@ -2,6 +2,7 @@
import settings_station from "./settings_station.vue";
import settings_gui from "./settings_gui.vue";
import settings_chat from "./settings_chat.vue";
import settings_rigcontrol from "./settings_rigcontrol.vue";
import settings_hamlib from "./settings_hamlib.vue";
import settings_modem from "./settings_modem.vue";
import settings_web from "./settings_web.vue";
@ -68,6 +69,20 @@ import settings_exp from "./settings_exp.vue";
Chat
</button>
</li>
<li class="nav-item" role="presentation">
<button
class="nav-link"
id="rigcontrol-tab"
data-bs-toggle="tab"
data-bs-target="#rigcontrol"
type="button"
role="tab"
aria-controls="profile"
aria-selected="false"
>
Rig Control
</button>
</li>
<li class="nav-item" role="presentation">
<button
class="nav-link"
@ -162,6 +177,16 @@ import settings_exp from "./settings_exp.vue";
<settings_chat />
</div>
<div
class="tab-pane"
id="rigcontrol"
role="tabpanel"
aria-labelledby="rigcontrol-tab"
tabindex="0"
>
<settings_rigcontrol />
</div>
<div
class="tab-pane"
id="hamlib"

View file

@ -0,0 +1,57 @@
<script setup lang="ts">
import { saveSettingsToFile } from "../js/settingsHandler";
import { setActivePinia } from "pinia";
import pinia from "../store/index";
setActivePinia(pinia);
import { useSettingsStore } from "../store/settingsStore.js";
const settings = useSettingsStore(pinia);
function saveSettings() {
saveSettingsToFile();
}
</script>
<template>
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" style="width: 180px">Rig Control</span>
<select
class="form-select form-select-sm"
aria-label=".form-select-sm"
id="rigcontrol_radiocontrol"
@change="saveSettings"
v-model="settings.radiocontrol"
>
<option selected value="disabled">Disabled / VOX (no rig control - use with VOX)</option>
<option selected value="rigctld">Rigctld (Hamlib)</option>
<option selected value="tci">TCI</option>
</select>
</div>
<hr class="m-2" />
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" style="width: 180px">TCI IP Address</span>
<input
type="text"
class="form-control"
placeholder="TCI IP"
id="rigcontrol_tci_ip"
aria-label="Device IP"
v-model="settings.tci_ip"
/>
</div>
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" style="width: 180px">TCI port</span>
<input
type="text"
class="form-control"
placeholder="TCI port"
id="rigcontrol_tci_port"
aria-label="Device Port"
v-model="settings.tci_port"
/>
</div>
</template>