UMBRA-12: Add DeviceSpecs for the Cobra Pro (wired + wireless) #15

Merged
David merged 2 commits from feat/cobra-pro-devicespecs-UMBRA-12 into main 2026-06-07 02:33:06 +02:00
Owner

UMBRA-12: Add DeviceSpecs for the Cobra Pro (wired + wireless)

Registers the two Cobra Pro PIDs from OpenRazer's razermouse_driver.h, each as its own DeviceSpec file under crates/umbra-hid/src/models/ and wired into the SUPPORTED table:

PID Model
0x00AF Razer Cobra Pro (Wired)
0x00B0 Razer Cobra Pro (Wireless)

The Pro is the battery-bearing, multi-zone sibling of the wired-only base cobra. The driver shares every switch arm between the two PIDs and groups them with the Basilisk V3 Pro family.

What was read off the driver (not assumed)

Per-command transaction IDs, lighting zones, effect kinds, poll rates, and battery/idle support are taken branch-by-branch from razermouse_driver.c (including the setup_attrs registration at line 6929):

  • firmware / serial / dpi / dpi-stages / poll / lighting / battery (charge level + status) / idle all on txn 0x1f.
  • Standard misc poll path, rates 125 / 500 / 1000.
  • The driver registers per-zone Logo and Scroll effects (wave, spectrum, static, none) plus a whole-device underglow matrix. umbra models the Logo and Scroll extended-matrix zones with Static / Spectrum / None. Wave has no umbra command builder and the underglow matrix has no umbra LED zone addressing it, so both are left out, mirroring the basilisk_v3_pro precedent.
  • The driver puts charge_low_threshold on txn 0xFF while charge level/status stay on 0x1f. umbra's single-txn BatterySpec tracks the level/status path (0x1f); the low-threshold mismatch is documented in the doc comment and follows the basilisk_v3_pro sibling.

Assumptions

DPI maximum is documented as a sensor-derived assumption (Focus Pro 30K = 30000) in each file's doc comment; the driver does not clamp DPI.

Tests / checks

  • New cobra_pro_pair_registered_with_logo_scroll_battery_idle test over models::lookup covers registration plus the per-command txn, Logo + Scroll zones, and battery/idle support for both PIDs.
  • cargo test --package umbra-hid --no-default-features passes (26 tests).
  • cargo build --workspace and cargo fmt --all --check pass clean. The new files are clippy-clean; note that the local clippy 1.94.0 flags a pre-existing doc_lazy_continuation lint in three unrelated basilisk_* files from earlier merged PRs (out of scope for this issue).

README

The "Supported devices" table lists both models with VID:PID, DPI max, polling, lighting, and battery columns.

#UMBRA-12

🤖 Generated with Claude Code

## UMBRA-12: Add DeviceSpecs for the Cobra Pro (wired + wireless) Registers the two Cobra Pro PIDs from OpenRazer's `razermouse_driver.h`, each as its own `DeviceSpec` file under `crates/umbra-hid/src/models/` and wired into the `SUPPORTED` table: | PID | Model | |--------|----------------------------| | 0x00AF | Razer Cobra Pro (Wired) | | 0x00B0 | Razer Cobra Pro (Wireless) | The Pro is the battery-bearing, multi-zone sibling of the wired-only base `cobra`. The driver shares every switch arm between the two PIDs and groups them with the Basilisk V3 Pro family. ### What was read off the driver (not assumed) Per-command transaction IDs, lighting zones, effect kinds, poll rates, and battery/idle support are taken branch-by-branch from `razermouse_driver.c` (including the `setup_attrs` registration at line 6929): - firmware / serial / dpi / dpi-stages / poll / lighting / battery (charge level + status) / idle all on txn `0x1f`. - Standard misc poll path, rates `125 / 500 / 1000`. - The driver registers per-zone Logo and Scroll effects (wave, spectrum, static, none) plus a whole-device underglow matrix. umbra models the Logo and Scroll extended-matrix zones with Static / Spectrum / None. Wave has no umbra command builder and the underglow matrix has no umbra LED zone addressing it, so both are left out, mirroring the `basilisk_v3_pro` precedent. - The driver puts `charge_low_threshold` on txn `0xFF` while charge level/status stay on `0x1f`. umbra's single-txn `BatterySpec` tracks the level/status path (`0x1f`); the low-threshold mismatch is documented in the doc comment and follows the `basilisk_v3_pro` sibling. ### Assumptions DPI maximum is documented as a sensor-derived assumption (Focus Pro 30K = 30000) in each file's doc comment; the driver does not clamp DPI. ### Tests / checks - New `cobra_pro_pair_registered_with_logo_scroll_battery_idle` test over `models::lookup` covers registration plus the per-command txn, Logo + Scroll zones, and battery/idle support for both PIDs. - `cargo test --package umbra-hid --no-default-features` passes (26 tests). - `cargo build --workspace` and `cargo fmt --all --check` pass clean. The new files are clippy-clean; note that the local clippy 1.94.0 flags a pre-existing `doc_lazy_continuation` lint in three unrelated `basilisk_*` files from earlier merged PRs (out of scope for this issue). ### README The "Supported devices" table lists both models with VID:PID, DPI max, polling, lighting, and battery columns. #UMBRA-12 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(umbra-hid): add DeviceSpecs for the Cobra Pro (wired + wireless)
Some checks failed
Check / fmt + clippy + build + tests (pull_request) Failing after 4s
1a6eeee5e7
Register the two Cobra Pro PIDs from OpenRazer's razermouse_driver.h, each as its own DeviceSpec file under crates/umbra-hid/src/models/ and wired into the SUPPORTED table: Cobra Pro Wired (0x00AF) and Cobra Pro Wireless (0x00B0). The Pro is the battery-bearing, multi-zone sibling of the wired-only base cobra; the driver shares every switch arm between the two PIDs and groups them with the Basilisk V3 Pro family.

Per-command transaction IDs, lighting zones, effect kinds, poll rates, and battery/idle support are read branch-by-branch off razermouse_driver.c (including the setup_attrs registration), not assumed. Firmware, serial, dpi, dpi-stages, poll, lighting, battery (charge level/status), and idle all run on txn 0x1f, with standard misc poll rates 125/500/1000. The driver registers per-zone Logo and Scroll effects plus a whole-device underglow matrix; umbra models the Logo and Scroll extended-matrix zones with Static/Spectrum/None. Wave has no umbra command builder and the underglow matrix has no umbra LED zone addressing it, so both are left out, mirroring the basilisk_v3_pro precedent. The driver puts charge_low_threshold on 0xFF while level/status stay on 0x1f; umbra's single-txn BatterySpec tracks the level/status path, with the mismatch documented in the doc comment.

DPI maxima are documented as sensor-derived assumptions (Focus Pro 30K). The README "Supported devices" table lists both models, and a new cobra_pro_pair_registered_with_logo_scroll_battery_idle test covers registration plus the per-command txn, lighting zones, and battery/idle support.

#UMBRA-12

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge branch 'main' into feat/cobra-pro-devicespecs-UMBRA-12
Some checks failed
Check / fmt + clippy + build + tests (pull_request) Failing after 5s
Create release / Create release from merged PR (pull_request) Has been skipped
bbe805dc5d
David merged commit afd5dba92a into main 2026-06-07 02:33:06 +02:00
David deleted branch feat/cobra-pro-devicespecs-UMBRA-12 2026-06-07 02:33:06 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pandoras-box/umbra!15
No description provided.