mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 17:03:42 +00:00
feat: add suspense logs in serial console
This commit is contained in:
@@ -117,6 +117,13 @@ export class CharaDevice {
|
|||||||
})
|
})
|
||||||
this.reader.releaseLock()
|
this.reader.releaseLock()
|
||||||
await this.port.close()
|
await this.port.close()
|
||||||
|
serialLog.update(it => {
|
||||||
|
it.push({
|
||||||
|
type: "system",
|
||||||
|
value: "Connection suspended",
|
||||||
|
})
|
||||||
|
return it
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private async wake() {
|
private async wake() {
|
||||||
@@ -131,6 +138,13 @@ export class CharaDevice {
|
|||||||
signal: this.abortController2.signal,
|
signal: this.abortController2.signal,
|
||||||
})
|
})
|
||||||
.getReader()
|
.getReader()
|
||||||
|
serialLog.update(it => {
|
||||||
|
it.push({
|
||||||
|
type: "system",
|
||||||
|
value: "Connection resumed",
|
||||||
|
})
|
||||||
|
return it
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private async internalRead() {
|
private async internalRead() {
|
||||||
|
|||||||
Reference in New Issue
Block a user