Add script to test hidapi stability by using readSync() calls.

This commit is contained in:
László Monda
2017-10-31 20:08:33 +01:00
parent 5318b2a2e1
commit 3f78cc1340

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env node
const uhk = require('./uhk');
const device = uhk.getUhkDevice();
let counter = 1;
while (true) {
console.log(`hidapi sync test ${counter++}`);
const sendData = new Buffer([uhk.usbCommands.getProperty, uhk.systemPropertyIds.hardwareConfigSize]);
device.write(uhk.getTransferData(sendData));
device.readSync()
}