Skip to content

Added Rich Color Configuration#515

Open
Adin-bima wants to merge 4 commits intoSapd:masterfrom
Adin-bima:feat/rich-color-option
Open

Added Rich Color Configuration#515
Adin-bima wants to merge 4 commits intoSapd:masterfrom
Adin-bima:feat/rich-color-option

Conversation

@Adin-bima
Copy link
Copy Markdown

@Adin-bima Adin-bima commented Apr 29, 2026

Changes made

Implemented advanced RGB lighting control for the Logitech G733 family (via the existing LogitechG633Family device handler).

  • New light capabilities
    • Added CAP_LIGHT_COLOR, CAP_LIGHT_BRIGHTNESS, CAP_LIGHT_MODE, CAP_LIGHT_SPEED.
    • Updated capability descriptors/help and the handler registry to execute these actions.
  • Device API extensions
    • Extended HIDDevice with:
      • setLightColor(red, green, blue)
      • setLightBrightness(1-100)
      • setLightMode(static|breathing|wave)
      • setLightSpeed(1-100) (used for breathing/wave)
  • Logitech implementation
    • Implemented static, breathing, and wave lighting in lib/devices/logitech_g633_g933_935.hpp.
    • Fixed the G733 RGB channel mapping so red/green/blue match expected colors.
    • Added animation speed mapping for breathing/wave.
  • CLI additions
    • Added:
      • --light-color (named colors, #RRGGBB, or R,G,B)
      • --light-brightness <1-100>
      • --light-mode <static|breathing|wave>
      • --light-speed <1-100>
    • Updated help output in cli/main.cpp.
  • Docs
    • Added:
      • docs/FEATURE_REQUEST_G733_LIGHTING_ENHANCEMENTS.md (motivation + usage + test plan)
      • PR description draft for easy copy/paste

Usage examples (one setting at a time):

# Color
headsetcontrol --light-color red
headsetcontrol --light-color "#00aaff"
headsetcontrol --light-color 255,128,0

# Brightness
headsetcontrol --light-brightness 60

# Mode
headsetcontrol --light-mode static
headsetcontrol --light-mode breathing
headsetcontrol --light-mode wave

# Speed (breathing/wave)
headsetcontrol --light-speed 40

Related context:

Checklist

  • I adjusted the README (if needed)
  • For new features in HeadsetControl: I discussed it beforehand in Issues or Discussions and adhered to the wiki

@Adin-bima Adin-bima changed the title feat/rich color option Rich Color Configuration Apr 29, 2026
@Adin-bima Adin-bima changed the title Rich Color Configuration Added Rich Color Configuration Apr 29, 2026
@0x1911
Copy link
Copy Markdown

0x1911 commented Apr 30, 2026

Hey there,
first of all thanks for the invested time. ❤️

I tested this PR locally on Linux Mint 22.1 with a Logitech G733 (046d:0afe).

What worked correctly on real hardware:

  • build succeeded
  • ctest --output-on-failure passed
  • pure color setting in the static color path worked correctly when tested in isolation from an off state (255,0,0, 0,255,0, 0,0,255 showed as red, green, blue)
  • --light-mode static, --light-mode breathing, and --light-mode wave all worked functionally
  • legacy -l 0 / -l 1 still worked

However, I found a behavioral issue with combined lighting state:

  • --light-brightness does not preserve the current color and falls back to cyan
  • --light-mode also falls back to cyan instead of preserving the previously selected color
  • --light-color appears to force brightness back to 100 instead of preserving a previously selected brightness

This also matches the current implementation in lib/devices/logitech_g633_g933_935.hpp:

  • setLights(): hardcoded cyan defaults around lines 102-106
  • setLightBrightness(): hardcoded cyan around lines 154-157
  • setLightMode(): hardcoded cyan around lines 184-188
  • setLightColor(): fixed brightness = 100 around line 130

So from my testing, isolated static color control looks good, and the animation modes themselves do work, but combined color/mode/brightness state is not fully preserved yet on 046d:0afe.

I think the underlying issue is state composition rather than the raw packet format itself.

A cleaner fix would probably be to store the current lighting state in the device instance (RGB, brightness, mode, speed, enabled) and have all of setLights(), setLightColor(), setLightBrightness(), setLightMode(), and setLightSpeed() update that state and then call a single helper that writes the full state to both zones.

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.

2 participants