feat(pulsar): Pulsar 4K receiver support with corrected DPI encoding - #20
Merged
Conversation
The Pulsar 4K Wireless Receiver enumerates under VID 0x3554 (shared with Teevolution and VGN) and speaks the same report-8 16-byte protocol as Pulsar receivers, so PulsarHidClient accepts it. Product ids already claimed by the Teevolution and VGN drivers stay with those drivers, and the broad VID-only filter keeps the receiver visible in the picker.
The Pulsar 4K Wireless Receiver speaks the shared VGN protocol, where DPI stages are 50-step values (raw + 1) * 50, not the 10-step + dpiEx scheme the pulsar codec assumed. The mouse's own flash slots and DPI button cycle only decode cleanly under the 50-step scheme, and the app's previous 800 DPI write actually ran the sensor at 4000 DPI. Switch pulsarDecodeDpi, pulsarEncodeDpi, and pulsarDpiOptions to the 50-step encoding. Also expose supportedPollingRates capped at maximumPollingRateHz and reject setPollingRate calls above it, so a 4K receiver no longer offers an 8K option in the UI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for the Pulsar 4K Wireless Receiver, which ships with the X2 V2 4K dongle kit. The receiver does not enumerate under Pulsar's vendor id — it exposes the shared Teevolution/VGN vendor id (
0x3554) and speaks the same report-8 16-byte protocol as Pulsar receivers.Changes
src/drivers/pulsar/pulsar-hid.ts— accept the 4K receiver under VID0x3554, excluding product ids already claimed by the Teevolution and VGN drivers; expose real supported polling rates (125–8000 Hz) capped by the connection's maximum; guardsetPollingRateagainst exceeding the connection max.src/pulsar/index.ts— correct the DPI encode/decode for the 4K receiver (50 DPI steps over 50–26,000 DPI); reject invalid DPI values with a clear error.src/drivers/vendors.ts— add the VGN VID filter so the receiver stays visible in the device picker.Hardware verification