Skip to content

Commit

Permalink
Merge branch 'beta' into beta_dupe_serial_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
makermelissa authored Aug 28, 2024
2 parents dc21368 + eddc427 commit 4ed7133
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions js/workflows/usb.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class USBWorkflow extends Workflow {
this._uid = null;
this._readLoopPromise = null;
this._messageCallback = null;
this._btnSelectHostFolderCallback = null;
this._btnUseHostFolderCallback = null;
}

async init(params) {
Expand Down Expand Up @@ -164,11 +166,18 @@ class USBWorkflow extends Workflow {
btnRequestSerialDevice.removeEventListener('click', serialConnect);
btnRequestSerialDevice.addEventListener('click', serialConnect);

btnSelectHostFolder.removeEventListener('click', this._selectHostFolder);
btnSelectHostFolder.addEventListener('click', this._selectHostFolder);
btnSelectHostFolder.removeEventListener('click', this._btnSelectHostFolderCallback)
this._btnSelectHostFolderCallback = async (event) => {
await this._selectHostFolder();
};
btnSelectHostFolder.addEventListener('click', this._btnSelectHostFolderCallback);


btnUseHostFolder.removeEventListener('click', this._useHostFolder);
btnUseHostFolder.addEventListener('click', this._useHostFolder);
btnUseHostFolder.removeEventListener('click', this._btnUseHostFolderCallback);
this._btnUseHostFolderCallback = async (event) => {
await this._useHostFolder();
}
btnUseHostFolder.addEventListener('click', this._btnUseHostFolderCallback);

// Check if WebSerial is available
if (!(await this.available() instanceof Error)) {
Expand Down

0 comments on commit 4ed7133

Please sign in to comment.