feat: add suspense logs in serial console

This commit is contained in:
2024-03-05 18:14:49 +01:00
parent 6ac2cd1993
commit dfd1c0bcbd

View File

@@ -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() {