Use uhk.writeDevice() in jump-to-module-bootloader.js
This commit is contained in:
@@ -9,6 +9,7 @@ program
|
|||||||
const moduleSlot = program.args[0];
|
const moduleSlot = program.args[0];
|
||||||
const moduleSlotId = uhk.checkModuleSlot(moduleSlot, uhk.moduleSlotToId);
|
const moduleSlotId = uhk.checkModuleSlot(moduleSlot, uhk.moduleSlotToId);
|
||||||
const device = uhk.getUhkDevice();
|
const device = uhk.getUhkDevice();
|
||||||
let transfer = new Buffer([uhk.usbCommands.jumpToModuleBootloader, moduleSlotId]);
|
|
||||||
device.write(uhk.getTransferData(transfer));
|
(async function() {
|
||||||
const response = Buffer.from(device.readSync());
|
await uhk.writeDevice(device, [uhk.usbCommands.jumpToModuleBootloader, moduleSlotId]);
|
||||||
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user