Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	gui/src/js/event_sock.js
This commit is contained in:
DJ2LS 2023-11-09 17:14:44 +01:00
commit 3ae0fc5b42
3 changed files with 280 additions and 303 deletions

View file

@ -19,9 +19,8 @@ const stateStore = useStateStore(pinia);
import { useSettingsStore } from "../store/settingsStore.js"; import { useSettingsStore } from "../store/settingsStore.js";
const settings = useSettingsStore(pinia); const settings = useSettingsStore(pinia);
export function eventDispatcher(data) { export function eventDispatcher(data) {
console.log(data) console.log(data);
if (data["command"] == "modem_state") { if (data["command"] == "modem_state") {
//console.log(data) //console.log(data)
@ -104,8 +103,7 @@ if (data["command"] == "modem_state") {
stateStore.arq_state = data["arq_state"]; stateStore.arq_state = data["arq_state"];
stateStore.arq_transmission_percent = data["arq_transmission_percent"]; stateStore.arq_transmission_percent = data["arq_transmission_percent"];
stateStore.arq_seconds_until_finish = data["arq_seconds_until_finish"]; stateStore.arq_seconds_until_finish = data["arq_seconds_until_finish"];
stateStore.arq_seconds_until_timeout = stateStore.arq_seconds_until_timeout = data["arq_seconds_until_timeout"];
data["arq_seconds_until_timeout"];
stateStore.arq_seconds_until_timeout_percent = stateStore.arq_seconds_until_timeout_percent =
(stateStore.arq_seconds_until_timeout / 180) * 100; (stateStore.arq_seconds_until_timeout / 180) * 100;
@ -139,18 +137,13 @@ if (data["command"] == "modem_state") {
//speed_table: [{"bpm" : 5200, "snr": -3, "timestamp":1673555399},{"bpm" : 2315, "snr": 12, "timestamp":1673555500}], //speed_table: [{"bpm" : 5200, "snr": -3, "timestamp":1673555399},{"bpm" : 2315, "snr": 12, "timestamp":1673555500}],
}; };
*/ */
} }
var message = ""; var message = "";
if (data["freedata"] == "modem-message") { if (data["freedata"] == "modem-message") {
// break early if we received a dummy callsign // break early if we received a dummy callsign
// thats a kind of hotfix, as long as the modem isnt handling this better // thats a kind of hotfix, as long as the modem isnt handling this better
if ( if (data["dxcallsign"] == "AA0AA-0" || data["dxcallsign"] == "ZZ9YY-0") {
data["dxcallsign"] == "AA0AA-0" ||
data["dxcallsign"] == "ZZ9YY-0"
) {
return; return;
} }
@ -176,12 +169,7 @@ if (data["command"] == "modem_state") {
switch (data["cq"]) { switch (data["cq"]) {
case "transmitting": case "transmitting":
// CQ TRANSMITTING // CQ TRANSMITTING
displayToast( displayToast("success", "bi-arrow-left-right", "Transmitting CQ", 5000);
"success",
"bi-arrow-left-right",
"Transmitting CQ",
5000,
);
break; break;
case "received": case "received":
@ -224,8 +212,7 @@ if (data["command"] == "modem_state") {
// BEACON RECEIVED // BEACON RECEIVED
newBeaconReceived(data); newBeaconReceived(data);
message = message = "Beacon from " + data["dxcallsign"] + " | " + data["dxgrid"];
"Beacon from " + data["dxcallsign"] + " | " + data["dxgrid"];
displayToast("info", "bi-broadcast", message, 5000); displayToast("info", "bi-broadcast", message, 5000);
break; break;
} }
@ -240,10 +227,7 @@ if (data["command"] == "modem_state") {
case "received": case "received":
// PING RECEIVED // PING RECEIVED
message = message =
"Ping request from " + "Ping request from " + data["dxcallsign"] + " | " + data["dxgrid"];
data["dxcallsign"] +
" | " +
data["dxgrid"];
displayToast("success", "bi-arrow-right-short", message, 5000); displayToast("success", "bi-arrow-right-short", message, 5000);
break; break;
@ -372,7 +356,4 @@ if (data["command"] == "modem_state") {
} }
} }
} }
} }

View file

@ -9,8 +9,6 @@ import {
getModemConfigAsJSON, getModemConfigAsJSON,
} from "../js/settingsHandler.ts"; } from "../js/settingsHandler.ts";
export async function getFromServer(host, port, endpoint) { export async function getFromServer(host, port, endpoint) {
// our central function for fetching the modems REST API by a specific endpoint // our central function for fetching the modems REST API by a specific endpoint
// TODO make this function using the host and port, specified in settings // TODO make this function using the host and port, specified in settings

View file

@ -733,8 +733,6 @@ export function getRxBuffer() {
writeTncCommand(command); writeTncCommand(command);
} }
// OPEN ARQ SESSION // OPEN ARQ SESSION
export function connectARQ(dxcallsign) { export function connectARQ(dxcallsign) {
var command = var command =