Skip to content

Commit

Permalink
Add software reset to serial state change queue
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-grace committed Aug 5, 2024
1 parent 40e01fb commit 5360180
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/usb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ export class MicrobitWebUSBConnection
}

async softwareReset(): Promise<void> {
await this.connection?.softwareReset();
return this.serialStateChangeQueue.add(
async () => await this.connection?.softwareReset(),
);
}

private handleDisconnect = (event: USBConnectionEvent) => {
Expand Down

0 comments on commit 5360180

Please sign in to comment.