Add scripts for getting/setting firmware variables (#734)

This commit is contained in:
Eric Tang
2018-07-22 16:07:21 +02:00
committed by László Monda
parent e7cf8dc966
commit ac89aff018
3 changed files with 29 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env node
const uhk = require('./uhk');
const device = uhk.getUhkDevice();
const sendData = new Buffer([uhk.usbCommands.getVariable, +process.argv[2]]);
console.log(sendData);
device.write(uhk.getTransferData(sendData));
const receivedBuffer = Buffer.from(device.readSync());
console.log(receivedBuffer[1]);