Rework IsBigEndianDirectMode() into a switch/case with the default case keeping the existing firmware version behavior, so future device-specific additions do not turn into chains of if blocks.
Also trim logging per review feedback: keep info for device init plus warnings and errors for faults, drop the info logs from the direct mode enable and mode switch paths, and tag every entry with the ROCCATVULCANKEYBOARD constant.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Log firmware version and layout at init, mode changes and direct mode
switches at info level. Log failed HID report writes as errors and a
device that does not report ready as a warning.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
WaitUntilReady() read buf[1] before the first hid_get_feature_report
filled it. Indeterminate read is UB; Apple clang -O2 collapses the
whole function to a trap, crashing the app during device detection
on macOS. memset the buffer after allocation, matching the style of
SendMode/SendColors/InitDeviceInfo.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
The Vulcan II Mini report uses 107 color slots of which only 69 are
wired to LEDs. Map the 69 compacted LED indices from the layout
tables onto the wired report slots in both the static 0x11 report
and the direct 0xA1 color frames, so per-key colors land on the
correct physical keys.
Replace the placeholder Mini layout matrices and LED names with the
tables derived from a hardware slot sweep of a physical FR AZERTY
board (firmware 1.29): 69 LEDs on a 5x15 matrix, UK ISO and US ANSI
name tables.
Set the Mini static report marker byte to 0xFB and always use a
little-endian length field in the Mini direct color frame, matching
USB captures.
Send the capture-exact 123-byte 0x13 keepalive report three times
after a static 0x11 report; the board only commits static colors
while the keepalive is being sent.
Verified on hardware: static mode colors the full board and a
left-to-right gradient lands on the correct keys. Direct color
frames are byte-exact against captures and covered by unit tests
(1285 checks) reconstructing the reports with a mock hidapi.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Add the ROCCAT Vulcan II Mini (USB 1e7d:2f09) to the unified
RoccatVulcanKeyboardController driver:
- Detector: register PID 0x2F09 with control interface 1
(usage page 0xFF01) and LED interface 3 (usage page 0xFF00),
same as the Vulcan II family.
- Controller: v2 protocol parameters (init report 0x09, direct
enable 0x0E), colour frame of 345 bytes streamed as six 64-byte
packets (0xA1 prefix, RGB per LED), mode packet of 332 bytes with
the Mini-specific 0x02/0x0B header bytes.
- Layouts: US (68 LEDs) and UK (69 LEDs) 5x16 matrix maps with
per-key LED ids, covering the 60% block plus the nav cluster and
arrow keys.
Protocol constants and the LED index map are ported from Mola19's
unmerged branch (OpenRGB issue #3193) and are pending verification
against the USB captures and the physical device.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* Split detection system out into its own class, DetectionManager
* Clean up ResourceManger's many callbacks into just two, one for detection and one general purpose
* Reorganize and clean up RGBController API functions
* Add functions to get protected RGBController member values
* Make NetworkClient, ProfileManager, and ResourceManager friend classes so they can access protected members
* Protected previously-public RGBController members
* Information strings (name, vendor, description, version, serial location)
* Device type
* Active mode
* Flags
* LEDs vector
* LED alternate names vector
* Modes vector
* Colors vector
* Zones vector
* Add CONTROLLER_FLAG_HIDDEN to allow plugins to hide controllers from control GUI
* Add update reason codes to RGBController update callback and signal updates on more RGBController events
* Add loop zone types and segmented zone type
* Add matrix map field to segments
* Rework matrix_map_type from using pointers to vector to prevent memory leaks
* Rework KeyboardLayoutManager to return new matrix_map_type
* Add access mutex to RGBController API
* Add per-zone modes ot RGBController API
* Add JSON description functions to RGBController API