Skip to content

Commit

Permalink
fix: added sleep before reconnecting to neuron to avoid Win issues
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Parcet Gonzalez <[email protected]>
  • Loading branch information
alexpargon committed Nov 20, 2024
1 parent e8f257e commit 58b3e6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/api/flash/defyFlasher/sideFlasher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default class SideFlaser {
const seal = recoverSeal(this.firmwareSides.slice(0, 28));
// log.info("This is the seal from the FW file");
// eslint-disable-next-line no-console
console.info("This is the seal from the Neuron");
console.info("This is the seal from the FW File");
// eslint-disable-next-line no-console
console.table(seal);

Expand Down Expand Up @@ -152,6 +152,7 @@ export default class SideFlaser {
}
if (selectedDev === undefined) throw new Error("Flashable device not found");
log.info("Found this device:", selectedDev);
await delay(1000);

this.serialport = new SerialPort({
path: selectedDev?.path,
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/controller/FlashingProcedure/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ const restoreSettings = async (
try {
let device: Device | undefined;
const list = (await DeviceTools.list()) as Device[];
log.info(list);
log.info("Found these devices", list);
await delay(1000);

const selected = list.find(x => parseInt(x.productId, 16) === context.originalDevice?.device?.usb.productId);
if (selected !== undefined) device = await DeviceTools.connect(selected);
for (let i = 0; i < backup.backup.length; i += 1) {
Expand Down

0 comments on commit 58b3e6f

Please sign in to comment.