Slightly tweak USB command names.

This commit is contained in:
László Monda
2017-11-08 23:13:03 +01:00
parent 6ba6ad543e
commit f9e1d022f2
6 changed files with 14 additions and 14 deletions

View File

@@ -2,13 +2,13 @@
const uhk = require('./uhk');
const device = uhk.getUhkDevice();
function readDebugInfo() {
function getDebugInfo() {
const payload = new Buffer([uhk.usbCommands.readDebugInfo]);
console.log('Sending ', uhk.bufferToString(payload));
device.write(uhk.getTransferData(payload));
const receivedBuffer = Buffer.from(device.readSync());
console.log('Received', uhk.bufferToString(receivedBuffer));
setTimeout(readDebugInfo, 500);
setTimeout(getDebugInfo, 500);
}
readDebugInfo();
getDebugInfo();