From a6630234d86229099723cc81a6f478014b7d7c37 Mon Sep 17 00:00:00 2001 From: Mashintime Date: Sun, 3 Dec 2023 11:49:56 -0500 Subject: [PATCH] Activities in GUI --- .../components/main_active_heard_stations.vue | 21 ++++++++++--------- gui/src/js/eventHandler.js | 1 + gui/src/store/stateStore.js | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/gui/src/components/main_active_heard_stations.vue b/gui/src/components/main_active_heard_stations.vue index 8577d3dc..dbcef77d 100644 --- a/gui/src/components/main_active_heard_stations.vue +++ b/gui/src/components/main_active_heard_stations.vue @@ -29,9 +29,10 @@ function getDateTime(timestampRaw) { function getMaidenheadDistance(dxGrid) { try { - return parseInt(distance(settings.mygrid, dxGrid)); + + return parseInt(distance(settings.remote.STATION.mygrid, dxGrid)); } catch (e) { - // + console.warn(e); } } @@ -81,33 +82,33 @@ function getMaidenheadDistance(dxGrid) { - + {{ - getDateTime(item.timestamp) + getDateTime(item[1].timestamp) }} {{ item.frequency / 1000 }} kHz{{ item[1].frequency / 1000 }} kHz - {{ item.dxcallsign }} + {{ item[1].origin }} - {{ item.dxgrid }} + {{ item[1].gridsquare }} {{ getMaidenheadDistance(item.dxgrid) }} km{{ getMaidenheadDistance(item[1].gridsquare) }} km - {{ item.datatype }} + {{ item[1].activity_type }} - {{ item.snr }} + {{ item[1].snr }} diff --git a/gui/src/js/eventHandler.js b/gui/src/js/eventHandler.js index cd8f1148..84b7f051 100644 --- a/gui/src/js/eventHandler.js +++ b/gui/src/js/eventHandler.js @@ -43,6 +43,7 @@ export function stateDispatcher(data) { stateStore.radio_status = data["radio_status"]; stateStore.frequency = data["radio_frequency"]; stateStore.mode = data["radio_mode"]; + stateStore.activities = Object.entries(data["activities"]).reverse(); /* self.is_arq_state = False self.is_arq_session = False diff --git a/gui/src/store/stateStore.js b/gui/src/store/stateStore.js index b72ddf69..7f339cb5 100644 --- a/gui/src/store/stateStore.js +++ b/gui/src/store/stateStore.js @@ -31,7 +31,7 @@ export const useStateStore = defineStore("stateStore", () => { var arq_total_bytes = ref(0); var arq_transmission_percent = ref(0); - var heard_stations = ref(""); + var activities = ref([]); var dxcallsign = ref(""); var arq_session_state = ref(""); @@ -113,7 +113,7 @@ export const useStateStore = defineStore("stateStore", () => { arq_session_state, is_codec2_traffic, rf_level, - heard_stations, + activities, beacon_state, rigctld_started, rigctld_process,