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 Prime mice #169

Merged
merged 8 commits into from
Nov 28, 2021
Merged

Add support for Prime mice #169

merged 8 commits into from
Nov 28, 2021

Conversation

sephiroth99
Copy link
Contributor

This adds support for the SteelSeries Prime mice (#166).

Supported features:

  • sensitivity
  • led color
  • led brightness
  • polling rate

What is not supported:

  • button mapping

By looking at the SSE3 database, it seems like the Prime and Prime+ support a new color handler. Instead, I was able to reuse the regular color handler by using the command and command_suffix fields to build a valid packet (but different from my captures). In short, the RGB color value is present twice in the data, at the start and at the end. Sending only at the start also works. But this means supporting the Prime+ will most likely require to correctly implement this new color handler.

There were a few changes to the core code, mainly:

  • added support for variable size in the range handler (new option range_length_byte)
  • added support for zero based indexing of the multidpi_range handler

@flozz
Copy link
Owner

flozz commented Nov 22, 2021

added support for zero based indexing of the multidpi_range handler

Hum that's annoying, I have already an implementation for this in the aerox3-wireless branch... Maybe I can merge this part of the branch on master to allow you to use it in your PR?

Except this ↑ your PR looks great :)

@sephiroth99
Copy link
Contributor Author

added support for zero based indexing of the multidpi_range handler

Hum that's annoying, I have already an implementation for this in the aerox3-wireless branch... Maybe I can merge this part of the branch on master to allow you to use it in your PR?

Except this ↑ your PR looks great :)

I had a look at the first_preset option and it seems fine to me. If you want to put that part now in master, I'll rebase on top of it, no problem for me.

@flozz
Copy link
Owner

flozz commented Nov 23, 2021

The updated multidpi_range is on master :)

The 'process_value' function of the 'range' handler is reused by
'multidpi_range'. Separate the actual processing in a different
function. This will make it possible in future commits to change the
return of 'process_value' for the 'range' handler.
Add support for outputting a value on multiple bytes. The new device
option is called 'range_length_byte'.
@sephiroth99
Copy link
Contributor Author

OK I updated the code to use the new multidpi_range, everything seem a-ok on my side! Let me know if there are any other issues.

Copy link
Owner

@flozz flozz left a comment

Choose a reason for hiding this comment

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

There is just a key to rename to be more consistent with other devices. Great job! 👍

rivalcfg/devices/prime.py Outdated Show resolved Hide resolved
@flozz flozz merged commit dffa7e3 into flozz:master Nov 28, 2021
@flozz
Copy link
Owner

flozz commented Nov 28, 2021

Thank you, the Prime support will be released in the next Rivalcfg version :)

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.

None yet

2 participants