@openmouse/protocol 0.24.0 → 0.25.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.
Files changed (36) hide show
  1. package/README.md +7 -1
  2. package/dist/drivers/gearhub/hid.d.ts +21 -12
  3. package/dist/drivers/gearhub/hid.d.ts.map +1 -1
  4. package/dist/drivers/gearhub/hid.js +136 -23
  5. package/dist/drivers/gearhub/hid.js.map +1 -1
  6. package/dist/drivers/mouse-types.d.ts +1 -1
  7. package/dist/drivers/mouse-types.d.ts.map +1 -1
  8. package/dist/drivers/redragon/m690-pro-hid.d.ts +116 -0
  9. package/dist/drivers/redragon/m690-pro-hid.d.ts.map +1 -0
  10. package/dist/drivers/redragon/m690-pro-hid.js +482 -0
  11. package/dist/drivers/redragon/m690-pro-hid.js.map +1 -0
  12. package/dist/drivers/registry.d.ts +2 -1
  13. package/dist/drivers/registry.d.ts.map +1 -1
  14. package/dist/drivers/registry.js +5 -0
  15. package/dist/drivers/registry.js.map +1 -1
  16. package/dist/drivers/vendors.d.ts +6 -0
  17. package/dist/drivers/vendors.d.ts.map +1 -1
  18. package/dist/drivers/vendors.js +22 -3
  19. package/dist/drivers/vendors.js.map +1 -1
  20. package/dist/gearhub/index.d.ts +26 -6
  21. package/dist/gearhub/index.d.ts.map +1 -1
  22. package/dist/gearhub/index.js +43 -4
  23. package/dist/gearhub/index.js.map +1 -1
  24. package/dist/redragon/index.d.ts +1 -0
  25. package/dist/redragon/index.d.ts.map +1 -1
  26. package/dist/redragon/index.js +2 -27
  27. package/dist/redragon/index.js.map +1 -1
  28. package/dist/redragon/keys.d.ts +15 -0
  29. package/dist/redragon/keys.d.ts.map +1 -0
  30. package/dist/redragon/keys.js +42 -0
  31. package/dist/redragon/keys.js.map +1 -0
  32. package/dist/redragon/m690-pro.d.ts +210 -0
  33. package/dist/redragon/m690-pro.d.ts.map +1 -0
  34. package/dist/redragon/m690-pro.js +416 -0
  35. package/dist/redragon/m690-pro.js.map +1 -0
  36. package/package.json +1 -1
@@ -0,0 +1,116 @@
1
+ import type { MouseLighting, MouseStatus } from "../mouse-types.js";
2
+ /**
3
+ * Redragon M690 PRO (`258a:002e` cable, `258a:002f` 2.4 GHz receiver) WebHID
4
+ * control.
5
+ *
6
+ * SinoWealth framing (see `m690-pro.ts` in `@openmouse/protocol/redragon`):
7
+ * a command on feature report 5 selects what feature report 8 answers.
8
+ * Settings and buttons are each one block that is read, changed, and written
9
+ * back whole, in the vendor app's order (settings, then buttons with its `a5`
10
+ * trailer), then read back and compared. The cable and the receiver keep
11
+ * separate settings banks; each PID reads and writes its own, as the vendor
12
+ * app does.
13
+ *
14
+ * Through the receiver, the dongle answers reads even while the mouse is off
15
+ * (with the last values it holds), so link state comes from command 0x80 and
16
+ * writes are refused while the mouse is reported unreachable, as the vendor
17
+ * app does.
18
+ *
19
+ * Short answers (identify `0x01`, link `0x80`, battery `0x90`) come back on
20
+ * the 7-byte feature report 5, and the firmware STALLs that read unless it
21
+ * asks for exactly 8 bytes. Chrome asks for the device's largest feature
22
+ * report (520 bytes) on every read (captured over the cable), so in a browser
23
+ * those answers can be unreadable. The mouse is therefore identified from its
24
+ * settings block, and link and battery are read when the transport allows it
25
+ * and otherwise reported as unknown.
26
+ */
27
+ export declare class RedragonM690ProHidClient {
28
+ readonly device: HIDDevice;
29
+ private queue;
30
+ private identified;
31
+ /** Whether report-5 answers can be read here: null until the first try. */
32
+ private shortAnswers;
33
+ constructor(device: HIDDevice);
34
+ static isSupported(device: HIDDevice): boolean;
35
+ get supportedPollingRates(): number[];
36
+ getDpiOptions(): number[];
37
+ open(): Promise<void>;
38
+ close(): Promise<void>;
39
+ /**
40
+ * Reads everything the mouse can report. A device that cannot be opened
41
+ * still fails, but a settings read that fails (or a settings block that is
42
+ * not the M690 PRO's) gives an identity-only status with controls off, so
43
+ * the connection stays up and the next refresh can try again.
44
+ */
45
+ readStatus(): Promise<MouseStatus>;
46
+ private readFullStatus;
47
+ /** Snaps to the nearest vendor DPI value, writes it, and returns that value. */
48
+ setDpiStageValue(stage: number, dpi: number): Promise<number>;
49
+ /** Selects the active DPI stage (0-based), as the mouse's DPI buttons do. */
50
+ setActiveDpiStage(stage: number): Promise<number>;
51
+ setPollingRate(hz: number): Promise<number>;
52
+ /**
53
+ * Sets one stage's indicator colour (`#rrggbb`, 0-based stage), the
54
+ * contract of OpenMouse's `applyDpiStageColor`. OpenMouse currently calls it
55
+ * only when applying a saved game profile: the stage editor's per-stage
56
+ * colour picker was dropped in openmouse 0fc6ae1 ("unified stage-based DPI
57
+ * editor"), and works again unchanged if that picker returns.
58
+ */
59
+ setDpiStageColor(stage: number, color: string): Promise<void>;
60
+ /**
61
+ * Selects an effect and writes the brightness, speed and colour requested
62
+ * for it, as the panel shows them before Apply. A value left unset keeps
63
+ * what that effect has stored, except a stored brightness of 0, which would
64
+ * leave the chosen effect dark. Off is Steady at brightness 0, which keeps
65
+ * the colour.
66
+ */
67
+ setLighting(lighting: MouseLighting): Promise<void>;
68
+ /**
69
+ * Assigns an action from `buttonOptions` to one of the eight buttons.
70
+ * Refuses to take away the last left click, which would leave the mouse
71
+ * unable to click.
72
+ */
73
+ setButtonMapping(button: string, action: string): Promise<void>;
74
+ private lighting;
75
+ private product;
76
+ /**
77
+ * Opens the device and, once per connection, checks that its settings block
78
+ * is the M690 PRO's before anything is written (`258a:002f` is a generic
79
+ * SinoWealth receiver id). Returns the settings block it read for that,
80
+ * or null once the device is known.
81
+ */
82
+ private prepare;
83
+ private identify;
84
+ private unavailableStatus;
85
+ /** Receiver link state, or null when report-5 answers cannot be read here. */
86
+ private readLink;
87
+ private ensureLinked;
88
+ private readConfig;
89
+ private readButtons;
90
+ private writeConfig;
91
+ private writeButtons;
92
+ /**
93
+ * The vendor app's write: settings block, then button block with its
94
+ * trailer, both rewritten whole even when only one changed. Both are read
95
+ * back and must match before the change is reported as done.
96
+ */
97
+ private writeBlocks;
98
+ private sendBlock;
99
+ /**
100
+ * A short command answered on report 5, tried once: null when the answer
101
+ * cannot be read. After a first failure on a transport that never answered,
102
+ * later calls skip the doomed request (each one costs the mouse a STALL).
103
+ */
104
+ private shortCommand;
105
+ private readBlock;
106
+ /**
107
+ * Sends a block read command on report 5 and collects the block from
108
+ * `reportId`, re-sending the command if the block cannot be read yet or is
109
+ * not the one asked for. Only read commands go through here.
110
+ */
111
+ private request;
112
+ /** WebHID keeps or strips the report id depending on platform; normalise to "id first". */
113
+ private receive;
114
+ private run;
115
+ }
116
+ //# sourceMappingURL=m690-pro-hid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"m690-pro-hid.d.ts","sourceRoot":"","sources":["../../../src/drivers/redragon/m690-pro-hid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAqB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA4GvF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,wBAAwB;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,OAAO,CAAC,KAAK,CAAuC;IACpD,OAAO,CAAC,UAAU,CAAS;IAC3B,2EAA2E;IAC3E,OAAO,CAAC,YAAY,CAAwB;gBAEhC,MAAM,EAAE,SAAS;IAI7B,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO;IAO9C,IAAI,qBAAqB,IAAI,MAAM,EAAE,CAEpC;IAED,aAAa,IAAI,MAAM,EAAE;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B;;;;;OAKG;IACG,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC;YAW1B,cAAc;IA8D5B,gFAAgF;IAC1E,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMnE,6EAA6E;IACvE,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKjD,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKjD;;;;;;OAMG;IACG,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnE;;;;;;OAMG;IACG,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BzD;;;;OAIG;IACG,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUrE,OAAO,CAAC,QAAQ;IAuChB,OAAO,CAAC,OAAO;IAIf;;;;;OAKG;YACW,OAAO;YAKP,QAAQ;IAQtB,OAAO,CAAC,iBAAiB;IA4BzB,8EAA8E;YAChE,QAAQ;YAKR,YAAY;YAOZ,UAAU;YAIV,WAAW;YAIX,WAAW;YAIX,YAAY;IAI1B;;;;OAIG;YACW,WAAW;YAkBX,SAAS;IAKvB;;;;OAIG;YACW,YAAY;YAeZ,SAAS;IAOvB;;;;OAIG;YACW,OAAO;IAgBrB,2FAA2F;YAC7E,OAAO;YAUP,GAAG;CAKlB"}
@@ -0,0 +1,482 @@
1
+ import { REDRAGON_M690_PRO_BLOCK_REPORT_ID, REDRAGON_M690_PRO_BUTTON_OPTIONS, REDRAGON_M690_PRO_BUTTONS_LENGTH, REDRAGON_M690_PRO_BUTTONS_TRAILER, REDRAGON_M690_PRO_CMD_LINK, REDRAGON_M690_PRO_CMD_STATUS, REDRAGON_M690_PRO_COMMAND_REPORT_ID, REDRAGON_M690_PRO_CONFIG_LENGTH, REDRAGON_M690_PRO_DPI_LABELS, REDRAGON_M690_PRO_EFFECT_BREATHING, REDRAGON_M690_PRO_EFFECT_STEADY, REDRAGON_M690_PRO_EFFECT_STREAMING, REDRAGON_M690_PRO_POLLING_RATES, REDRAGON_M690_PRO_PRODUCTS, REDRAGON_M690_PRO_STAGE_COUNT, REDRAGON_M690_PRO_USAGE, REDRAGON_M690_PRO_USAGE_PAGE, REDRAGON_M690_PRO_VENDOR_ID, redragonM690ProCheckBlock, redragonM690ProCheckCommandReply, redragonM690ProDecodeButtons, redragonM690ProDecodeConfig, redragonM690ProDecodeLink, redragonM690ProDecodeStatus, redragonM690ProEncodeBlockWrite, redragonM690ProEncodeCommand, redragonM690ProIsModelBlock, redragonM690ProNearestDpi, redragonM690ProWithActiveStage, redragonM690ProWithButtonAction, redragonM690ProWithLighting, redragonM690ProWithPollingRate, redragonM690ProWithStageColor, redragonM690ProWithStageDpi, } from "@openmouse/protocol/redragon";
2
+ /** The vendor app reads an answer 50-60 ms after sending its command; match it. */
3
+ const COMMAND_DELAY_MS = 60;
4
+ /** Block reads are re-requested a few times before giving up; writes never are. */
5
+ const READ_ATTEMPTS = 3;
6
+ const READ_RETRY_DELAY_MS = 150;
7
+ /** The vendor app leaves 150-400 ms between the settings and button block writes. */
8
+ const BLOCK_WRITE_SETTLE_MS = 200;
9
+ const MODE_STATIC = "Static";
10
+ const MODE_WAVE = "Wave";
11
+ const MODE_BREATHING = "Breathing random";
12
+ const MODE_OFF = "Off";
13
+ const LIGHTING_MODES = [MODE_STATIC, MODE_WAVE, MODE_BREATHING, MODE_OFF];
14
+ /** The vendor sliders' five positions (Cfg.ini `LightUI`/`SpeedUI` 0-4); brightness 0 is Off. */
15
+ const BRIGHTNESS_PERCENT = [25, 50, 75, 100];
16
+ const SPEEDS = [1, 2, 3, 4, 5];
17
+ /**
18
+ * Shown for effects without a speed (Static, Off) so that switching to Wave or
19
+ * Breathing starts from a selected value: the factory speed byte 2, shown as 3.
20
+ */
21
+ const DEFAULT_SPEED = 3;
22
+ /**
23
+ * Shown when the stored brightness is 0 (Off, or an effect saved dark) so
24
+ * that switching to an effect starts from a selected value, and written when
25
+ * an effect stored at 0 is selected without one.
26
+ */
27
+ const DEFAULT_BRIGHTNESS = 50;
28
+ const LIGHTING_EFFECT_FOR_MODE = {
29
+ [MODE_STATIC]: REDRAGON_M690_PRO_EFFECT_STEADY,
30
+ [MODE_OFF]: REDRAGON_M690_PRO_EFFECT_STEADY,
31
+ [MODE_WAVE]: REDRAGON_M690_PRO_EFFECT_STREAMING,
32
+ [MODE_BREATHING]: REDRAGON_M690_PRO_EFFECT_BREATHING,
33
+ };
34
+ function hasVendorReports(collections, found = new Set()) {
35
+ for (const collection of collections) {
36
+ if (collection.usagePage === REDRAGON_M690_PRO_USAGE_PAGE && collection.usage === REDRAGON_M690_PRO_USAGE) {
37
+ for (const report of collection.featureReports ?? [])
38
+ found.add(report.reportId);
39
+ }
40
+ hasVendorReports(collection.children ?? [], found);
41
+ }
42
+ return found;
43
+ }
44
+ function toHexColor({ r, g, b }) {
45
+ return `#${[r, g, b].map((byte) => byte.toString(16).padStart(2, "0")).join("")}`;
46
+ }
47
+ function parseColor(color) {
48
+ const match = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);
49
+ if (!match)
50
+ throw new Error(`Redragon M690 PRO colour "${color}" is not #rrggbb.`);
51
+ return { r: parseInt(match[1], 16), g: parseInt(match[2], 16), b: parseInt(match[3], 16) };
52
+ }
53
+ function sameBytes(a, b) {
54
+ return a.length === b.length && a.every((byte, index) => byte === b[index]);
55
+ }
56
+ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
57
+ class NotM690ProError extends Error {
58
+ constructor() {
59
+ super("This SinoWealth device's settings block is not the Redragon M690 PRO's; not touching it.");
60
+ }
61
+ }
62
+ /**
63
+ * Redragon M690 PRO (`258a:002e` cable, `258a:002f` 2.4 GHz receiver) WebHID
64
+ * control.
65
+ *
66
+ * SinoWealth framing (see `m690-pro.ts` in `@openmouse/protocol/redragon`):
67
+ * a command on feature report 5 selects what feature report 8 answers.
68
+ * Settings and buttons are each one block that is read, changed, and written
69
+ * back whole, in the vendor app's order (settings, then buttons with its `a5`
70
+ * trailer), then read back and compared. The cable and the receiver keep
71
+ * separate settings banks; each PID reads and writes its own, as the vendor
72
+ * app does.
73
+ *
74
+ * Through the receiver, the dongle answers reads even while the mouse is off
75
+ * (with the last values it holds), so link state comes from command 0x80 and
76
+ * writes are refused while the mouse is reported unreachable, as the vendor
77
+ * app does.
78
+ *
79
+ * Short answers (identify `0x01`, link `0x80`, battery `0x90`) come back on
80
+ * the 7-byte feature report 5, and the firmware STALLs that read unless it
81
+ * asks for exactly 8 bytes. Chrome asks for the device's largest feature
82
+ * report (520 bytes) on every read (captured over the cable), so in a browser
83
+ * those answers can be unreadable. The mouse is therefore identified from its
84
+ * settings block, and link and battery are read when the transport allows it
85
+ * and otherwise reported as unknown.
86
+ */
87
+ export class RedragonM690ProHidClient {
88
+ device;
89
+ queue = Promise.resolve();
90
+ identified = false;
91
+ /** Whether report-5 answers can be read here: null until the first try. */
92
+ shortAnswers = null;
93
+ constructor(device) {
94
+ this.device = device;
95
+ }
96
+ static isSupported(device) {
97
+ if (device.vendorId !== REDRAGON_M690_PRO_VENDOR_ID)
98
+ return false;
99
+ if (!REDRAGON_M690_PRO_PRODUCTS.has(device.productId))
100
+ return false;
101
+ const reports = hasVendorReports(device.collections);
102
+ return reports.has(REDRAGON_M690_PRO_BLOCK_REPORT_ID) && reports.has(REDRAGON_M690_PRO_COMMAND_REPORT_ID);
103
+ }
104
+ get supportedPollingRates() {
105
+ return [...REDRAGON_M690_PRO_POLLING_RATES];
106
+ }
107
+ getDpiOptions() {
108
+ return [...REDRAGON_M690_PRO_DPI_LABELS];
109
+ }
110
+ async open() {
111
+ if (!this.device.opened)
112
+ await this.device.open();
113
+ }
114
+ async close() {
115
+ if (this.device.opened)
116
+ await this.device.close();
117
+ }
118
+ /**
119
+ * Reads everything the mouse can report. A device that cannot be opened
120
+ * still fails, but a settings read that fails (or a settings block that is
121
+ * not the M690 PRO's) gives an identity-only status with controls off, so
122
+ * the connection stays up and the next refresh can try again.
123
+ */
124
+ async readStatus() {
125
+ return await this.run(async () => {
126
+ await this.open();
127
+ try {
128
+ return await this.readFullStatus();
129
+ }
130
+ catch (error) {
131
+ return this.unavailableStatus(error);
132
+ }
133
+ });
134
+ }
135
+ async readFullStatus() {
136
+ const block = await this.identify() ?? await this.readConfig();
137
+ const product = this.product();
138
+ const wireless = product.connection === "Wireless";
139
+ const linked = wireless ? await this.readLink() : true;
140
+ const config = redragonM690ProDecodeConfig(block);
141
+ const buttons = redragonM690ProDecodeButtons(await this.readButtons());
142
+ const statusReply = await this.shortCommand(REDRAGON_M690_PRO_CMD_STATUS);
143
+ const status = statusReply ? redragonM690ProDecodeStatus(statusReply) : null;
144
+ const stages = config.stages.map((dpi) => dpi ?? 0);
145
+ const name = `Redragon ${product.name}`;
146
+ return {
147
+ brand: "Redragon",
148
+ name,
149
+ ui: {
150
+ family: "redragon-m690-pro",
151
+ settingsReady: true,
152
+ valuesVerified: true,
153
+ hideUnsupportedPollingRates: true,
154
+ hideProcessingCard: true,
155
+ dpiStageEditor: {
156
+ maxStages: REDRAGON_M690_PRO_STAGE_COUNT,
157
+ countEditable: false,
158
+ minDpi: REDRAGON_M690_PRO_DPI_LABELS[0],
159
+ maxDpi: REDRAGON_M690_PRO_DPI_LABELS[REDRAGON_M690_PRO_DPI_LABELS.length - 1],
160
+ stepDpi: 50,
161
+ },
162
+ defaultDisplayName: name,
163
+ ...(linked === false ? {
164
+ statusNote: "The mouse is off or asleep: the receiver shows its last values, and changes need the mouse awake.",
165
+ } : wireless && linked === null ? {
166
+ // A browser cannot read the battery or link answers (see the class
167
+ // comment); OpenMouse Bridge can. Without the link check, a change
168
+ // made while the mouse is off is undone when it reconnects
169
+ // (captured), because the receiver only holds a copy.
170
+ statusNote: "Battery level and the awake check need OpenMouse Bridge. Without it, changes made while the mouse is off or asleep are undone when it reconnects.",
171
+ } : !wireless && status === null ? {
172
+ statusNote: "Charging status needs OpenMouse Bridge.",
173
+ } : {}),
174
+ },
175
+ batteryPercent: linked === false ? null : status?.batteryPercent ?? null,
176
+ batteryState: linked !== false && status?.charge ? status.charge : "Unknown",
177
+ dpi: stages[config.activeStage] ?? stages[0],
178
+ dpiStages: stages,
179
+ dpiStageColors: config.stageColors.map(toHexColor),
180
+ activeDpiStage: config.activeStage,
181
+ pollingRateHz: config.pollingHz ?? 0,
182
+ supportedPollingRates: this.supportedPollingRates,
183
+ activeProfile: null,
184
+ buttonMappings: buttons,
185
+ buttonOptions: [...REDRAGON_M690_PRO_BUTTON_OPTIONS],
186
+ fixedButtons: Object.entries(buttons)
187
+ .filter(([, action]) => !REDRAGON_M690_PRO_BUTTON_OPTIONS.includes(action))
188
+ .map(([button]) => button),
189
+ lighting: this.lighting(config),
190
+ connectionType: product.connection,
191
+ connectionDetail: wireless ? (linked === false ? "2.4 GHz receiver, mouse off or asleep" : "2.4 GHz receiver") : "USB cable",
192
+ liftOffDistance: null,
193
+ firmware: [],
194
+ };
195
+ }
196
+ /** Snaps to the nearest vendor DPI value, writes it, and returns that value. */
197
+ async setDpiStageValue(stage, dpi) {
198
+ const label = redragonM690ProNearestDpi(dpi);
199
+ await this.writeConfig((block) => redragonM690ProWithStageDpi(block, stage, label));
200
+ return label;
201
+ }
202
+ /** Selects the active DPI stage (0-based), as the mouse's DPI buttons do. */
203
+ async setActiveDpiStage(stage) {
204
+ await this.writeConfig((block) => redragonM690ProWithActiveStage(block, stage));
205
+ return stage;
206
+ }
207
+ async setPollingRate(hz) {
208
+ await this.writeConfig((block) => redragonM690ProWithPollingRate(block, hz));
209
+ return hz;
210
+ }
211
+ /**
212
+ * Sets one stage's indicator colour (`#rrggbb`, 0-based stage), the
213
+ * contract of OpenMouse's `applyDpiStageColor`. OpenMouse currently calls it
214
+ * only when applying a saved game profile: the stage editor's per-stage
215
+ * colour picker was dropped in openmouse 0fc6ae1 ("unified stage-based DPI
216
+ * editor"), and works again unchanged if that picker returns.
217
+ */
218
+ async setDpiStageColor(stage, color) {
219
+ const rgb = parseColor(color);
220
+ await this.writeConfig((block) => redragonM690ProWithStageColor(block, stage, rgb));
221
+ }
222
+ /**
223
+ * Selects an effect and writes the brightness, speed and colour requested
224
+ * for it, as the panel shows them before Apply. A value left unset keeps
225
+ * what that effect has stored, except a stored brightness of 0, which would
226
+ * leave the chosen effect dark. Off is Steady at brightness 0, which keeps
227
+ * the colour.
228
+ */
229
+ async setLighting(lighting) {
230
+ const effect = lighting.mode ? LIGHTING_EFFECT_FOR_MODE[lighting.mode] : undefined;
231
+ if (effect === undefined)
232
+ throw new Error(`The Redragon M690 PRO has no "${lighting.mode}" lighting effect.`);
233
+ if (lighting.speed != null && !SPEEDS.includes(lighting.speed)) {
234
+ throw new Error(`Redragon M690 PRO lighting speed ${lighting.speed} is outside 1-${SPEEDS.length}.`);
235
+ }
236
+ if (lighting.brightness != null && !BRIGHTNESS_PERCENT.includes(lighting.brightness)) {
237
+ throw new Error(`Redragon M690 PRO brightness ${lighting.brightness}% is not one of ${BRIGHTNESS_PERCENT.join(", ")}.`);
238
+ }
239
+ const color = lighting.color == null ? null : parseColor(lighting.color);
240
+ await this.writeConfig((block) => {
241
+ const config = redragonM690ProDecodeConfig(block);
242
+ const change = { effect };
243
+ if (lighting.mode === MODE_OFF) {
244
+ change.brightness = 0;
245
+ }
246
+ else {
247
+ const stored = effect === REDRAGON_M690_PRO_EFFECT_STEADY ? config.lighting.steady.brightness
248
+ : effect === REDRAGON_M690_PRO_EFFECT_STREAMING ? config.lighting.streaming.brightness
249
+ : config.lighting.breathing.brightness;
250
+ if (lighting.brightness != null) {
251
+ change.brightness = BRIGHTNESS_PERCENT.indexOf(lighting.brightness) + 1;
252
+ }
253
+ else if (stored === 0) {
254
+ change.brightness = BRIGHTNESS_PERCENT.indexOf(DEFAULT_BRIGHTNESS) + 1;
255
+ }
256
+ if (effect !== REDRAGON_M690_PRO_EFFECT_STEADY && lighting.speed != null)
257
+ change.speed = lighting.speed - 1;
258
+ if (effect === REDRAGON_M690_PRO_EFFECT_STEADY && color)
259
+ change.color = color;
260
+ }
261
+ return redragonM690ProWithLighting(block, change);
262
+ });
263
+ }
264
+ /**
265
+ * Assigns an action from `buttonOptions` to one of the eight buttons.
266
+ * Refuses to take away the last left click, which would leave the mouse
267
+ * unable to click.
268
+ */
269
+ async setButtonMapping(button, action) {
270
+ await this.writeButtons((block) => {
271
+ const next = redragonM690ProWithButtonAction(block, button, action);
272
+ if (!Object.values(redragonM690ProDecodeButtons(next)).includes("Left click")) {
273
+ throw new Error("Keep Left click on at least one button, or the mouse cannot click.");
274
+ }
275
+ return next;
276
+ });
277
+ }
278
+ lighting(config) {
279
+ const { effect, steady, streaming, breathing, steadyColors } = config.lighting;
280
+ let mode = null;
281
+ let brightness = 0;
282
+ let speed = null;
283
+ if (effect === REDRAGON_M690_PRO_EFFECT_STEADY && steady.brightness === 0) {
284
+ mode = MODE_OFF;
285
+ }
286
+ else if (effect === REDRAGON_M690_PRO_EFFECT_STEADY) {
287
+ mode = MODE_STATIC;
288
+ brightness = steady.brightness;
289
+ }
290
+ else if (effect === REDRAGON_M690_PRO_EFFECT_STREAMING) {
291
+ mode = MODE_WAVE;
292
+ brightness = streaming.brightness;
293
+ speed = streaming.speed;
294
+ }
295
+ else if (effect === REDRAGON_M690_PRO_EFFECT_BREATHING) {
296
+ mode = MODE_BREATHING;
297
+ brightness = breathing.brightness;
298
+ speed = breathing.speed;
299
+ }
300
+ const color = steadyColors[steady.slot] ?? null;
301
+ return {
302
+ zone: "Mouse",
303
+ modes: LIGHTING_MODES,
304
+ mode,
305
+ color: color ? toHexColor(color) : null,
306
+ color2: null,
307
+ colorModes: [MODE_STATIC],
308
+ dualColorModes: [],
309
+ reactiveModes: [MODE_WAVE, MODE_BREATHING],
310
+ speeds: SPEEDS,
311
+ speed: speed !== null && speed < SPEEDS.length ? speed + 1 : DEFAULT_SPEED,
312
+ brightness: BRIGHTNESS_PERCENT[brightness - 1] ?? DEFAULT_BRIGHTNESS,
313
+ // Always offered: OpenMouse shows brightness from the effect the mouse
314
+ // reports, not the one just picked, so varying it would hide it on Static
315
+ // after Off and show it on Off after Breathing. Off ignores it.
316
+ brightnessLevels: [...BRIGHTNESS_PERCENT],
317
+ };
318
+ }
319
+ product() {
320
+ return REDRAGON_M690_PRO_PRODUCTS.get(this.device.productId);
321
+ }
322
+ /**
323
+ * Opens the device and, once per connection, checks that its settings block
324
+ * is the M690 PRO's before anything is written (`258a:002f` is a generic
325
+ * SinoWealth receiver id). Returns the settings block it read for that,
326
+ * or null once the device is known.
327
+ */
328
+ async prepare() {
329
+ await this.open();
330
+ return await this.identify();
331
+ }
332
+ async identify() {
333
+ if (this.identified)
334
+ return null;
335
+ const block = await this.readConfig();
336
+ if (!redragonM690ProIsModelBlock(block))
337
+ throw new NotM690ProError();
338
+ this.identified = true;
339
+ return block;
340
+ }
341
+ unavailableStatus(error) {
342
+ const product = this.product();
343
+ const name = `Redragon ${product.name}`;
344
+ const statusNote = error instanceof NotM690ProError
345
+ ? "This device's settings block is not the Redragon M690 PRO's, so its settings are left alone."
346
+ : `The Redragon M690 PRO's settings could not be read (${error instanceof Error ? error.message : String(error)}); OpenMouse keeps trying.`;
347
+ return {
348
+ brand: "Redragon",
349
+ name: error instanceof NotM690ProError ? this.device.productName?.trim() || name : name,
350
+ ui: {
351
+ family: "redragon-m690-pro",
352
+ settingsReady: false,
353
+ valuesVerified: false,
354
+ hideProcessingCard: true,
355
+ defaultDisplayName: name,
356
+ statusNote,
357
+ },
358
+ batteryPercent: null,
359
+ batteryState: "Unknown",
360
+ dpi: 0,
361
+ pollingRateHz: 0,
362
+ activeProfile: null,
363
+ connectionType: product.connection,
364
+ liftOffDistance: null,
365
+ firmware: [],
366
+ };
367
+ }
368
+ /** Receiver link state, or null when report-5 answers cannot be read here. */
369
+ async readLink() {
370
+ const reply = await this.shortCommand(REDRAGON_M690_PRO_CMD_LINK);
371
+ return reply ? redragonM690ProDecodeLink(reply) : null;
372
+ }
373
+ async ensureLinked() {
374
+ if (this.product().connection !== "Wireless")
375
+ return;
376
+ if (await this.readLink() === false) {
377
+ throw new Error("The Redragon M690 PRO is off or asleep. Move it or switch it on, then try again.");
378
+ }
379
+ }
380
+ async readConfig() {
381
+ return await this.readBlock(this.product().configCommand, REDRAGON_M690_PRO_CONFIG_LENGTH);
382
+ }
383
+ async readButtons() {
384
+ return await this.readBlock(this.product().buttonsCommand, REDRAGON_M690_PRO_BUTTONS_LENGTH);
385
+ }
386
+ async writeConfig(change) {
387
+ await this.writeBlocks(change, (block) => block);
388
+ }
389
+ async writeButtons(change) {
390
+ await this.writeBlocks((block) => block, change);
391
+ }
392
+ /**
393
+ * The vendor app's write: settings block, then button block with its
394
+ * trailer, both rewritten whole even when only one changed. Both are read
395
+ * back and must match before the change is reported as done.
396
+ */
397
+ async writeBlocks(changeConfig, changeButtons) {
398
+ await this.run(async () => {
399
+ await this.prepare();
400
+ await this.ensureLinked();
401
+ const config = changeConfig(await this.readConfig());
402
+ const buttons = changeButtons(await this.readButtons());
403
+ await this.sendBlock(redragonM690ProEncodeBlockWrite(config, REDRAGON_M690_PRO_CONFIG_LENGTH));
404
+ await this.sendBlock(redragonM690ProEncodeBlockWrite(buttons, REDRAGON_M690_PRO_BUTTONS_LENGTH, REDRAGON_M690_PRO_BUTTONS_TRAILER));
405
+ const [configBack, buttonsBack] = [await this.readConfig(), await this.readButtons()];
406
+ if (!sameBytes(configBack, config) || !sameBytes(buttonsBack, buttons)) {
407
+ throw new Error("The Redragon M690 PRO did not keep the new settings (read-back differs).");
408
+ }
409
+ });
410
+ }
411
+ async sendBlock(frame) {
412
+ await this.device.sendFeatureReport(REDRAGON_M690_PRO_BLOCK_REPORT_ID, frame.slice(1).buffer);
413
+ await sleep(BLOCK_WRITE_SETTLE_MS);
414
+ }
415
+ /**
416
+ * A short command answered on report 5, tried once: null when the answer
417
+ * cannot be read. After a first failure on a transport that never answered,
418
+ * later calls skip the doomed request (each one costs the mouse a STALL).
419
+ */
420
+ async shortCommand(command) {
421
+ if (this.shortAnswers === false)
422
+ return null;
423
+ try {
424
+ await this.device.sendFeatureReport(REDRAGON_M690_PRO_COMMAND_REPORT_ID, redragonM690ProEncodeCommand(command).slice(1).buffer);
425
+ await sleep(COMMAND_DELAY_MS);
426
+ const reply = await this.receive(REDRAGON_M690_PRO_COMMAND_REPORT_ID);
427
+ redragonM690ProCheckCommandReply(reply, command);
428
+ this.shortAnswers = true;
429
+ return reply;
430
+ }
431
+ catch {
432
+ if (this.shortAnswers === null)
433
+ this.shortAnswers = false;
434
+ return null;
435
+ }
436
+ }
437
+ async readBlock(command, length) {
438
+ return await this.request(command, REDRAGON_M690_PRO_BLOCK_REPORT_ID, (block) => {
439
+ redragonM690ProCheckBlock(block, command, length);
440
+ return block.slice(0, length);
441
+ });
442
+ }
443
+ /**
444
+ * Sends a block read command on report 5 and collects the block from
445
+ * `reportId`, re-sending the command if the block cannot be read yet or is
446
+ * not the one asked for. Only read commands go through here.
447
+ */
448
+ async request(command, reportId, accept) {
449
+ let failure = null;
450
+ for (let attempt = 0; attempt < READ_ATTEMPTS; attempt++) {
451
+ if (attempt > 0)
452
+ await sleep(READ_RETRY_DELAY_MS);
453
+ try {
454
+ await this.device.sendFeatureReport(REDRAGON_M690_PRO_COMMAND_REPORT_ID, redragonM690ProEncodeCommand(command).slice(1).buffer);
455
+ await sleep(COMMAND_DELAY_MS);
456
+ return accept(await this.receive(reportId));
457
+ }
458
+ catch (error) {
459
+ failure = error;
460
+ }
461
+ }
462
+ const reason = failure instanceof Error ? failure.message : String(failure);
463
+ throw new Error(`The Redragon M690 PRO did not answer command 0x${command.toString(16).padStart(2, "0")} on report ${reportId} (${reason}).`);
464
+ }
465
+ /** WebHID keeps or strips the report id depending on platform; normalise to "id first". */
466
+ async receive(reportId) {
467
+ const view = await this.device.receiveFeatureReport(reportId);
468
+ const bytes = new Uint8Array(view.buffer.slice(view.byteOffset, view.byteOffset + view.byteLength));
469
+ if (bytes[0] === reportId)
470
+ return bytes;
471
+ const out = new Uint8Array(bytes.length + 1);
472
+ out[0] = reportId;
473
+ out.set(bytes, 1);
474
+ return out;
475
+ }
476
+ async run(operation) {
477
+ const result = this.queue.then(operation, operation);
478
+ this.queue = result.then(() => undefined, () => undefined);
479
+ return await result;
480
+ }
481
+ }
482
+ //# sourceMappingURL=m690-pro-hid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"m690-pro-hid.js","sourceRoot":"","sources":["../../../src/drivers/redragon/m690-pro-hid.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iCAAiC,EACjC,gCAAgC,EAChC,gCAAgC,EAChC,iCAAiC,EACjC,0BAA0B,EAC1B,4BAA4B,EAC5B,mCAAmC,EACnC,+BAA+B,EAC/B,4BAA4B,EAC5B,kCAAkC,EAClC,+BAA+B,EAC/B,kCAAkC,EAClC,+BAA+B,EAC/B,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,4BAA4B,EAC5B,2BAA2B,EAC3B,yBAAyB,EACzB,gCAAgC,EAChC,4BAA4B,EAC5B,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,EAC/B,4BAA4B,EAC5B,2BAA2B,EAC3B,yBAAyB,EACzB,8BAA8B,EAC9B,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,6BAA6B,EAC7B,2BAA2B,GAK5B,MAAM,8BAA8B,CAAC;AAEtC,mFAAmF;AACnF,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,mFAAmF;AACnF,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,qFAAqF;AACrF,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,MAAM,WAAW,GAAsB,QAAQ,CAAC;AAChD,MAAM,SAAS,GAAsB,MAAM,CAAC;AAC5C,MAAM,cAAc,GAAsB,kBAAkB,CAAC;AAC7D,MAAM,QAAQ,GAAsB,KAAK,CAAC;AAC1C,MAAM,cAAc,GAAiC,CAAC,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;AACxG,iGAAiG;AACjG,M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CAAC,MAAM,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QAC9D,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QACpG,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QACxC,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC7C,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC;QAClB,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAClB,OAAO,GAAG,CAAC;IACb,CAAC;IAEO,KAAK,CAAC,GAAG,CAAI,SAA2B;QAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC3D,OAAO,MAAM,MAAM,CAAC;IACtB,CAAC;CACF"}
@@ -62,6 +62,7 @@ import { MicrosoftHidClient } from "./microsoft/hid.ts";
62
62
  import { MotospeedHidClient } from "./motospeed/hid.ts";
63
63
  import { DareuHidClient } from "./dareu/hid.ts";
64
64
  import { RedragonHidClient } from "./redragon/hid.ts";
65
+ import { RedragonM690ProHidClient } from "./redragon/m690-pro-hid.ts";
65
66
  import { FaterHidClient } from "./fater/hid.ts";
66
67
  import { IncottHidClient } from "./incott/hid.ts";
67
68
  import { HyperXHidClient } from "./hyperx/hid.ts";
@@ -71,7 +72,7 @@ import { BytechHidClient } from "./bytech/hid.ts";
71
72
  import { RapooHidClient } from "./rapoo/hid.ts";
72
73
  import { CoolerMasterHidClient } from "./coolermaster/hid.ts";
73
74
  export type PulsarClient = PulsarHidClient | PulsarProHidClient | PulsarXs1HidClient;
74
- export type SupportedClient = RawmHidClient | MotospeedHidClient | LogitechHidppClient | PulsarClient | EggOp1HidClient | EggWeHidClient | FinalmouseHidClient | WLMouseHidClient | WLMouseBeastX4kHidClient | LamzuHidClient | LamzuAtlantisHidClient | OrbitalHidClient | RazerHidClient | RazerViperHidClient | RazerViperMiniHidClient | RazerViperV4ProHidClient | RazerCobraHidClient | TeevolutionHidClient | AtkHidClient | AtkBitmouseHidClient | VgnF2HidClient | VaxeeHidClient | Keychron8kHidClient | Keychron1kHidClient | Keychron4kHidClient | Keychron8kNordicHidClient | KeychronNapeHidClient | ModdoHidClient | NinjutsoHidClient | ZaunkoenigHidClient | CorsairHidClient | AttackSharkHidClient | FantechHidClient | GearHubHidClient | WootingHidClient | WallhackMouseHidClient | WallhackKeyboardHidClient | GWolvesHidClient | GWolvesXviHidClient | SteelSeriesRival3HidClient | SteelSeriesAerox3HidClient | SteelSeriesAerox3WirelessHidClient | SteelSeriesRival3WirelessHidClient | SteelSeriesAerox5HidClient | SteelSeriesAerox5WirelessHidClient | SteelSeriesRival650HidClient | SteelSeriesAerox9WirelessHidClient | SteelSeriesRival310HidClient | SteelSeriesPrimePlusHidClient | SteelSeriesPrimeMiniWirelessHidClient | SteelSeriesSenseiTenHidClient | GloriousHidClient | GloriousClassicHidClient | MchoseHidClient | MchoseDockHidClient | MchoseA5ProMaxHidClient | KsnakeHidClient | MicrosoftHidClient | DareuHidClient | RedragonHidClient | IncottHidClient | HyperXHidClient | MchoseV3HidClient | AsusHidClient | KyuProMx1Client | DeluxHidClient | BytechHidClient | RapooHidClient | FaterHidClient | CoolerMasterHidClient;
75
+ export type SupportedClient = RawmHidClient | MotospeedHidClient | LogitechHidppClient | PulsarClient | EggOp1HidClient | EggWeHidClient | FinalmouseHidClient | WLMouseHidClient | WLMouseBeastX4kHidClient | LamzuHidClient | LamzuAtlantisHidClient | OrbitalHidClient | RazerHidClient | RazerViperHidClient | RazerViperMiniHidClient | RazerViperV4ProHidClient | RazerCobraHidClient | TeevolutionHidClient | AtkHidClient | AtkBitmouseHidClient | VgnF2HidClient | VaxeeHidClient | Keychron8kHidClient | Keychron1kHidClient | Keychron4kHidClient | Keychron8kNordicHidClient | KeychronNapeHidClient | ModdoHidClient | NinjutsoHidClient | ZaunkoenigHidClient | CorsairHidClient | AttackSharkHidClient | FantechHidClient | GearHubHidClient | WootingHidClient | WallhackMouseHidClient | WallhackKeyboardHidClient | GWolvesHidClient | GWolvesXviHidClient | SteelSeriesRival3HidClient | SteelSeriesAerox3HidClient | SteelSeriesAerox3WirelessHidClient | SteelSeriesRival3WirelessHidClient | SteelSeriesAerox5HidClient | SteelSeriesAerox5WirelessHidClient | SteelSeriesRival650HidClient | SteelSeriesAerox9WirelessHidClient | SteelSeriesRival310HidClient | SteelSeriesPrimePlusHidClient | SteelSeriesPrimeMiniWirelessHidClient | SteelSeriesSenseiTenHidClient | GloriousHidClient | GloriousClassicHidClient | MchoseHidClient | MchoseDockHidClient | MchoseA5ProMaxHidClient | KsnakeHidClient | MicrosoftHidClient | DareuHidClient | RedragonHidClient | RedragonM690ProHidClient | IncottHidClient | HyperXHidClient | MchoseV3HidClient | AsusHidClient | KyuProMx1Client | DeluxHidClient | BytechHidClient | RapooHidClient | FaterHidClient | CoolerMasterHidClient;
75
76
  export interface DeviceDriver {
76
77
  brand: string;
77
78
  supports(device: HIDDevice): boolean;