fixed missing speed level

This commit is contained in:
DJ2LS 2024-05-11 10:43:14 +02:00
parent 51fdab8625
commit f10a6b0d7f
3 changed files with 12 additions and 4 deletions

View file

@ -170,6 +170,10 @@ export function eventDispatcher(data) {
case "arq":
if (data["arq-transfer-outbound"]) {
stateStore.arq_is_receiving = false;
console.log(data)
switch (data["arq-transfer-outbound"].state) {
case "NEW":
message = `Type: ${data.type}, Session ID: ${data["arq-transfer-outbound"].session_id}, DXCall: ${data["arq-transfer-outbound"].dxcall}, Total Bytes: ${data["arq-transfer-outbound"].total_bytes}, State: ${data["arq-transfer-outbound"].state}`;
@ -205,6 +209,7 @@ export function eventDispatcher(data) {
data["arq-transfer-outbound"].statistics.snr_histogram,
);
//console.log(toRaw(stateStore.arq_speed_list_timestamp.value));
stateStore.speed_level = data["arq-transfer-outbound"].speed_level;
return;
case "ABORTING":
@ -240,6 +245,7 @@ export function eventDispatcher(data) {
}
if (data["arq-transfer-inbound"]) {
stateStore.arq_is_receiving = true;
switch (data["arq-transfer-inbound"].state) {
case "NEW":
message = `Type: ${data.type}, Session ID: ${data["arq-transfer-inbound"].session_id}, DXCall: ${data["arq-transfer-inbound"].dxcall}, State: ${data["arq-transfer-inbound"].state}`;
@ -296,9 +302,7 @@ export function eventDispatcher(data) {
stateStore.arq_speed_list_snr.value = toRaw(
data["arq-transfer-inbound"].statistics.snr_histogram,
);
console.log(stateStore.arq_speed_list_timestamp.value);
console.log(stateStore.arq_speed_list_bpm.value);
console.log(stateStore.arq_speed_list_snr.value);
stateStore.speed_level = data["arq-transfer-inbound"].speed_level;
return;
case "ENDED":

View file

@ -58,6 +58,8 @@ export const useStateStore = defineStore("stateStore", () => {
var arq_speed_list_bpm = ref([]);
var arq_speed_list_snr = ref([]);
var arq_is_receiving = ref(false)
/* TODO Those 3 can be removed I guess , DJ2LS*/
var arq_seconds_until_finish = ref();
var arq_seconds_until_timeout = ref();
@ -115,6 +117,7 @@ export const useStateStore = defineStore("stateStore", () => {
arq_seconds_until_finish,
arq_seconds_until_timeout,
arq_seconds_until_timeout_percent,
arq_is_receiving,
modem_connection,
is_modem_running,
arq_session_state,

View file

@ -44,7 +44,7 @@ class EventManager:
}
self.broadcast(event)
def send_arq_session_progress(self, outbound: bool, session_id, dxcall, received_bytes, total_bytes, state, statistics=None):
def send_arq_session_progress(self, outbound: bool, session_id, dxcall, received_bytes, total_bytes, state, speed_level, statistics=None):
if statistics is None:
statistics = {}
@ -57,6 +57,7 @@ class EventManager:
'received_bytes': received_bytes,
'total_bytes': total_bytes,
'state': state,
'speed_level': speed_level,
'statistics': statistics,
}
}