feat: improve UF2 flow

This commit is contained in:
2024-11-03 14:39:35 +01:00
parent 06d122b5d6
commit b4605fe84d
11 changed files with 323 additions and 104 deletions

View File

@@ -53,11 +53,13 @@ export interface ProgressInfo {
}
export const syncProgress = writable<ProgressInfo | undefined>(undefined);
export async function initSerial(manual = false) {
export async function initSerial(manual = false, withSync = true) {
const device = get(serialPort) ?? new CharaDevice();
await device.init(manual);
serialPort.set(device);
await sync();
if (withSync) {
await sync();
}
}
export async function sync() {