feat: auto-reconnect after reboot

This commit is contained in:
2023-12-12 18:37:40 +01:00
parent d98653995b
commit c8e04ed6cc
2 changed files with 3 additions and 2 deletions

View File

@@ -289,7 +289,6 @@ export class CharaDevice {
*/ */
async reboot() { async reboot() {
await this.send("RST") await this.send("RST")
// TODO: reconnect
} }
/** /**
@@ -297,7 +296,6 @@ export class CharaDevice {
*/ */
async bootloader() { async bootloader() {
await this.send("RST BOOTLOADER") await this.send("RST BOOTLOADER")
// TODO: more...
} }
/** /**

View File

@@ -9,6 +9,9 @@
$serialPort?.reboot() $serialPort?.reboot()
$serialPort = undefined $serialPort = undefined
powerDialog = false powerDialog = false
setTimeout(() => {
initSerial()
}, 1000)
} }
function bootloader() { function bootloader() {