support flrig over XMLRPC
This commit is contained in:
14
providers/flrig.js
Normal file
14
providers/flrig.js
Normal 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
12
providers/mhuxd.js
Normal 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']);
|
||||
}
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user