Add script.

This commit is contained in:
László Monda
2017-10-05 02:46:49 +02:00
parent 0ad261e7fd
commit 15a56659b6

8
packages/usb/apply-config.js Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env node
const uhk = require('./uhk');
const device = uhk.getUhkDevice();
const sendData = new Buffer([uhk.usbCommands.applyConfig]);
device.write(uhk.getTransferData(sendData));
const response = Buffer.from(device.readSync());
console.log(response);