UMBRA-8: Add DeviceSpecs for the Lancehead line (5 PIDs) #17

Merged
David merged 4 commits from feat/lancehead-line-devicespecs-UMBRA-8 into main 2026-06-07 05:07:56 +02:00
Owner

UMBRA-8: Add DeviceSpecs for the Lancehead line (5 PIDs)

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

PID File Model Battery Idle
0x0059 lancehead_wired.rs Razer Lancehead (Wired) 0x3f 0xFF
0x005A lancehead_wireless.rs Razer Lancehead (Wireless) 0x3f 0xFF
0x0060 lancehead_te_wired.rs Razer Lancehead Tournament Edition none none
0x006F lancehead_wireless_2018_receiver.rs Razer Lancehead Wireless 2018 (Receiver) 0x1f 0xFF
0x0070 lancehead_wireless_2018_wired.rs Razer Lancehead Wireless 2018 (Wired) 0x1f 0xFF

What was read off the driver (not assumed)

Per-command transaction IDs were ported branch-by-branch from razermouse_driver.c and the attribute wiring in razer_mouse_probe:

  • All five PIDs run firmware, serial, dpi (set, VARSTORE), poll, and the four-zone extended-matrix lighting (Logo + Scroll + Left + Right) on the standard 0x3f path, with the full effect set minus Wave (umbra ships no Wave builder, per the mamba_elite precedent).
  • The driver runs the dpi-stages sub-command on 0xFF, but umbra models a single DPI txn and carries the set-dpi value (0x3f), matching the deathadder_v2_pro precedent.
  • Battery: the original wired/wireless pair (0x0059/0x005A) runs charge level/status on 0x3f; the 2018 Wireless pair (0x006F/0x0070) moved that command class onto 0x1f. All four battery-carrying PIDs run idle on 0xFF. (The low-battery-threshold sub-command is 0xFF in the driver, which the single BatterySpec txn does not model, also per the deathadder_v2_pro precedent.)
  • The Tournament Edition is wired-only: the driver wires no charge or idle attributes, so battery and idle are None.

DPI maxima are documented as sensor-derived assumptions (16,000 for the 5G / 5G-optical sensors across the line); the driver does not clamp DPI.

Coverage

  • README "Supported devices" table lists every new model with VID:PID, DPI max, polling, lighting, and battery columns.
  • New every_lancehead_line_pid_is_registered test in crates/umbra-hid/tests/protocol.rs covers registration, the shared-0x3f command path, the four-zone lighting layout, the TE's no-battery/no-idle shape, and the per-generation battery txn split.
  • cargo fmt --check, cargo build --workspace --all-targets, and cargo test --package umbra-hid --no-default-features all pass clean. The new Lancehead files produce no clippy warnings. (Clippy --deny warnings flags three pre-existing doc_lazy_continuation warnings in unrelated basilisk_* files; those are present on main and out of scope for this issue.)

Closes work toward UMBRA-8.

## UMBRA-8: Add DeviceSpecs for the Lancehead line (5 PIDs) Registers the five Lancehead PIDs from OpenRazer's `razermouse_driver.h`, each as its own `DeviceSpec` under `crates/umbra-hid/src/models/` and wired into the `SUPPORTED` table. | PID | File | Model | Battery | Idle | |--------|------|-------|---------|------| | 0x0059 | `lancehead_wired.rs` | Razer Lancehead (Wired) | 0x3f | 0xFF | | 0x005A | `lancehead_wireless.rs` | Razer Lancehead (Wireless) | 0x3f | 0xFF | | 0x0060 | `lancehead_te_wired.rs` | Razer Lancehead Tournament Edition | none | none | | 0x006F | `lancehead_wireless_2018_receiver.rs` | Razer Lancehead Wireless 2018 (Receiver) | 0x1f | 0xFF | | 0x0070 | `lancehead_wireless_2018_wired.rs` | Razer Lancehead Wireless 2018 (Wired) | 0x1f | 0xFF | ### What was read off the driver (not assumed) Per-command transaction IDs were ported branch-by-branch from `razermouse_driver.c` and the attribute wiring in `razer_mouse_probe`: - All five PIDs run firmware, serial, dpi (set, VARSTORE), poll, and the four-zone extended-matrix lighting (Logo + Scroll + Left + Right) on the standard `0x3f` path, with the full effect set minus Wave (umbra ships no Wave builder, per the `mamba_elite` precedent). - The driver runs the dpi-stages sub-command on `0xFF`, but umbra models a single DPI txn and carries the set-dpi value (`0x3f`), matching the `deathadder_v2_pro` precedent. - Battery: the original wired/wireless pair (0x0059/0x005A) runs charge level/status on `0x3f`; the 2018 Wireless pair (0x006F/0x0070) moved that command class onto `0x1f`. All four battery-carrying PIDs run idle on `0xFF`. (The low-battery-threshold sub-command is `0xFF` in the driver, which the single `BatterySpec` txn does not model, also per the `deathadder_v2_pro` precedent.) - The Tournament Edition is wired-only: the driver wires no charge or idle attributes, so `battery` and `idle` are `None`. DPI maxima are documented as sensor-derived assumptions (16,000 for the 5G / 5G-optical sensors across the line); the driver does not clamp DPI. ### Coverage - README "Supported devices" table lists every new model with VID:PID, DPI max, polling, lighting, and battery columns. - New `every_lancehead_line_pid_is_registered` test in `crates/umbra-hid/tests/protocol.rs` covers registration, the shared-`0x3f` command path, the four-zone lighting layout, the TE's no-battery/no-idle shape, and the per-generation battery txn split. - `cargo fmt --check`, `cargo build --workspace --all-targets`, and `cargo test --package umbra-hid --no-default-features` all pass clean. The new Lancehead files produce no clippy warnings. (Clippy `--deny warnings` flags three pre-existing `doc_lazy_continuation` warnings in unrelated `basilisk_*` files; those are present on `main` and out of scope for this issue.) Closes work toward UMBRA-8.
feat(umbra-hid): add DeviceSpecs for the Lancehead line
Some checks failed
Check / fmt + clippy + build + tests (pull_request) Failing after 6s
22c77536e3
Register the five Lancehead 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: Lancehead wired/wireless (0x0059/0x005A), Lancehead Tournament Edition (0x0060), and the Lancehead Wireless 2018 receiver/wired pair (0x006F/0x0070).

Per-command transaction IDs, lighting zones, effect kinds, poll rates, and battery/idle support are read branch-by-branch off razermouse_driver.c and razer_mouse_probe, not assumed. Every Lancehead runs firmware, serial, dpi (set, VARSTORE), poll, and the four-zone extended-matrix lighting (Logo + Scroll + Left + Right) on the standard 0x3f path, with the full effect set minus Wave (umbra ships no Wave builder, per the mamba_elite precedent). The driver runs the dpi-stages sub-command on 0xFF, but umbra models a single DPI txn and carries the set-dpi value, matching the deathadder_v2_pro precedent.

The original wired/wireless pair carries battery on 0x3f; the 2018 Wireless pair moved the battery command class onto 0x1f. All four battery-carrying PIDs run idle on 0xFF (the low-battery-threshold sub-command is 0xFF in the driver, which the single BatterySpec txn does not model, also per the deathadder_v2_pro precedent). The Tournament Edition is wired-only: the driver wires no charge or idle attributes, so battery and idle are None.

DPI maxima are documented as sensor-derived assumptions (16,000 for the 5G / 5G-optical sensors across the line). The README "Supported devices" table lists every new model, and a new every_lancehead_line_pid_is_registered test covers registration plus the shared-0x3f command path, the four-zone lighting layout, and the per-generation battery txn split.

#UMBRA-8

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts:
#	README.md
#	crates/umbra-hid/src/models/mod.rs
#	crates/umbra-hid/tests/protocol.rs
fix(umbra-hid): separate is_charging note from txn list in basilisk docs
Some checks failed
Check / fmt + clippy + build + tests (pull_request) Failing after 4s
2a5baec3c7
Three basilisk model doc comments placed the standalone `is_charging` paragraph directly after a bulleted txn list with no blank `//!` separator, which clippy's doc_lazy_continuation lint rejects under --deny warnings and which blocked CI on PR #17. The sentence is a paragraph-level note about the battery model, not a continuation of the idle bullet, so a blank doc line is the correct fix over indenting or allow-ing the lint.

#UMBRA-14
Merge branch 'main' into feat/lancehead-line-devicespecs-UMBRA-8
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt + clippy + build + tests (pull_request) Successful in 21s
901853c407
David merged commit 489c4dfbca into main 2026-06-07 05:07:56 +02:00
David deleted branch feat/lancehead-line-devicespecs-UMBRA-8 2026-06-07 05:07:56 +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!17
No description provided.