@openmouse/protocol 0.46.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drivers/hitscan/hid.d.ts +98 -0
- package/dist/drivers/hitscan/hid.d.ts.map +1 -0
- package/dist/drivers/hitscan/hid.js +500 -0
- package/dist/drivers/hitscan/hid.js.map +1 -0
- package/dist/drivers/logitech/hidpp.d.ts +30 -0
- package/dist/drivers/logitech/hidpp.d.ts.map +1 -1
- package/dist/drivers/logitech/hidpp.js +73 -0
- package/dist/drivers/logitech/hidpp.js.map +1 -1
- package/dist/drivers/mouse-types.d.ts +28 -1
- package/dist/drivers/mouse-types.d.ts.map +1 -1
- package/dist/drivers/registry.d.ts +2 -1
- package/dist/drivers/registry.d.ts.map +1 -1
- package/dist/drivers/registry.js +3 -0
- package/dist/drivers/registry.js.map +1 -1
- package/dist/drivers/vendors.d.ts +1 -0
- package/dist/drivers/vendors.d.ts.map +1 -1
- package/dist/drivers/vendors.js +5 -0
- package/dist/drivers/vendors.js.map +1 -1
- package/dist/hitscan/buttons.d.ts +57 -0
- package/dist/hitscan/buttons.d.ts.map +1 -0
- package/dist/hitscan/buttons.js +86 -0
- package/dist/hitscan/buttons.js.map +1 -0
- package/dist/hitscan/index.d.ts +140 -0
- package/dist/hitscan/index.d.ts.map +1 -0
- package/dist/hitscan/index.js +275 -0
- package/dist/hitscan/index.js.map +1 -0
- package/dist/hitscan/settings.d.ts +54 -0
- package/dist/hitscan/settings.d.ts.map +1 -0
- package/dist/hitscan/settings.js +91 -0
- package/dist/hitscan/settings.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/** Three-byte action values, before the per-record checksum. Derived from
|
|
2
|
+
* Hitscan Utility 1.0.2 UI formatter 0x1400324F0 and QAction connections
|
|
3
|
+
* 0x140027AF0 onward. See HID-BUTTONS.md in the retained capture. */
|
|
4
|
+
export const HITSCAN_BUTTON_CATEGORY = {
|
|
5
|
+
disabled: 0, mouse: 1, dpi: 2, shortcut: 5, macro: 6, pollingSwitch: 7,
|
|
6
|
+
};
|
|
7
|
+
export const HITSCAN_MOUSE_BUTTON = { left: 1, right: 2, middle: 4, back: 8, forward: 16 };
|
|
8
|
+
export const HITSCAN_DPI_BUTTON = { loop: 1, up: 2, down: 3 };
|
|
9
|
+
function bytes(values) {
|
|
10
|
+
if (values.length !== 3 || values.some(value => !Number.isInteger(value) || value < 0 || value > 255)) {
|
|
11
|
+
throw new RangeError("A Hitscan button action requires three bytes.");
|
|
12
|
+
}
|
|
13
|
+
return [values[0], values[1], values[2]];
|
|
14
|
+
}
|
|
15
|
+
/** Encode only named mappings recovered from the app; unknown triples round-trip. */
|
|
16
|
+
export function hitscanEncodeButton(action) {
|
|
17
|
+
switch (action.kind) {
|
|
18
|
+
case "disabled": return [0, 0, 0];
|
|
19
|
+
case "mouse": return bytes([1, HITSCAN_MOUSE_BUTTON[action.button], 0]);
|
|
20
|
+
case "dpi": return bytes([2, HITSCAN_DPI_BUTTON[action.action], 0]);
|
|
21
|
+
case "pollingSwitch": return [7, 0, 0];
|
|
22
|
+
case "shortcut": return bytes([5, ...action.parameters]);
|
|
23
|
+
case "macro": return bytes([6, ...action.parameters]);
|
|
24
|
+
case "unknown": return bytes(action.bytes);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/** Preserve unrecognized parameters, including extra bytes on known categories. */
|
|
28
|
+
export function hitscanDecodeButton(values) {
|
|
29
|
+
const raw = bytes(Array.from(values));
|
|
30
|
+
if (raw[0] === 5 || raw[0] === 6) {
|
|
31
|
+
return { kind: raw[0] === 5 ? "shortcut" : "macro", parameters: [raw[1], raw[2]] };
|
|
32
|
+
}
|
|
33
|
+
if (raw[2] === 0) {
|
|
34
|
+
if (raw[0] === 0 && raw[1] === 0)
|
|
35
|
+
return { kind: "disabled" };
|
|
36
|
+
if (raw[0] === 7 && raw[1] === 0)
|
|
37
|
+
return { kind: "pollingSwitch" };
|
|
38
|
+
if (raw[0] === 1) {
|
|
39
|
+
const button = Object.keys(HITSCAN_MOUSE_BUTTON)
|
|
40
|
+
.find(key => HITSCAN_MOUSE_BUTTON[key] === raw[1]);
|
|
41
|
+
if (button)
|
|
42
|
+
return { kind: "mouse", button };
|
|
43
|
+
}
|
|
44
|
+
if (raw[0] === 2) {
|
|
45
|
+
const action = Object.keys(HITSCAN_DPI_BUTTON)
|
|
46
|
+
.find(key => HITSCAN_DPI_BUTTON[key] === raw[1]);
|
|
47
|
+
if (action)
|
|
48
|
+
return { kind: "dpi", action };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return { kind: "unknown", bytes: raw };
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Physical buttons, in key-record order (`0x60 + 4*i`). `KeyNumber=6` in the
|
|
55
|
+
* shipped Config.ini. The order follows the CompX key table this layout shares
|
|
56
|
+
* with Teevolution; shipped defaults corroborate Left, Right and Back.
|
|
57
|
+
*/
|
|
58
|
+
export const HITSCAN_BUTTON_NAMES = ["Left", "Right", "Middle", "Back", "Forward", "DPI"];
|
|
59
|
+
/** UI labels for the named actions, in display order. Shortcut and macro stay read-only. */
|
|
60
|
+
export const HITSCAN_BUTTON_OPTIONS = [
|
|
61
|
+
["Left Click", { kind: "mouse", button: "left" }],
|
|
62
|
+
["Right Click", { kind: "mouse", button: "right" }],
|
|
63
|
+
["Middle Click", { kind: "mouse", button: "middle" }],
|
|
64
|
+
["Backward", { kind: "mouse", button: "back" }],
|
|
65
|
+
["Forward", { kind: "mouse", button: "forward" }],
|
|
66
|
+
["DPI Loop", { kind: "dpi", action: "loop" }],
|
|
67
|
+
["DPI+", { kind: "dpi", action: "up" }],
|
|
68
|
+
["DPI-", { kind: "dpi", action: "down" }],
|
|
69
|
+
["Polling Rate Switch", { kind: "pollingSwitch" }],
|
|
70
|
+
["Disable", { kind: "disabled" }],
|
|
71
|
+
];
|
|
72
|
+
export function hitscanButtonActionForLabel(label) {
|
|
73
|
+
return HITSCAN_BUTTON_OPTIONS.find(([name]) => name === label)?.[1] ?? null;
|
|
74
|
+
}
|
|
75
|
+
/** Label for a decoded action; shortcut, macro and unknown triples get descriptive names. */
|
|
76
|
+
export function hitscanButtonLabel(action) {
|
|
77
|
+
if (action.kind === "shortcut")
|
|
78
|
+
return "Shortcut";
|
|
79
|
+
if (action.kind === "macro")
|
|
80
|
+
return "Macro";
|
|
81
|
+
if (action.kind === "unknown")
|
|
82
|
+
return `Unknown (${action.bytes.map(b => b.toString(16).padStart(2, "0")).join(" ")})`;
|
|
83
|
+
const encoded = hitscanEncodeButton(action);
|
|
84
|
+
return HITSCAN_BUTTON_OPTIONS.find(([, option]) => hitscanEncodeButton(option).every((byte, index) => byte === encoded[index]))?.[0] ?? "Unknown";
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=buttons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttons.js","sourceRoot":"","sources":["../../src/hitscan/buttons.ts"],"names":[],"mappings":"AAAA;;qEAEqE;AACrE,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC;CAC9D,CAAC;AACX,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAW,CAAC;AACpG,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAW,CAAC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itscan/HID-{COMMANDS,CONFIG}.md for instruction
|
|
4
|
+
* addresses. Payloads exclude the Windows HID report ID; no hardware validation
|
|
5
|
+
* is implied. DPI and key records deliberately preserve sensor/action bytes.
|
|
6
|
+
*/
|
|
7
|
+
export * from "./settings.js";
|
|
8
|
+
export * from "./buttons.js";
|
|
9
|
+
export declare const HITSCAN_REPORT_ID = 8;
|
|
10
|
+
export declare const HITSCAN_PAYLOAD_LENGTH = 16;
|
|
11
|
+
export declare const HITSCAN_MAX_CHUNK = 10;
|
|
12
|
+
export declare const HITSCAN_CONFIG_LENGTH = 192;
|
|
13
|
+
export declare const HITSCAN_FLASH_LENGTH = 6912;
|
|
14
|
+
export declare const HITSCAN_NOTIFICATION = 10;
|
|
15
|
+
/** Base64-decoded shipped Config.ini, normalized by the app's config reader. */
|
|
16
|
+
export declare const HITSCAN_VENDOR_ID = 14192;
|
|
17
|
+
export declare const HITSCAN_PRODUCTS: ReadonlyMap<number, {
|
|
18
|
+
transport: "wired" | "receiver" | "8k-receiver";
|
|
19
|
+
verified: false;
|
|
20
|
+
}>;
|
|
21
|
+
/** MID is returned at runtime; the shipped file gives neither model a retail name. */
|
|
22
|
+
export declare const HITSCAN_MODELS: ReadonlyMap<number, {
|
|
23
|
+
sensor: "3395";
|
|
24
|
+
minDpi: number;
|
|
25
|
+
maxDpi: number;
|
|
26
|
+
dpiStep: number;
|
|
27
|
+
maxDpiStages: number;
|
|
28
|
+
verified: false;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const HITSCAN_COMMAND: {
|
|
31
|
+
readonly deviceInfo: 1;
|
|
32
|
+
readonly driverStatus: 2;
|
|
33
|
+
readonly online: 3;
|
|
34
|
+
readonly battery: 4;
|
|
35
|
+
readonly pair: 5;
|
|
36
|
+
readonly pairStatus: 6;
|
|
37
|
+
readonly write: 7;
|
|
38
|
+
readonly read: 8;
|
|
39
|
+
readonly reset: 9;
|
|
40
|
+
readonly setVidPid: 11;
|
|
41
|
+
readonly descriptor: 12;
|
|
42
|
+
readonly updateMode: 13;
|
|
43
|
+
readonly profile: 14;
|
|
44
|
+
readonly setProfile: 15;
|
|
45
|
+
readonly mtkMode: 17;
|
|
46
|
+
readonly firmware: 18;
|
|
47
|
+
readonly setDongleRgb: 20;
|
|
48
|
+
readonly dongleRgb: 21;
|
|
49
|
+
readonly setLongRange: 22;
|
|
50
|
+
readonly longRange: 23;
|
|
51
|
+
readonly setDongleRgbBar: 24;
|
|
52
|
+
readonly dongleRgbBar: 25;
|
|
53
|
+
readonly setDongleId: 26;
|
|
54
|
+
readonly slaveFirmware: 179;
|
|
55
|
+
readonly writeCidMid: 240;
|
|
56
|
+
readonly cidMid: 241;
|
|
57
|
+
};
|
|
58
|
+
/** Flash coordinates, not report offsets. Unnamed scalar fields stay numeric. */
|
|
59
|
+
export declare const HITSCAN_ADDRESS: {
|
|
60
|
+
readonly pollingRate: 0;
|
|
61
|
+
readonly dpiStageCount: 2;
|
|
62
|
+
readonly activeDpiStage: 4;
|
|
63
|
+
readonly dpiStages: 12;
|
|
64
|
+
readonly dpiColors: 44;
|
|
65
|
+
readonly dpiLed: 76;
|
|
66
|
+
readonly buttons: 96;
|
|
67
|
+
readonly ledBar: 160;
|
|
68
|
+
readonly shortcuts: 256;
|
|
69
|
+
readonly macros: 768;
|
|
70
|
+
};
|
|
71
|
+
export declare const HITSCAN_SCALAR_ADDRESSES: readonly [0, 2, 4, 6, 8, 10, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185];
|
|
72
|
+
type Bytes = Uint8Array | readonly number[];
|
|
73
|
+
/** Applies to records as well as full wire reports (include report ID there). */
|
|
74
|
+
export declare function hitscanChecksum(bytes: Iterable<number>): number;
|
|
75
|
+
export declare function hitscanChecksumIsValid(payload: Bytes): boolean;
|
|
76
|
+
/** Raw normal command constructor; declared length may differ from data count. */
|
|
77
|
+
export declare function hitscanBuildCommand(command: number, data?: Bytes, declaredLength?: number): Uint8Array<ArrayBuffer>;
|
|
78
|
+
export declare function hitscanBuildReadPayload(address: number, length: number): Uint8Array<ArrayBuffer>;
|
|
79
|
+
export declare function hitscanBuildWritePayload(address: number, data: Bytes): Uint8Array<ArrayBuffer>;
|
|
80
|
+
export declare function hitscanBuildReadChunks(address: number, length: number): Uint8Array<ArrayBuffer>[];
|
|
81
|
+
export declare function hitscanBuildWriteChunks(address: number, data: Bytes): Uint8Array<ArrayBuffer>[];
|
|
82
|
+
/** Writes are acknowledged by a full echo; notifications never satisfy requests. */
|
|
83
|
+
export declare function hitscanMatchesResponse(request: Bytes, response: Bytes): boolean;
|
|
84
|
+
/** Stronger than the DLL's opcode-only matcher: reject stale address/length replies. */
|
|
85
|
+
export declare function hitscanParseReadResponse(response: Bytes, address: number, length: number): Uint8Array<ArrayBuffer> | null;
|
|
86
|
+
export declare function hitscanEncodeRecord(data: Bytes): Uint8Array<ArrayBuffer>;
|
|
87
|
+
export declare function hitscanDecodeRecord(record: Bytes, dataLength: number): Uint8Array<ArrayBuffer> | null;
|
|
88
|
+
export declare function hitscanEncodeScalar(value: number): Uint8Array<ArrayBuffer>;
|
|
89
|
+
export declare function hitscanDecodeScalar(record: Bytes): number | null;
|
|
90
|
+
export declare function hitscanEncodeTriplet(data: Bytes): Uint8Array<ArrayBuffer>;
|
|
91
|
+
export declare function hitscanDecodeTriplet(record: Bytes): Uint8Array<ArrayBuffer> | null;
|
|
92
|
+
/** Type values follow the DLL's normalized event enum; physical meaning is unverified. */
|
|
93
|
+
export interface HitscanKeyEvent {
|
|
94
|
+
type: 0 | 1 | 2;
|
|
95
|
+
modifier: number;
|
|
96
|
+
code: number;
|
|
97
|
+
value: number;
|
|
98
|
+
}
|
|
99
|
+
export interface HitscanMacroEvent extends HitscanKeyEvent {
|
|
100
|
+
delay: number;
|
|
101
|
+
}
|
|
102
|
+
export interface HitscanMacro {
|
|
103
|
+
name: Uint8Array;
|
|
104
|
+
events: HitscanMacroEvent[];
|
|
105
|
+
}
|
|
106
|
+
export declare function hitscanEncodeShortcut(events: readonly HitscanKeyEvent[]): Uint8Array<ArrayBuffer>;
|
|
107
|
+
/** Accepts a packed record or its full 32-byte slot, preserving caller input. */
|
|
108
|
+
export declare function hitscanDecodeShortcut(record: Bytes): HitscanKeyEvent[] | null;
|
|
109
|
+
export declare function hitscanEncodeMacro(macro: HitscanMacro): Uint8Array<ArrayBuffer>;
|
|
110
|
+
/** Name bytes are opaque; the event checksum excludes the name/header region. */
|
|
111
|
+
export declare function hitscanDecodeMacro(record: Bytes): HitscanMacro | null;
|
|
112
|
+
/** Lossless snapshot: no parser defaults, coerced booleans, or discarded unknown bytes. */
|
|
113
|
+
export declare class HitscanConfig {
|
|
114
|
+
private readonly data;
|
|
115
|
+
constructor(data: Bytes);
|
|
116
|
+
get bytes(): Uint8Array<ArrayBuffer>;
|
|
117
|
+
record(address: number, dataLength: number): Uint8Array<ArrayBuffer> | null;
|
|
118
|
+
scalar(address: number): number | null;
|
|
119
|
+
dpiStage(index: number): Uint8Array<ArrayBuffer> | null;
|
|
120
|
+
dpiColor(index: number): Uint8Array<ArrayBuffer> | null;
|
|
121
|
+
button(index: number): Uint8Array<ArrayBuffer> | null;
|
|
122
|
+
shortcut(index: number): HitscanKeyEvent[] | null;
|
|
123
|
+
macro(index: number): HitscanMacro | null;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* GetBatteryLevel (0x04) returns payload[5], payload[6] and BE16 payload[7..8].
|
|
127
|
+
* The DLL does not name them; this is the same reply shape CompX mice use
|
|
128
|
+
* (percent, charging flag, millivolts), and this command table, framing and
|
|
129
|
+
* flash layout match CompX's byte for byte. Unverified on Hitscan hardware.
|
|
130
|
+
*/
|
|
131
|
+
export declare function hitscanDecodeBattery(reply: Bytes): {
|
|
132
|
+
percent: number | null;
|
|
133
|
+
charging: boolean;
|
|
134
|
+
millivolts: number | null;
|
|
135
|
+
} | null;
|
|
136
|
+
/** GetVersion (0x12) / GetSlaveVersion (0xb3): BE16 at payload[5..6]. */
|
|
137
|
+
export declare function hitscanDecodeVersion(reply: Bytes, command?: number): number | null;
|
|
138
|
+
/** Same "v<major>.<minor hex>" form the CompX drivers display. */
|
|
139
|
+
export declare function hitscanFormatVersion(version: number): string;
|
|
140
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hitscan/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,eAAO,MAAM,iBAAiB,IAAO,CAAC;AACtC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,qBAAqB,MAAO,CAAC;AAC1C,eAAO,MAAM,oBAAoB,OAAS,CAAC;AAC3C,eAAO,MAAM,oBAAoB,KAAO,CAAC;AAEzC,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,QAAS,CAAC;AACxC,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE;IACjD,SAAS,EAAE,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC;IAChD,QAAQ,EAAE,KAAK,CAAC;CACjB,CAIC,CAAC;AACH,sFAAsF;AACtF,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE;IAC/C,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAChE,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC;CACvC,CAGG,CAAC;AAEL,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQlB,CAAC;AAEX,iFAAiF;AACjF,eAAO,MAAM,eAAe;;;;;;;;;;;CAIlB,CAAC;AACX,eAAO,MAAM,wBAAwB,gFAE3B,CAAC;AACX,KAAK,KAAK,GAAG,UAAU,GAAG,S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,CAA8B;IAClE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;IAK3E,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;IACvD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,EAAE,GAAG,IAAI;IAIjD,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;CAI1C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG;IAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,CAIlI;AAED,yEAAyE;AACzE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,GAAE,MAAiC,GAAG,MAAM,GAAG,IAAI,CAG5G;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hitscan Utility 1.0.2 native HIDUsb.dll protocol, recovered statically.
|
|
3
|
+
* See docs/hitscan/HID-{COMMANDS,CONFIG}.md for instruction
|
|
4
|
+
* addresses. Payloads exclude the Windows HID report ID; no hardware validation
|
|
5
|
+
* is implied. DPI and key records deliberately preserve sensor/action bytes.
|
|
6
|
+
*/
|
|
7
|
+
export * from "./settings.js";
|
|
8
|
+
export * from "./buttons.js";
|
|
9
|
+
export const HITSCAN_REPORT_ID = 0x08;
|
|
10
|
+
export const HITSCAN_PAYLOAD_LENGTH = 16;
|
|
11
|
+
export const HITSCAN_MAX_CHUNK = 10;
|
|
12
|
+
export const HITSCAN_CONFIG_LENGTH = 0xc0;
|
|
13
|
+
export const HITSCAN_FLASH_LENGTH = 0x1b00;
|
|
14
|
+
export const HITSCAN_NOTIFICATION = 0x0a;
|
|
15
|
+
/** Base64-decoded shipped Config.ini, normalized by the app's config reader. */
|
|
16
|
+
export const HITSCAN_VENDOR_ID = 0x3770;
|
|
17
|
+
export const HITSCAN_PRODUCTS = new Map([
|
|
18
|
+
[0x0100, { transport: "wired", verified: false }],
|
|
19
|
+
[0x0200, { transport: "receiver", verified: false }],
|
|
20
|
+
[0x0300, { transport: "8k-receiver", verified: false }],
|
|
21
|
+
]);
|
|
22
|
+
/** MID is returned at runtime; the shipped file gives neither model a retail name. */
|
|
23
|
+
export const HITSCAN_MODELS = new Map([1, 2].map(id => [id, {
|
|
24
|
+
sensor: "3395", minDpi: 50, maxDpi: 26000, dpiStep: 50,
|
|
25
|
+
maxDpiStages: 4, verified: false,
|
|
26
|
+
}]));
|
|
27
|
+
export const HITSCAN_COMMAND = {
|
|
28
|
+
deviceInfo: 0x01, driverStatus: 0x02, online: 0x03, battery: 0x04,
|
|
29
|
+
pair: 0x05, pairStatus: 0x06, write: 0x07, read: 0x08,
|
|
30
|
+
reset: 0x09, setVidPid: 0x0b, descriptor: 0x0c, updateMode: 0x0d,
|
|
31
|
+
profile: 0x0e, setProfile: 0x0f, mtkMode: 0x11, firmware: 0x12,
|
|
32
|
+
setDongleRgb: 0x14, dongleRgb: 0x15, setLongRange: 0x16,
|
|
33
|
+
longRange: 0x17, setDongleRgbBar: 0x18, dongleRgbBar: 0x19,
|
|
34
|
+
setDongleId: 0x1a, slaveFirmware: 0xb3, writeCidMid: 0xf0, cidMid: 0xf1,
|
|
35
|
+
};
|
|
36
|
+
/** Flash coordinates, not report offsets. Unnamed scalar fields stay numeric. */
|
|
37
|
+
export const HITSCAN_ADDRESS = {
|
|
38
|
+
pollingRate: 0x00, dpiStageCount: 0x02, activeDpiStage: 0x04,
|
|
39
|
+
dpiStages: 0x0c, dpiColors: 0x2c, dpiLed: 0x4c,
|
|
40
|
+
buttons: 0x60, ledBar: 0xa0, shortcuts: 0x100, macros: 0x300,
|
|
41
|
+
};
|
|
42
|
+
export const HITSCAN_SCALAR_ADDRESSES = [
|
|
43
|
+
0, 2, 4, 6, 8, 10, 0xa7, 0xa9, 0xab, 0xad, 0xaf, 0xb1, 0xb3, 0xb5, 0xb7, 0xb9,
|
|
44
|
+
];
|
|
45
|
+
function integer(value, min, max, label) {
|
|
46
|
+
if (!Number.isInteger(value) || value < min || value > max)
|
|
47
|
+
throw new RangeError(`Invalid Hitscan ${label}.`);
|
|
48
|
+
}
|
|
49
|
+
function checkedBytes(data) {
|
|
50
|
+
for (const value of data)
|
|
51
|
+
integer(value, 0, 255, "byte");
|
|
52
|
+
return Uint8Array.from(data);
|
|
53
|
+
}
|
|
54
|
+
function range(address, length) {
|
|
55
|
+
integer(address, 0, HITSCAN_FLASH_LENGTH - 1, "flash address");
|
|
56
|
+
integer(length, 1, HITSCAN_FLASH_LENGTH - address, "flash length");
|
|
57
|
+
}
|
|
58
|
+
/** Applies to records as well as full wire reports (include report ID there). */
|
|
59
|
+
export function hitscanChecksum(bytes) {
|
|
60
|
+
let sum = 0;
|
|
61
|
+
for (const byte of bytes) {
|
|
62
|
+
integer(byte, 0, 255, "byte");
|
|
63
|
+
sum += byte;
|
|
64
|
+
}
|
|
65
|
+
return (0x55 - sum) & 255;
|
|
66
|
+
}
|
|
67
|
+
export function hitscanChecksumIsValid(payload) {
|
|
68
|
+
if (payload.length !== HITSCAN_PAYLOAD_LENGTH)
|
|
69
|
+
return false;
|
|
70
|
+
let sum = HITSCAN_REPORT_ID;
|
|
71
|
+
for (const byte of payload) {
|
|
72
|
+
if (!Number.isInteger(byte) || byte < 0 || byte > 255)
|
|
73
|
+
return false;
|
|
74
|
+
sum += byte;
|
|
75
|
+
}
|
|
76
|
+
return (sum & 255) === 0x55;
|
|
77
|
+
}
|
|
78
|
+
function finalize(payload) {
|
|
79
|
+
payload[15] = hitscanChecksum([HITSCAN_REPORT_ID, ...payload.subarray(0, 15)]);
|
|
80
|
+
return payload;
|
|
81
|
+
}
|
|
82
|
+
/** Raw normal command constructor; declared length may differ from data count. */
|
|
83
|
+
export function hitscanBuildCommand(command, data = [], declaredLength = data.length) {
|
|
84
|
+
integer(command, 0, 255, "command");
|
|
85
|
+
integer(declaredLength, 0, 255, "declared length");
|
|
86
|
+
if (data.length > HITSCAN_MAX_CHUNK)
|
|
87
|
+
throw new RangeError("Hitscan command data exceeds ten bytes.");
|
|
88
|
+
const payload = new Uint8Array(HITSCAN_PAYLOAD_LENGTH);
|
|
89
|
+
payload[0] = command;
|
|
90
|
+
payload[4] = declaredLength;
|
|
91
|
+
payload.set(checkedBytes(data), 5);
|
|
92
|
+
return finalize(payload);
|
|
93
|
+
}
|
|
94
|
+
export function hitscanBuildReadPayload(address, length) {
|
|
95
|
+
range(address, length);
|
|
96
|
+
integer(length, 1, HITSCAN_MAX_CHUNK, "read chunk length");
|
|
97
|
+
const payload = hitscanBuildCommand(HITSCAN_COMMAND.read, [], length);
|
|
98
|
+
payload[2] = address >> 8;
|
|
99
|
+
payload[3] = address & 255;
|
|
100
|
+
return finalize(payload);
|
|
101
|
+
}
|
|
102
|
+
export function hitscanBuildWritePayload(address, data) {
|
|
103
|
+
range(address, data.length);
|
|
104
|
+
if (data.length > HITSCAN_MAX_CHUNK)
|
|
105
|
+
throw new RangeError("Hitscan write chunk exceeds ten bytes.");
|
|
106
|
+
const payload = hitscanBuildCommand(HITSCAN_COMMAND.write, data);
|
|
107
|
+
payload[2] = address >> 8;
|
|
108
|
+
payload[3] = address & 255;
|
|
109
|
+
return finalize(payload);
|
|
110
|
+
}
|
|
111
|
+
export function hitscanBuildReadChunks(address, length) {
|
|
112
|
+
range(address, length);
|
|
113
|
+
const chunks = [];
|
|
114
|
+
for (let offset = 0; offset < length; offset += HITSCAN_MAX_CHUNK) {
|
|
115
|
+
chunks.push(hitscanBuildReadPayload(address + offset, Math.min(HITSCAN_MAX_CHUNK, length - offset)));
|
|
116
|
+
}
|
|
117
|
+
return chunks;
|
|
118
|
+
}
|
|
119
|
+
export function hitscanBuildWriteChunks(address, data) {
|
|
120
|
+
range(address, data.length);
|
|
121
|
+
const bytes = checkedBytes(data), chunks = [];
|
|
122
|
+
for (let offset = 0; offset < bytes.length; offset += HITSCAN_MAX_CHUNK) {
|
|
123
|
+
chunks.push(hitscanBuildWritePayload(address + offset, bytes.subarray(offset, offset + HITSCAN_MAX_CHUNK)));
|
|
124
|
+
}
|
|
125
|
+
return chunks;
|
|
126
|
+
}
|
|
127
|
+
/** Writes are acknowledged by a full echo; notifications never satisfy requests. */
|
|
128
|
+
export function hitscanMatchesResponse(request, response) {
|
|
129
|
+
if (!hitscanChecksumIsValid(request) || !hitscanChecksumIsValid(response))
|
|
130
|
+
return false;
|
|
131
|
+
if (response[0] === HITSCAN_NOTIFICATION || response[0] !== request[0])
|
|
132
|
+
return false;
|
|
133
|
+
return request[0] !== HITSCAN_COMMAND.write || request.every((byte, index) => response[index] === byte);
|
|
134
|
+
}
|
|
135
|
+
/** Stronger than the DLL's opcode-only matcher: reject stale address/length replies. */
|
|
136
|
+
export function hitscanParseReadResponse(response, address, length) {
|
|
137
|
+
range(address, length);
|
|
138
|
+
integer(length, 1, HITSCAN_MAX_CHUNK, "read chunk length");
|
|
139
|
+
if (!hitscanChecksumIsValid(response) || response[0] !== HITSCAN_COMMAND.read || response[1] !== 0
|
|
140
|
+
|| response[2] !== (address >> 8) || response[3] !== (address & 255) || response[4] !== length)
|
|
141
|
+
return null;
|
|
142
|
+
return Uint8Array.from(response.slice(5, 5 + length));
|
|
143
|
+
}
|
|
144
|
+
export function hitscanEncodeRecord(data) {
|
|
145
|
+
const bytes = checkedBytes(data), record = new Uint8Array(bytes.length + 1);
|
|
146
|
+
record.set(bytes);
|
|
147
|
+
record[bytes.length] = hitscanChecksum(bytes);
|
|
148
|
+
return record;
|
|
149
|
+
}
|
|
150
|
+
export function hitscanDecodeRecord(record, dataLength) {
|
|
151
|
+
integer(dataLength, 1, HITSCAN_FLASH_LENGTH - 1, "record length");
|
|
152
|
+
if (record.length !== dataLength + 1)
|
|
153
|
+
return null;
|
|
154
|
+
const bytes = checkedBytes(record);
|
|
155
|
+
return hitscanChecksum(bytes.subarray(0, dataLength)) === bytes[dataLength] ? bytes.slice(0, dataLength) : null;
|
|
156
|
+
}
|
|
157
|
+
export function hitscanEncodeScalar(value) { return hitscanEncodeRecord([value]); }
|
|
158
|
+
export function hitscanDecodeScalar(record) { return hitscanDecodeRecord(record, 1)?.[0] ?? null; }
|
|
159
|
+
export function hitscanEncodeTriplet(data) {
|
|
160
|
+
if (data.length !== 3)
|
|
161
|
+
throw new RangeError("Hitscan DPI/color/button data must contain three bytes.");
|
|
162
|
+
return hitscanEncodeRecord(data);
|
|
163
|
+
}
|
|
164
|
+
export function hitscanDecodeTriplet(record) { return hitscanDecodeRecord(record, 3); }
|
|
165
|
+
function packedEvent(event) {
|
|
166
|
+
integer(event.type, 0, 2, "event type");
|
|
167
|
+
integer(event.modifier, 0, 15, "event modifier");
|
|
168
|
+
integer(event.code, 0, 255, "event code");
|
|
169
|
+
integer(event.value, 0, 255, "event value");
|
|
170
|
+
return [(event.type === 0 ? 0x80 : event.type === 1 ? 0x40 : 0) | event.modifier, event.code, event.value];
|
|
171
|
+
}
|
|
172
|
+
function unpackedEvent(data, offset) {
|
|
173
|
+
const head = data[offset];
|
|
174
|
+
return { type: (head & 0xc0) === 0x80 ? 0 : (head & 0xc0) === 0x40 ? 1 : 2,
|
|
175
|
+
modifier: head & 15, code: data[offset + 1], value: data[offset + 2] };
|
|
176
|
+
}
|
|
177
|
+
export function hitscanEncodeShortcut(events) {
|
|
178
|
+
integer(events.length, 2, 6, "shortcut event count");
|
|
179
|
+
return hitscanEncodeRecord([events.length, ...events.flatMap(packedEvent)]);
|
|
180
|
+
}
|
|
181
|
+
/** Accepts a packed record or its full 32-byte slot, preserving caller input. */
|
|
182
|
+
export function hitscanDecodeShortcut(record) {
|
|
183
|
+
const bytes = checkedBytes(record), count = bytes[0] ?? 0;
|
|
184
|
+
if (count < 2 || count > 6)
|
|
185
|
+
return null;
|
|
186
|
+
const end = 1 + count * 3;
|
|
187
|
+
if (bytes.length < end + 1 || (bytes.length !== end + 1 && bytes.length !== 32)
|
|
188
|
+
|| hitscanChecksum(bytes.subarray(0, end)) !== bytes[end])
|
|
189
|
+
return null;
|
|
190
|
+
return Array.from({ length: count }, (_, i) => unpackedEvent(bytes, 1 + 3 * i));
|
|
191
|
+
}
|
|
192
|
+
export function hitscanEncodeMacro(macro) {
|
|
193
|
+
integer(macro.name.length, 0, 30, "macro name length");
|
|
194
|
+
integer(macro.events.length, 2, 70, "macro event count");
|
|
195
|
+
const record = new Uint8Array(33 + macro.events.length * 5);
|
|
196
|
+
record[0] = macro.name.length;
|
|
197
|
+
record.set(checkedBytes(macro.name), 1);
|
|
198
|
+
record[31] = macro.events.length;
|
|
199
|
+
macro.events.forEach((event, index) => {
|
|
200
|
+
integer(event.delay, 0, 65535, "macro delay");
|
|
201
|
+
const offset = 32 + index * 5;
|
|
202
|
+
record.set(packedEvent(event), offset);
|
|
203
|
+
record[offset + 3] = event.delay >> 8;
|
|
204
|
+
record[offset + 4] = event.delay & 255;
|
|
205
|
+
});
|
|
206
|
+
record[record.length - 1] = hitscanChecksum(record.subarray(31, record.length - 1));
|
|
207
|
+
return record;
|
|
208
|
+
}
|
|
209
|
+
/** Name bytes are opaque; the event checksum excludes the name/header region. */
|
|
210
|
+
export function hitscanDecodeMacro(record) {
|
|
211
|
+
const bytes = checkedBytes(record), count = bytes[31] ?? 0, nameLength = bytes[0] ?? 0;
|
|
212
|
+
if (count < 2 || count > 70 || nameLength > 30)
|
|
213
|
+
return null;
|
|
214
|
+
const end = 32 + count * 5;
|
|
215
|
+
if (bytes.length < end + 1 || (bytes.length !== end + 1 && bytes.length !== 384)
|
|
216
|
+
|| hitscanChecksum(bytes.subarray(31, end)) !== bytes[end])
|
|
217
|
+
return null;
|
|
218
|
+
return { name: bytes.slice(1, 1 + nameLength), events: Array.from({ length: count }, (_, i) => {
|
|
219
|
+
const offset = 32 + i * 5;
|
|
220
|
+
return { ...unpackedEvent(bytes, offset), delay: (bytes[offset + 3] << 8) | bytes[offset + 4] };
|
|
221
|
+
}) };
|
|
222
|
+
}
|
|
223
|
+
/** Lossless snapshot: no parser defaults, coerced booleans, or discarded unknown bytes. */
|
|
224
|
+
export class HitscanConfig {
|
|
225
|
+
data;
|
|
226
|
+
constructor(data) {
|
|
227
|
+
if (data.length !== HITSCAN_CONFIG_LENGTH && data.length !== HITSCAN_FLASH_LENGTH)
|
|
228
|
+
throw new RangeError("Hitscan snapshot must be 0xc0 or 0x1b00 bytes.");
|
|
229
|
+
this.data = checkedBytes(data);
|
|
230
|
+
}
|
|
231
|
+
get bytes() { return this.data.slice(); }
|
|
232
|
+
record(address, dataLength) {
|
|
233
|
+
range(address, dataLength + 1);
|
|
234
|
+
if (address + dataLength + 1 > this.data.length)
|
|
235
|
+
return null;
|
|
236
|
+
return hitscanDecodeRecord(this.data.subarray(address, address + dataLength + 1), dataLength);
|
|
237
|
+
}
|
|
238
|
+
scalar(address) { return this.record(address, 1)?.[0] ?? null; }
|
|
239
|
+
dpiStage(index) { integer(index, 0, 7, "DPI stage"); return this.record(0x0c + index * 4, 3); }
|
|
240
|
+
dpiColor(index) { integer(index, 0, 7, "DPI color"); return this.record(0x2c + index * 4, 3); }
|
|
241
|
+
button(index) { integer(index, 0, 15, "button"); return this.record(0x60 + index * 4, 3); }
|
|
242
|
+
shortcut(index) {
|
|
243
|
+
integer(index, 0, 15, "shortcut slot");
|
|
244
|
+
const start = 0x100 + index * 32;
|
|
245
|
+
return start + 32 <= this.data.length ? hitscanDecodeShortcut(this.data.subarray(start, start + 32)) : null;
|
|
246
|
+
}
|
|
247
|
+
macro(index) {
|
|
248
|
+
integer(index, 0, 15, "macro slot");
|
|
249
|
+
const start = 0x300 + index * 384;
|
|
250
|
+
return start + 384 <= this.data.length ? hitscanDecodeMacro(this.data.subarray(start, start + 384)) : null;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* GetBatteryLevel (0x04) returns payload[5], payload[6] and BE16 payload[7..8].
|
|
255
|
+
* The DLL does not name them; this is the same reply shape CompX mice use
|
|
256
|
+
* (percent, charging flag, millivolts), and this command table, framing and
|
|
257
|
+
* flash layout match CompX's byte for byte. Unverified on Hitscan hardware.
|
|
258
|
+
*/
|
|
259
|
+
export function hitscanDecodeBattery(reply) {
|
|
260
|
+
if (!hitscanChecksumIsValid(reply) || reply[0] !== HITSCAN_COMMAND.battery)
|
|
261
|
+
return null;
|
|
262
|
+
const percent = reply[5], millivolts = (reply[7] << 8) | reply[8];
|
|
263
|
+
return { percent: percent <= 100 ? percent : null, charging: reply[6] === 1, millivolts: millivolts || null };
|
|
264
|
+
}
|
|
265
|
+
/** GetVersion (0x12) / GetSlaveVersion (0xb3): BE16 at payload[5..6]. */
|
|
266
|
+
export function hitscanDecodeVersion(reply, command = HITSCAN_COMMAND.firmware) {
|
|
267
|
+
if (!hitscanChecksumIsValid(reply) || reply[0] !== command)
|
|
268
|
+
return null;
|
|
269
|
+
return (reply[5] << 8) | reply[6];
|
|
270
|
+
}
|
|
271
|
+
/** Same "v<major>.<minor hex>" form the CompX drivers display. */
|
|
272
|
+
export function hitscanFormatVersion(version) {
|
|
273
|
+
return `v${version >> 8}.${(version & 255).toString(16).padStart(2, "0")}`;
|
|
274
|
+
}
|
|
275
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hitscan/index.ts"],"names":[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K,CAAC,CAAC,CAAE,EAAE,UAAU,GAAG,CAAC,KAAK,CAAC,CAAC,CAAE,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;IACrE,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,IAAI,IAAI,EAAE,CAAC;AAChH,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,oBAAoB,CAAC,KAAY,EAAE,UAAkB,eAAe,CAAC,QAAQ;IAC3F,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO;QAAE,OAAO,IAAI,CAAC;IACxE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAE,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;AACtC,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,OAAO,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Semantic settings recovered from Hitscan Utility 1.0.2; not hardware verified. */
|
|
2
|
+
export declare const HITSCAN_SETTING_ADDRESS: {
|
|
3
|
+
readonly pollingRate: 0;
|
|
4
|
+
readonly dpiStageCount: 2;
|
|
5
|
+
readonly activeDpiStage: 4;
|
|
6
|
+
readonly liftOffDistance: 10;
|
|
7
|
+
readonly debounce: 169;
|
|
8
|
+
readonly motionSync: 171;
|
|
9
|
+
readonly angleSnapping: 175;
|
|
10
|
+
readonly rippleControl: 177;
|
|
11
|
+
readonly autoSleep: 181;
|
|
12
|
+
readonly sleepSelection: 183;
|
|
13
|
+
readonly sensorMode: 185;
|
|
14
|
+
};
|
|
15
|
+
export declare const HITSCAN_POLLING_RATES: readonly [125, 250, 500, 1000, 2000, 4000, 8000];
|
|
16
|
+
export type HitscanPollingRate = typeof HITSCAN_POLLING_RATES[number];
|
|
17
|
+
/** Rate availability still depends on the selected mouse and receiver. */
|
|
18
|
+
export declare function hitscanEncodePollingRate(hz: number): number;
|
|
19
|
+
export declare function hitscanDecodePollingRate(value: number): HitscanPollingRate | null;
|
|
20
|
+
/**
|
|
21
|
+
* Both shipped model definitions select 3395, DPIRange
|
|
22
|
+
* "50,4050,50,4100,26000,50,0x11". App function 0x14000EC70 uses
|
|
23
|
+
* 50-unit encoding through 4050 and 100-unit encoding above it.
|
|
24
|
+
* A request such as 4150 therefore quantizes to 4100, matching the app.
|
|
25
|
+
* Returns a checksummed flash record and the actual representable DPI so the
|
|
26
|
+
* caller can display the result of quantization explicitly.
|
|
27
|
+
*/
|
|
28
|
+
export declare function hitscanEncode3395Dpi(dpi: number): {
|
|
29
|
+
record: Uint8Array<ArrayBuffer>;
|
|
30
|
+
effectiveDpi: number;
|
|
31
|
+
};
|
|
32
|
+
/** Exact equal-axis DPI values expressible by the two shipped model profiles. */
|
|
33
|
+
export declare const HITSCAN_3395_DPI_VALUES: readonly number[];
|
|
34
|
+
/**
|
|
35
|
+
* Decode canonical equal-axis records produced by the shipped model encoder.
|
|
36
|
+
* Unknown flags, unequal axes, and out-of-range records remain unrecognized.
|
|
37
|
+
*/
|
|
38
|
+
export declare function hitscanDecode3395Dpi(bytes: Uint8Array | readonly number[]): number | null;
|
|
39
|
+
/** Exact dropdown-index mapping; physical duration units remain unverified. */
|
|
40
|
+
export declare const HITSCAN_SLEEP_SELECTION_VALUES: readonly [3, 6, 30, 60, 90, 120, 150, 180, 210, 240];
|
|
41
|
+
/** Menu handlers write 0..8 ms; see HID-SETTINGS.md. Spinbox variants are not modelled. */
|
|
42
|
+
export declare const HITSCAN_DEBOUNCE_MAX_MS = 8;
|
|
43
|
+
/**
|
|
44
|
+
* LOD is stored as the combo index + 1. The variant widget names its two
|
|
45
|
+
* buttons `mm1Button`/`mm2Button`, so code 1 is 1 mm and code 2 is 2 mm.
|
|
46
|
+
*/
|
|
47
|
+
export declare const HITSCAN_LIFT_OFF_MILLIMETRES: readonly [1, 2];
|
|
48
|
+
export declare function hitscanDecodeLiftOff(code: number): 1 | 2 | null;
|
|
49
|
+
/**
|
|
50
|
+
* The `SensorRate` widget offers 125..4000 Hz; `SensorRateB` adds 8000 Hz.
|
|
51
|
+
* Only the 8K receiver is assumed to use the latter.
|
|
52
|
+
*/
|
|
53
|
+
export declare function hitscanPollingRatesFor(transport: "wired" | "receiver" | "8k-receiver"): readonly HitscanPollingRate[];
|
|
54
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/hitscan/settings.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;CAY1B,CAAC;AAEX,eAAO,MAAM,qBAAqB,kDAAmD,CAAC;AACtF,MAAM,MAAM,kBAAkB,GAAG,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAGtE,0EAA0E;AAC1E,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAI3D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAGjF;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAU3G;AAED,iFAAiF;AACjF,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAGnD,CAAC;AAEH;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAWzF;AAED,+EAA+E;AAC/E,eAAO,MAAM,8BAA8B,sDAAuD,CAAC;AAEnG,2FAA2F;AAC3F,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,4BAA4B,iBAAkB,CAAC;AAE5D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAE/D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,OAAO,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,kBAAkB,EAAE,CAErH"}
|