WootingKb / wooting-rgb-sdk

Customize colors on Wooting Keyboard #WootDev
Mozilla Public License 2.0
62 stars 15 forks source link

Add multi-device-support #50

Closed BigBrainAFK closed 1 year ago

BigBrainAFK commented 2 years ago

This PR adds fully backwards compatible multi-device-support.

Thanks to some simple pointer manipulation we can have more than 1 device usable. The PR includes 3 new functions and 1 new defined constant.

Functions:

Constants:

I implement more than a handful of sanity checks and reassignment of pointers to make sure everything is what it should be. There is some minor logic changes to allow the code to remain largely unchanged but also allow for unfilled arrays etc. New DEBUG_LOG enabled logs to recheck assigned handles have been added.

Breaking Changes:

Testing done:

diogotr7 commented 2 years ago

Tested with my wooting one and wooting two HE and it seems to work okay. wooting_rgb_close and wooting_rgb_reset_rgb are a bit weird, from what i understand you need to call wooting_usb_select_device before wooting_rgb_reset_rgb, but wooting_rgb_close closes every handle, right?

I'll implement these changes in RGB.NET & Artemis and test with both boards.

diogotr7 commented 1 year ago

2 questions regarding this:

Will it get merged anytime soon ? Does it support the 60HE ARM ?

I have an Artemis user with the keyboard and they're having trouble getting Artemis to recognize it.

simon-wh commented 1 year ago

Will it get merged anytime soon ? Does it support the 60HE ARM ?

Gonna try and get this merged this week.

I have an Artemis user with the keyboard and they're having trouble getting Artemis to recognize it.

This doesn't support 60HE ARM atm. I just merged the 60HE ARM support branch, so once this has been rebased it should all work