Don't dump transfered payloads in jump-to-{slave-}bootloader.js

This commit is contained in:
László Monda
2017-10-21 03:09:47 +02:00
parent 7c7fde6d30
commit ce91d88448
3 changed files with 1 additions and 5 deletions

View File

@@ -6,7 +6,6 @@ let pollingIntervalMs = 100;
let bootloaderTimeoutMs = 5000;
let jumped = false;
console.log(process.argv[2])
let enumerationMode = process.argv[2] === 'buspal' ? uhk.enumerationModes.busPal : uhk.enumerationModes.bootloader;
console.log('Trying to jump to the bootloader...');
@@ -30,7 +29,6 @@ setInterval(() => {
console.log('UHK found, jumping to bootloader');
let t = bootloaderTimeoutMs;
let message = new Buffer([uhk.usbCommands.jumpToBootloader, enumerationMode, t&0xff, (t&0xff<<8)>>8, (t&0xff<<16)>>16, (t&0xff<<24)>>24]);
console.log(message);
device.write(uhk.getTransferData(message));
jumped = true;

View File

@@ -3,7 +3,5 @@ const uhk = require('./uhk');
const device = uhk.getUhkDevice();
let transfer = new Buffer([uhk.usbCommands.jumpToSlaveBootloader, 0]);
console.log(transfer);
device.write(uhk.getTransferData(transfer));
const response = Buffer.from(device.readSync());
console.log(response);

View File

@@ -8,7 +8,7 @@ function readDebugInfo() {
device.write(uhk.getTransferData(payload));
const receivedBuffer = Buffer.from(device.readSync());
console.log('Received', uhk.bufferToString(receivedBuffer));
setTimeout(readDebugInfo, 500)
setTimeout(readDebugInfo, 500);
}
readDebugInfo();