From d84495894aadd821c3356966f834593fda96dcab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Wed, 29 Oct 2025 19:52:43 +0100 Subject: [PATCH] fix: zero/engine backups should be x backups --- src/lib/backup/backup.ts | 4 ++++ src/lib/serial/device.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/backup/backup.ts b/src/lib/backup/backup.ts index da4e4f4c..7ce65718 100644 --- a/src/lib/backup/backup.ts +++ b/src/lib/backup/backup.ts @@ -97,9 +97,13 @@ export function restoreFromFile( let backupDevice = recent[1].device; if (backupDevice === "TWO" || backupDevice === "M4G") backupDevice = "ONE"; + else if (backupDevice === "ZERO" || backupDevice === "ENGINE") + backupDevice = "X"; let currentDevice = get(serialPort)?.device; if (currentDevice === "TWO" || currentDevice === "M4G") currentDevice = "ONE"; + else if (currentDevice === "ZERO" || currentDevice === "ENGINE") + currentDevice = "X"; if (backupDevice !== currentDevice) { alert("Backup is incompatible with this device"); diff --git a/src/lib/serial/device.ts b/src/lib/serial/device.ts index 25f4b657..28d606c7 100644 --- a/src/lib/serial/device.ts +++ b/src/lib/serial/device.ts @@ -145,7 +145,7 @@ export class CharaDevice { version!: string; company!: "CHARACHORDER" | "FORGE"; - device!: "ONE" | "TWO" | "LITE" | "X" | "M4G"; + device!: "ONE" | "TWO" | "LITE" | "X" | "M4G" | "ENGINE" | "ZERO"; chipset!: "M0" | "S2" | "S3"; keyCount!: 90 | 67 | 256; layerCount = 3;