[CodeFactor] Apply fixes to commit 8f6ea4a

This commit is contained in:
codefactor-io 2024-04-26 13:15:49 +00:00
parent 8f6ea4ab3e
commit 877b4fea01
No known key found for this signature in database
GPG key ID: B66B2D63282C190F
2 changed files with 2 additions and 7 deletions

View file

@ -62,7 +62,6 @@ export function stateDispatcher(data) {
Math.pow(10, data["audio_dbfs"] / 20) * 100,
);
stateStore.channel_busy_slot = data["channel_busy_slot"];
stateStore.beacon_state = data["is_beacon_running"];
@ -74,20 +73,16 @@ export function stateDispatcher(data) {
}
if (data["type"] == "state-change" && data["type"] == "radio") {
stateStore.s_meter_strength_raw = Math.round(data["s_meter_strength"]);
stateStore.s_meter_strength_percent = Math.round(
Math.pow(10, data["s_meter_strength"] / 20) * 100,
);
stateStore.radio_status = data["radio_status"];
stateStore.frequency = data["radio_frequency"];
stateStore.mode = data["radio_mode"];
stateStore.swr = data["radio_swr"];
stateStore.tuner = data["radio_tuner"];
}
}

View file

@ -11,8 +11,8 @@ export const useStateStore = defineStore("stateStore", () => {
var rf_level = ref("10");
var bandwidth = ref("-");
var swr = ref(0)
var tuner = ref("-")
var swr = ref(0);
var tuner = ref("-");
var dbfs_level_percent = ref(0);
var dbfs_level = ref(0);