mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 10:04:33 +02:00
30 lines
621 B
JavaScript
30 lines
621 B
JavaScript
import { getModemConfigAsJSON } from "./settingsHandler.ts";
|
|
import { getFromServer, postToServer } from "./rest.js";
|
|
|
|
|
|
|
|
export function getModemConfig(){
|
|
|
|
// fetch Settings
|
|
getFromServer("localhost", 5000, "config");
|
|
getFromServer("localhost", 5000, "devices/audio");
|
|
getFromServer("localhost", 5000, "devices/serial");
|
|
|
|
}
|
|
|
|
|
|
export function saveModemConfig(){
|
|
postToServer("localhost", 5000, "config", getModemConfigAsJSON());
|
|
|
|
}
|
|
|
|
export function startModem() {
|
|
postToServer("localhost", 5000, "modem/start", null);
|
|
|
|
}
|
|
|
|
export function stopModem() {
|
|
postToServer("localhost", 5000, "modem/stop", null);
|
|
|
|
}
|