Skip to content

feat(vgn): add F2 Master Plus support - #14

Merged
snekxs merged 2 commits into
OpenMouse-Project:mainfrom
nguyenan1601:main
Aug 4, 2026
Merged

feat(vgn): add F2 Master Plus support#14
snekxs merged 2 commits into
OpenMouse-Project:mainfrom
nguyenan1601:main

Conversation

@nguyenan1601

Copy link
Copy Markdown
Contributor

No description provided.

CopilotAI review requested due to automatic review settings August 3, 2026 06:20

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial WebHID support for the VGN Dragonfly F2 Master+ (“8K protocol”), wiring the new driver into the existing control UI and extending the Node-based test suite to cover the new protocol/client.

Changes:

  • Introduce a VGN F2 protocol codec (payload building, checksums, DPI/polling/sleep decoding).
  • Add a VgnF2HidClient WebHID client and integrate it into device detection, selection, and UI rendering in control.ts.
  • Update TypeScript/test tooling to typecheck and run the new .test.ts files (including enabling .ts import specifiers).

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
tsconfig.jsonEnables .ts import specifiers and typechecks tests under src/.
src/vgn-f2-protocol.tsImplements the VGN F2 report format, checksums, and profile decoding.
src/vgn-f2-protocol.test.tsAdds captured-payload and codec round-trip tests for the protocol helpers.
src/vgn-f2-hid.tsAdds a WebHID client for the F2 Master+ and exposes status + settings writes.
src/vgn-f2-hid.test.tsTests basic support detection and transport metadata behavior.
src/vendors.tsAdds VGN VID and filters for the supported receiver/wired PIDs.
src/mouse-types.tsExtends MouseStatus.brand to include "VGN".
src/control.tsIntegrates VGN client into connection flow, UI rendering, and settings application paths.
package.jsonExtends the test script to run the new VGN tests; adds @types/node.
package-lock.jsonLocks @types/node (and transitive undici-types).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +150 to +153
const flags = stage[2]! & 0xff;
const checksum = stage[3]! & 0xff;
if (low !== duplicate || ((low + duplicate + flags + checksum) & 0xff) !== 0x55) return null;
return ((((flags >> 2) & 0x03) << 8) + low + 1) * 50;
@snekxs
snekxs merged commit 7146c7c into OpenMouse-Project:mainAug 4, 2026
snekxs added a commit that referenced this pull request Aug 4, 2026
This reverts commit 7146c7c, reversing
changes made to 9a77164.
snekxs added a commit that referenced this pull request Aug 4, 2026
snekxs added a commit that referenced this pull request Aug 4, 2026
snekxs added a commit that referenced this pull request Aug 11, 2026
* fix(egg): correct 8K profiles and config transport
Model each supported wired EGG 8K mouse explicitly and make config exchange match the A0/A1 feature-report framing used by the devices.
- Add profiles for OP1 8K, XM2 8K, OP1 8K Purple Frost, OP1 8K v2, and XM2 8K v2.
- Define model-specific CPI ranges, CPI steps, LOD options, and 8K Motion Sync support.
- Clamp custom DPI and CPI-stage input to values supported by the active model.
- Read and update the active CPI stage instead of assuming the first stage.
- Decode both firmware version bytes as BCD, including V1.07 and V1.37.
- Preserve firmware response alignment when WebHID includes the report ID.
- Ignore short command acknowledgements while waiting for firmware version data.
- Normalize A0 and A1 responses without shifting documented config offsets.
- Retry config reads and writes, validate response frames, and require write acknowledgements.
- Preserve unknown config bytes with read-modify-write updates and verify stored values.
- Keep EGG-only status fields in the EGG protocol module.
- Cover model capabilities, CPI clamping, LOD options, firmware parsing, and report normalization with tests.
* fix(egg): correct 8K button records and mappings
Match the seven logical button records and shifted mapping layout used by the EGG 8K firmware and stock configuration tools.
- Use the correct mapping offsets for Right, Middle, Forward, Back, Wheel Up, and Wheel Down.
- Leave the hidden firmware mapping record unchanged.
- Decode and expose all seven logical button actions.
- Add left-handed mode while keeping the physical primary button fixed.
- Support mouse, scroll, keyboard, CPI, media, browser, system, and disabled actions.
- Clamp fixed-CPI mapping values to the range and steps supported by the active model.
- Preserve unknown mapping bytes until the user selects a supported replacement.
- Keep EGG button action types in the EGG protocol module.
- Cover button offsets and action encoding round trips with tests.
* feat(egg): add PAW3950 and v2 sensor controls
Expose the sensor controls that differ across the supported EGG 8K models while retaining the restrictions required by PAW3395 devices.
- Add Glass Mode for OP1 8K Purple Frost, OP1 8K v2, and XM2 8K v2.
- Add sensor angle tuning, maximum sensor FPS, and lift-off LED control for v2 models.
- Disable the custom polling divider while Glass Mode controls it.
- Block Motion Sync at 8K only on PAW3395 OP1 8K and XM2 8K models.
- Keep Motion Sync available at 8K on PAW3950 models.
- Add config reload and confirmed factory reset actions.
* feat: redesign OpenMouse interface
* feat(vgn): add F2 Master Plus support
* Revert "Merge pull request #14 from nguyenan1601/main"
This reverts commit 7146c7c, reversing
changes made to 9a77164.
* Revert "Merge pull request #13 from AntiParty/ui/neutral-redesign"
This reverts commit 9a77164, reversing
changes made to cb51245.
* Reapply "Merge pull request #14 from nguyenan1601/main"
This reverts commit b88b7be.
* Revert "Reapply "Merge pull request #14 from nguyenan1601/main""
This reverts commit 04cd73d.
* Update GitHub link to new repository
* feat: add Mouse Check HID diagnostics page
Adds a new /check.html page for browser-based gaming mouse diagnostics:
- Detects 24 gaming mouse brands via WebHID (Razer, Logitech,
SteelSeries, Corsair, HyperX, Finalmouse, Pulsar, Endgame Gear,
WLMouse, ATK, Lamzu, VGN, Zowie, Roccat, ASUS ROG, Redragon...)
- Full Razer TX-ID protocol test (0xFF / 0x3F / 0x1F) with firmware
version readout
- WebHID verdict per device: FULL / PARTIAL / LIMITED / NATIVE ONLY
- OpenMouse badge for devices already supported in the control app
- Copy-for-Discord button with formatted diagnostic report
- Sidebar link in control app pointing to /check.html
- Registered as Vite build entry in vite.config.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: skip feature-report probe for Endgame Gear devices
EGG OP1 8K (VID 0x3367) has no firmware safety guards — sending
unrecognised feature-report bytes accidentally triggered a bootloader
reset. Skip raw probing for this vendor and report interface
accessibility only.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: qsxcv <qsxcv@users.noreply.github.com>
Co-authored-by: Snekxs <26660858+snekxs@users.noreply.github.com>
Co-authored-by: Antiparty <tyorieux@gmail.com>
Co-authored-by: Nguyen Phu An <nguyenanhp04@gmail.com>
Co-authored-by: Nguyen Phu An <118560601+nguyenan1601@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: OpenMouse Maintainers <26660858+OpenMouse-Project@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@nguyenan1601@snekxs