show flashing errors
This commit is contained in:
10
index.html
10
index.html
@@ -112,9 +112,12 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// flash file
|
||||
// update progress
|
||||
this.isFlashing = true;
|
||||
this.progress = 0;
|
||||
|
||||
// flash file
|
||||
try {
|
||||
const flasher = new Nrf52DfuFlasher(serialPort);
|
||||
await flasher.flash(file, (percentage) => {
|
||||
this.progress = percentage;
|
||||
@@ -123,6 +126,11 @@
|
||||
alert("Firmware has been flashed!");
|
||||
}
|
||||
});
|
||||
} catch(e) {
|
||||
this.isFlashing = false;
|
||||
alert("Firmware flashing failed: " + e);
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
},
|
||||
async detect() {
|
||||
|
||||
Reference in New Issue
Block a user