Conversation
Firmware "Mouse 1.0" over the cable, through OpenMouse Bridge on Windows, with RazerHidClient unmodified: - Identity, firmware, DPI (1800) and polling (500 Hz) read back on the existing 0xff transaction id. - 800 DPI and 1000 Hz each wrote, read back and were restored. - Polling was read back but not measured (the sampler saw dropouts), and the DPI stage read gave nothing usable, so no stage editor is offered. The app's hardware test export is in captures/razer-diamondback-chroma/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenRazer drives the Diamondback Chroma's LEDs through the older Chroma command family (class 0x03), not the extended matrix the Cobra and Viper Mini use. Adds that family to the generic RazerHidClient behind a new per-product standardMatrixLighting flag, set only on 0x004c: - codec: razerSetStandardEffectCommand (off, spectrum, wave, static, reactive, breathing random/single/dual on 0x03/0x0a) and the backlight brightness pair (0x03/0x03, 0x03/0x83, backlight led 0x05, 0-255 level as whole percent), byte for byte from razerchromacommon.c - driver: readStatus reports one "Mouse" zone with the brightness read from the mouse; setLighting writes the effect, then the brightness only when it changed, confirmed by read-back. The effect has no read, so it is cached and marked write-only, as on the Cobra and Viper Mini. Every command uses the product's 0xff transaction id, breathing included, although OpenRazer lists this model's breathing on 0x3f: that entry sits in the block where the Cobra's breathing turned out to answer on its usual id. Untested on hardware; the checklist is in docs/razer-testing.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 lighting to the generic
RazerHidClientfor Chroma-era mice that OpenRazer drives through its older standard-matrix commands (class0x03). It is gated per product by a newstandardMatrixLightingflag, which only the Diamondback Chroma (0x004c) has.Stacked on #150: the first commit is that PR, so review the second one.
src/razer/codec.ts):razerSetStandardEffectCommandcovers off, spectrum, wave, static, reactive and breathing random/single/dual on0x03/0x0a.razerSetBacklightBrightnessCommand,RAZER_BACKLIGHT_BRIGHTNESS_READanddecodeBacklightBrightnesscover0x03/0x03and0x03/0x83on the backlight led (0x05), with the 0-255 level shown as whole percent.readStatus()returns one "Mouse" lighting zone with the brightness the mouse reports (25/50/75/100 offered).setLighting()writes the effect, then writes the brightness only when it changed and confirms it by reading it back. The effect has no read, so it is cached and the card is marked write-only, the same as on the Cobra and Viper Mini.status.lightingand callssetLightinggenerically. Checked against the app's main (0.22.0) with this branch linked:tscand all 254 app tests pass, and a preview of this driver's status output renders the card with all eight effects and the brightness row. The app only needs the version bump after a release.Evidence
OpenRazer
driver/razermouse_driver.c(master),USB_DEVICE_ID_RAZER_DIAMONDBACK_CHROMA:backlight_matrix_effect_{none,static,wave,spectrum,reactive,breath},backlight_led_brightness,matrix_effect_customandmatrix_custom_frame, with no button or macro attributesrazer_chroma_standard_matrix_effect_*on transaction id0xff, and brightness usesrazer_chroma_standard_{get,set}_led_brightness(VARSTORE, BACKLIGHT_LED)on0xffrazerchromacommon.cand are pinned inprotocol.test.tsAssumptions and unknowns
docs/razer-testing.md.0xff, although OpenRazer lists this model's breathing on0x3f. That entry sits in the same block as the Cobra, whose breathing answered on its usual id. If breathing alone fails, this is the line to change.0x01, because the card has no direction control.