support flrig over XMLRPC

This commit is contained in:
2023-03-01 19:28:02 +01:00
parent 4ac28c7778
commit 352174cd83
5 changed files with 403 additions and 8 deletions

14
providers/flrig.js Normal file
View File

@@ -0,0 +1,14 @@
import { XmlRpcClient } from "@foxglove/xmlrpc";
export default function flrig() {
const client = new XmlRpcClient(`http://127.0.0.1:12345`);
return {
pttDown: () => {
client.methodCall('rig.set_ptt', [1]);
},
pttUp: () => {
client.methodCall('rig.set_ptt', [0]);
}
};
};

12
providers/mhuxd.js Normal file
View File

@@ -0,0 +1,12 @@
import { spawn } from 'child_process';
export default function() {
return {
pttDown: () => {
spawn('/home/omega/Documents/ts3_remote/ptt_daemon', ['/dev/mhuxd/fsk1', '1']);
},
pttUp: () => {
spawn('/home/omega/Documents/ts3_remote/ptt_daemon', ['/dev/mhuxd/fsk1', '0']);
}
};
};