14 lines
341 B
JavaScript
14 lines
341 B
JavaScript
|
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]);
|
||
|
}
|
||
|
};
|
||
|
};
|