mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-07 02:22:52 +00:00
feat: auto-reconnect after reboot
This commit is contained in:
@@ -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...
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
$serialPort?.reboot()
|
$serialPort?.reboot()
|
||||||
$serialPort = undefined
|
$serialPort = undefined
|
||||||
powerDialog = false
|
powerDialog = false
|
||||||
|
setTimeout(() => {
|
||||||
|
initSerial()
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
function bootloader() {
|
function bootloader() {
|
||||||
|
|||||||
Reference in New Issue
Block a user