mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-07 18:42:48 +00:00
fix: compatibility issues
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user