FreeDATA/gui/src/js/radioHandler.ts

20 lines
565 B
TypeScript
Raw Normal View History

2024-02-20 09:05:13 +00:00
// pinia store setup
import { setActivePinia } from "pinia";
import pinia from "../store/index";
setActivePinia(pinia);
import { settingsStore as settings, onChange } from "../store/settingsStore.js";
import { useStateStore } from "../store/stateStore";
const stateStore = useStateStore(pinia);
import {
getRadioStatus,
} from "./api";
export async function processRadioStatus(){
let result = await getRadioStatus()
stateStore.mode = result.radio_mode
stateStore.frequency = result.radio_frequency
stateStore.rf_level = result.radio_rf_level
}