Add HS80 Max support#537
Open
emericg wants to merge 6 commits into
Open
Conversation
…ID first (always the case with HS80 Max)
…eading battery level, to avoid audible 'pop' sounds during mode switch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes made
Added HS80 Max (0xa97) to the CorsairVoidV2W class. Sidetone confirmed working.
I did not add 0x2a0f ID because another issue mentioned it was a different type of HS80 Max?
The battery level wasn't working, as stated in the previous comment all I got was 271%, the 0x0a96 headset ID, but the battery level always follows in the next packet or so, so a simple retry was enough. Maybe that's made to signal per device battery level, but I only have the one to validate that theory.
I added a wakeDevice() function that doesn't do the full "software mode" switch, because it turns out that was what was producing audible pop sound + subtle volume level change in my headset, made worse by using the HeadsetControl applet for Gnome (a query every couple of minutes).
The pop still happens when changing sidetone or setting the inactive timer, but it's more acceptable because it's triggered following a user action and not happening out of nowhere.
Implemented setting the inactive timer and MICROPHONE_UP support (both taken from OpenLinkHub code).
Cleanup the code style a bit, in a separate commit if you don't want it, I would personally also rename the class to get rid of the "void" in the title.
And thinking about it now, I did not changed the README to add "inactive time" and "rotate to mute" (but I only tested with my HS80 Max).
Checklist