Extract sendKbootCommandToModule() from send-kboot-command-to-module.js to uhk.js
This commit is contained in:
@@ -33,6 +33,6 @@ if (kbootCommand !== 'idle') {
|
||||
}
|
||||
|
||||
const device = uhk.getUhkDevice();
|
||||
let transfer = new Buffer([uhk.usbCommands.sendKbootCommandToModule, kbootCommandId, parseInt(i2cAddress)]);
|
||||
device.write(uhk.getTransferData(transfer));
|
||||
const response = Buffer.from(device.readSync());
|
||||
(async function() {
|
||||
await uhk.sendKbootCommandToModule(device, kbootCommandId, i2cAddress);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user