feat: new connection flow

This commit is contained in:
2023-07-23 17:44:26 +02:00
parent 998a400395
commit 4cc3343984
9 changed files with 221 additions and 96 deletions

View File

@@ -25,9 +25,9 @@ export const syncStatus: Writable<"done" | "error" | "downloading" | "uploading"
let device: CharaDevice // @hmr:keep
export async function initSerial() {
export async function initSerial(manual = false) {
const device = get(serialPort) ?? new CharaDevice()
await device.ready()
await device.init(manual)
serialPort.set(device)
syncStatus.set("downloading")