From 436420f8542500f20ed63c211d6f0d15cca9f110 Mon Sep 17 00:00:00 2001 From: Mashintime Date: Sat, 16 Dec 2023 11:11:16 -0500 Subject: [PATCH] Grid updates --- gui/src/components/dynamic_components2.vue | 199 ++++++++++++++++-- gui/src/components/grid/grid_CQ.vue | 13 ++ .../grid/grid_active_rig_control.vue | 157 +------------- gui/src/components/grid/grid_frequency.vue | 24 +++ gui/src/components/grid/grid_mycall.vue | 30 +++ gui/src/components/grid/grid_ping.vue | 44 ++++ gui/src/components/grid/grid_ptt.vue | 2 +- gui/src/components/main.vue | 8 +- gui/src/js/api.js | 11 + gui/src/js/waterfallHandler.js | 2 + gui/src/store/settingsStore.js | 2 +- gui/src/store/stateStore.js | 4 +- 12 files changed, 324 insertions(+), 172 deletions(-) create mode 100644 gui/src/components/grid/grid_CQ.vue create mode 100644 gui/src/components/grid/grid_frequency.vue create mode 100644 gui/src/components/grid/grid_mycall.vue create mode 100644 gui/src/components/grid/grid_ping.vue diff --git a/gui/src/components/dynamic_components2.vue b/gui/src/components/dynamic_components2.vue index 1bb46ac3..e4f21c51 100644 --- a/gui/src/components/dynamic_components2.vue +++ b/gui/src/components/dynamic_components2.vue @@ -6,7 +6,9 @@ import pinia from "../store/index"; setActivePinia(pinia); import "../../node_modules/gridstack/dist/gridstack.min.css"; import { GridStack } from "gridstack"; -import { settingsStore as settings } from "../store/settingsStore.js"; +import { useStateStore } from "../store/stateStore.js"; +const state = useStateStore(pinia); +import { setModemFrequency } from "../js/api"; import active_heard_stations from "./grid/grid_active_heard_stations.vue"; import mini_heard_stations from "./grid/grid_active_heard_stations_mini.vue"; @@ -20,6 +22,10 @@ import dbfs_meter from "./grid/grid_dbfs.vue"; import grid_activities from "./grid/grid_activities.vue"; import grid_button from "./grid/button.vue"; import grid_ptt from "./grid/grid_ptt.vue"; +import grid_mycall from "./grid/grid_mycall.vue"; +import grid_CQ_btn from "./grid/grid_CQ.vue"; +import grid_ping from "./grid/grid_ping.vue"; +import grid_freq from "./grid/grid_frequency.vue"; import { stateDispatcher } from "../js/eventHandler"; let count = ref(0); @@ -58,7 +64,7 @@ const gridWidgets = [ ), new gridWidget( active_stats, - { x: 16, y: 15, w: 8, h: 69 }, + { x: 16, y: 17, w: 8, h: 80 }, "Stats (waterfall, etc)", true, true, @@ -68,7 +74,7 @@ const gridWidgets = [ active_audio_level, { x: 16, y: 0, w: 8, h: 15 }, "Audio main", - true, + false, true, "Audio", ), @@ -76,7 +82,7 @@ const gridWidgets = [ active_rig_control, { x: 6, y: 40, w: 9, h: 15 }, "Rig control main", - true, + false, true, "Rig", ), @@ -84,7 +90,7 @@ const gridWidgets = [ active_broadcasts, { x: 6, y: 70, w: 6, h: 15 }, "Broadcasts main (horizontal)", - true, + false, true, "Broadcasts", ), @@ -98,17 +104,17 @@ const gridWidgets = [ ), new gridWidget( s_meter, - { x: 1, y: 1, w: 4, h: 8 }, + { x: 16, y: 0, w: 4, h: 8 }, "S-Meter", - false, + true, true, "Rig", ), new gridWidget( dbfs_meter, - { x: 1, y: 1, w: 4, h: 8 }, + { x: 20, y: 0, w: 4, h: 8 }, "Dbfs Meter", - false, + true, true, "Audio", ), @@ -122,21 +128,63 @@ const gridWidgets = [ ), new gridWidget( active_broadcasts_vert, - { x: 3, y: 27, w: 3, h: 27 }, + { x: 9, y: 55, w: 3, h: 27 }, "Broadcasts main (vertical)", - false, + true, true, "Broadcasts", ), new gridWidget( grid_ptt, + { x: 17, y: 8, w: 2, h: 8 }, + "Tx/PTT indicator", + true, + true, + "Rig", + ), + new gridWidget( + grid_mycall, + { x: 0, y: 95, w: 4, h: 9 }, + "My callsign widget", + true, + true, + "Other", + ), + new gridWidget( + grid_CQ_btn, { x: 3, y: 27, w: 2, h: 8 }, - "PTT indicator", + "CQ Button", false, true, + "Broadcasts", + ), + new gridWidget( + grid_ping, + { x: 3, y: 27, w: 4, h: 9 }, + "Ping Widget", + false, + true, + "Broadcasts", + ), + new gridWidget( + grid_freq, + { x: 20, y: 8, w: 4, h: 9 }, + "Frequency widget", + true, + true, "Rig", ), ]; + +function updateFrequencyAndApply(frequency) { + state.new_frequency = frequency; + setModemFrequency(state.new_frequency); +} + +function set_hamlib_frequency_manually() { + setModemFrequency(state.new_frequency); +} + onMounted(() => { grid = GridStack.init({ // DO NOT use grid.value = GridStack.init(), see above @@ -180,6 +228,9 @@ onMounted(() => { break; case "Broadcasts": dom = document.getElementById("bcBody"); + break; + case "Other": + break; default: console.error("Unknown widget category: " + gw.category); @@ -412,7 +463,7 @@ function quickfill() { aria-expanded="false" aria-controls="collapseRadioControl" > - Radio Control + Radio Control/Status
+ +
+
+
Frequency selection
+ + + + +
+
+

+ Commonly used frequencies are listed here, and are all USB.  Simply click on a entry or manually enter a frequency in the textbox to tune your rig if rig control is enabled. +

+ +
+
+