Skip to content

fix(logitech): allow writing the polling rate to the onboard profile of direct-connect mice - #50

Merged
snekxs merged 1 commit into
OpenMouse-Project:devfrom
jazzstack:g502-fix
Aug 9, 2026
Merged

fix(logitech): allow writing the polling rate to the onboard profile of direct-connect mice#50
snekxs merged 1 commit into
OpenMouse-Project:devfrom
jazzstack:g502-fix

Conversation

@jazzstack

Copy link
Copy Markdown

Summary

Fixes the G502 HERO issue where the 1 kHz polling rate option was not clickable (rendered disabled in the UI). Direct-connect mice (G402, G403 HERO, G502 HERO) store their polling rate in the onboard profile, so a rate change must be written through the CRC-checked profile-flash path instead of being rejected.

Verified on a real G502 HERO (0xc08b) by a tester: the 1 kHz option is now clickable, the write persists, and the OS polling rate actually changes.

Changes

  • src/devices/logitech/onboard-profiles.ts
    • Add LOGAN format 2 report-rate capabilities (reportRates: { wirelessMaxHz: 0, wiredMaxHz: 1000 }); dpiStages, maxNameLength, and bunnyHop stay locked/unverified.
    • Mark format 2 verified in VERIFIED_FORMATS — report-rate field only.
    • Fix encodeReportRate for base-v1 formats (1–5): the report rate is stored as a USB polling interval in milliseconds (1000 / hz), not a rate-table index.
  • src/devices/logitech/hidpp.ts
    • setPollingRate for direct-connect mice now routes through writeActiveProfile({ reportRateWiredHz }) instead of throwing.
    • readStatus only disables the polling UI when the profile format is unverified or lacks a report-rates field; updates the polling note accordingly.
  • src/control.ts
    • renderProfileRates filters the link by the format's layout, so LOGAN shows only the wired slider (no bogus wireless control).
  • src/devices/logitech/onboard-profiles.test.ts — two new tests covering the v1 ms-interval encoding and format-2 capabilities.
  • src/devices/logitech/TESTING.md — added the G502 HERO (0xc08b) to supported identifiers and added a full hardware test checklist.

Test plan

  • tsc --noEmit clean; vite build succeeds; 201/201 tests pass.
  • Hardware checklist in TESTING.md (G502 HERO): 1 kHz option clickable, write persists across replug, OS-visible rate change, G HUB closed during test.

…ct mice

Direct-connect mice (G402/G403 HERO/G502 HERO) store their polling rate in the
onboard profile, so the 1 kHz stop was rendered disabled. Route setPollingRate
through the CRC-checked profile write for verified formats, encode base-v1 rates
as the USB polling interval in milliseconds rather than a table index, and add
LOGAN (format 2) report-rate capabilities. Mark format 2 verified for the
report-rate field only; DPI stages, names and bunny hop stay locked.
@jazzstack

jazzstack commented Aug 8, 2026

Copy link
Copy Markdown
Author

Verified on hardware by the discord user Eve (518210601739091989)

image image

@AngeloCore

Copy link
Copy Markdown

In order to verify a format you'll need to Diagnostics > Verify profile format > Verify profile writes or/and Copy verification data first

@jazzstack

jazzstack commented Aug 8, 2026

Copy link
Copy Markdown
Author

Already verified on hardware. Will run the diagnostics on future devices.

@snekxs
snekxs merged commit 9a3a314 into OpenMouse-Project:dev Aug 9, 2026
3 checks passed
Sign up for free to 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