node-raspberrypi-usbboot
Advanced tools
Comparing version 1.0.4 to 1.0.5-build-mcraa-win-cm4-ce7b5fedeecfa6646d575d90e79f998a73eaf929-1
@@ -8,2 +8,3 @@ /// <reference types="node" /> | ||
private _step; | ||
last_serial: number; | ||
constructor(portId: string); | ||
@@ -10,0 +11,0 @@ get progress(): number; |
@@ -112,3 +112,3 @@ "use strict"; | ||
// Delay in ms after which we consider that the device was unplugged (not resetted) | ||
const DEVICE_UNPLUG_TIMEOUT = 5000; | ||
const DEVICE_UNPLUG_TIMEOUT = 50000; | ||
// Delay (in ms) to wait when epRead throws an error | ||
@@ -319,2 +319,3 @@ const READ_ERROR_DELAY = 100; | ||
this._step = 0; | ||
this.last_serial = -1; | ||
} | ||
@@ -398,2 +399,3 @@ get progress() { | ||
usbbootDevice.step = step; | ||
usbbootDevice.last_serial = device.deviceDescriptor.iSerialNumber; | ||
if (step === usbbootDevice.LAST_STEP) { | ||
@@ -434,2 +436,8 @@ this.remove(device); | ||
const usbbootDevice = this.get(device); | ||
let forceSecondstage = false; | ||
if (device.deviceDescriptor.iSerialNumber == (usbbootDevice === null || usbbootDevice === void 0 ? void 0 : usbbootDevice.last_serial)) { | ||
if (device.deviceDescriptor.idProduct == 10001) { | ||
forceSecondstage = true; | ||
} | ||
} | ||
if ((isRaspberryPiInMassStorageMode(device) || | ||
@@ -444,3 +452,3 @@ isComputeModule4InMassStorageMode(device)) && | ||
} | ||
debug('Found serial number', device.deviceDescriptor.iSerialNumber); | ||
debug('Found serial number', device.deviceDescriptor.iSerialNumber, `forceSecondStage: ${forceSecondstage}`); | ||
debug('port id', devicePortId(device)); | ||
@@ -450,4 +458,4 @@ try { | ||
// cm: 0; cm4: 3 | ||
if (device.deviceDescriptor.iSerialNumber === 0 || | ||
device.deviceDescriptor.iSerialNumber === 3) { | ||
if ((device.deviceDescriptor.iSerialNumber === 0 || | ||
device.deviceDescriptor.iSerialNumber === 3) && !forceSecondstage) { | ||
debug('Sending bootcode.bin', devicePortId(device)); | ||
@@ -454,0 +462,0 @@ this.step(device, 0); |
@@ -7,4 +7,9 @@ # Change Log | ||
# v1.0.5 | ||
## (2023-01-09) | ||
* patch: WIP force second stage [Peter Makra] | ||
# v1.0.4 | ||
## (2022-10-20) | ||
## (2022-10-21) | ||
@@ -11,0 +16,0 @@ * switch from concourse to flowzone [Zane Hitchcox] |
{ | ||
"name": "node-raspberrypi-usbboot", | ||
"version": "1.0.4", | ||
"version": "1.0.5-build-mcraa-win-cm4-ce7b5fedeecfa6646d575d90e79f998a73eaf929-1", | ||
"description": "Transforms Raspberry Pi Compute Modules and Zeros to mass storage devices.", | ||
@@ -42,4 +42,4 @@ "main": "build/index.js", | ||
"versionist": { | ||
"publishedAt": "2022-10-20T13:32:13.650Z" | ||
"publishedAt": "2023-01-09T21:53:11.794Z" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28077861
587
2