Make apply-config.js and get-module-state.js use read() instead of readSync()
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
#!/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);
|
||||
(async function() {
|
||||
const device = uhk.getUhkDevice();
|
||||
uhk.applyConfig(device);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user