12 lines
290 B
JavaScript
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']);
|
|
}
|
|
};
|
|
}; |