Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RGB command #84

Merged
merged 6 commits into from
Mar 18, 2025
Merged

Add support for RGB command #84

merged 6 commits into from
Mar 18, 2025

Conversation

JohnAZoidberg
Copy link
Member

@JohnAZoidberg JohnAZoidberg commented Mar 4, 2025

Yes, called rgbkbd because of the host command and to match ectool.
But we are actually planning to use it for the Framework Deskop's ARGB header (with fans, etc.)

For example:

# To set three LEDs to red, green, blue
sudo framework_tool --rgbkbd 0 0xFF0000 0x00FF00 0x0000FF

# To clear 8 LEDs
sudo framework_tool --rgbkbd 0 0 0 0 0 0 0 0 0

# Just turn the 3rd LED red
sudo framework_tool --rgbkbd 2 0xFF0000

@JohnAZoidberg JohnAZoidberg force-pushed the rgbkbd branch 5 times, most recently from fecda01 to 04e8b09 Compare March 4, 2025 03:05
);
} else {
let start_key = args.rgbkbd[0] as u8;
let colors = args.rgbkbd[1..].iter().map(|color| RgbS {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bonus points if you figure out how to do the *8 multipliers like i have on the ec console.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left as an exercise for the reader

Only code formatting difference.

Signed-off-by: Daniel Schaefer <[email protected]>
Works like this:
```
> cargo build && sudo ./target/debug/framework_tool --rgbkbd 0 16711680 65280 255
```

Signed-off-by: Daniel Schaefer <[email protected]>
```
sudo framework_tool --rgbkbd 0 0xFF0000 0x00FF00 0x0000FF
```

Signed-off-by: Daniel Schaefer <[email protected]>
@JohnAZoidberg
Copy link
Member Author

FreeBSD build failing for CI reasons, ignoring that.

@JohnAZoidberg
Copy link
Member Author

Tested on Framework Desktop, can work fine.

@JohnAZoidberg JohnAZoidberg merged commit 5c843ea into main Mar 18, 2025
5 of 6 checks passed
@JohnAZoidberg JohnAZoidberg deleted the rgbkbd branch March 18, 2025 02:27
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