fix: handle Connect/Disconnect failure state
This commit is contained in:
parent
d80ae7de1b
commit
0e87e6608f
1 changed files with 2 additions and 0 deletions
|
|
@ -546,6 +546,7 @@ new Vue({
|
||||||
|
|
||||||
this.serial.writer = textEncoder.writable.getWriter()
|
this.serial.writer = textEncoder.writable.getWriter()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
this.serial.selectedPort = null
|
||||||
this.$q.notify({
|
this.$q.notify({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: 'Cannot open serial port!',
|
message: 'Cannot open serial port!',
|
||||||
|
|
@ -573,6 +574,7 @@ new Vue({
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
this.serial.selectedPort = null
|
||||||
console.log('### error', error)
|
console.log('### error', error)
|
||||||
this.$q.notify({
|
this.$q.notify({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue