node-raspberrypi-usbboot
Advanced tools
Comparing version 1.0.4 to 1.0.5-build-mcraa-win-cm4-9fef1aa279b71ca9d7e6945a51b65e7e049757ac-1
@@ -8,2 +8,3 @@ /// <reference types="node" /> | ||
private _step; | ||
last_serial: number; | ||
constructor(portId: string); | ||
@@ -10,0 +11,0 @@ get progress(): number; |
@@ -318,2 +318,3 @@ "use strict"; | ||
this._step = 0; | ||
this.last_serial = -1; | ||
} | ||
@@ -397,2 +398,3 @@ get progress() { | ||
usbbootDevice.step = step; | ||
usbbootDevice.last_serial = device.deviceDescriptor.iSerialNumber; | ||
if (step === usbbootDevice.LAST_STEP) { | ||
@@ -433,2 +435,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 (usbbootDevice.step > 0) { | ||
forceSecondstage = true; | ||
} | ||
} | ||
if ((isRaspberryPiInMassStorageMode(device) || | ||
@@ -443,3 +451,3 @@ isComputeModule4InMassStorageMode(device)) && | ||
} | ||
debug('Found serial number', device.deviceDescriptor.iSerialNumber); | ||
debug('Found serial number', device.deviceDescriptor.iSerialNumber, `${forceSecondstage ? " => Forced second stage" : ""}`); | ||
debug('port id', devicePortId(device)); | ||
@@ -449,4 +457,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)); | ||
@@ -453,0 +461,0 @@ this.step(device, 0); |
@@ -7,4 +7,10 @@ # Change Log | ||
# v1.0.5 | ||
## (2023-01-10) | ||
* patch: removed device filtering from iSerial check [Peter Makra] | ||
* patch: WIP force second stage [Peter Makra] | ||
# v1.0.4 | ||
## (2022-10-20) | ||
## (2022-10-21) | ||
@@ -11,0 +17,0 @@ * switch from concourse to flowzone [Zane Hitchcox] |
{ | ||
"name": "node-raspberrypi-usbboot", | ||
"version": "1.0.4", | ||
"version": "1.0.5-build-mcraa-win-cm4-9fef1aa279b71ca9d7e6945a51b65e7e049757ac-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-10T12:27:50.826Z" | ||
} | ||
} |
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
28077950
587
2