fix: compatibility issues

This commit is contained in:
2024-07-08 09:26:51 +02:00
parent 4106a80d53
commit 21e8c291b0

View File

@@ -20,6 +20,7 @@ const PORT_FILTERS: Map<string, SerialPortFilter> = new Map([
const KEY_COUNTS = { const KEY_COUNTS = {
ONE: 90, ONE: 90,
TWO: 90,
LITE: 67, LITE: 67,
X: 256, X: 256,
} as const; } as const;
@@ -126,8 +127,8 @@ export class CharaDevice {
); );
const [company, device, chipset] = await this.send(3, "ID"); const [company, device, chipset] = await this.send(3, "ID");
this.company = company as "CHARACHORDER"; this.company = company as "CHARACHORDER";
this.device = device as "ONE" | "LITE" | "X"; this.device = device as "ONE" | "TWO" | "LITE" | "X";
this.chipset = chipset as "M0" | "S2"; this.chipset = chipset as "M0" | "S2" | "S3";
this.keyCount = KEY_COUNTS[this.device]; this.keyCount = KEY_COUNTS[this.device];
} catch (e) { } catch (e) {
alert(e); alert(e);