ts3_remote_ham/providers/serial.js
2024-09-12 02:00:26 +02:00

12 lines
290 B
JavaScript

import { spawn } from 'child_process';
export default function serial(opts) {
return {
pttDown: () => {
spawn('./ptt_daemon', [opts.serial.port, '1']);
},
pttUp: () => {
spawn('./ptt_daemon', [opts.serial.port, '0']);
}
};
};