-
-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Fix Bug with (RGB|LED)_DISABLE_WHEN_USB_SUSPENDED define #13060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be done for LED Matrix as well?
Yes. But I was having issues with it on RGB matrix, so didn't want to do that yet. Will add now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, is there a particular reason to use 1
instead of true
?
Looking at current master, I don't see any usages of this define that set it to anything other than true
or false
, except for the docs. So I think they should be updated as well.
Also, IMO the presence of the define itself should be the decider - but that I guess would be a job for develop
.
Well, the point is to have define enable the behavior, without the need to have true or false set. However, having it set to true or false causes issues. And checking if it's equal to true or false causes issues when it's not. At least in the preprocessor stuff. So, right now, if you use
Changing it to look for true generates the same issue. This method is the only way I've seen that actually works, and without having to change every define in the repo. |
Which is to say that I screwed up, and didn't test the original change enough. This change should allow it to compile correctly, and respect the intended behavior with all three possible defines: #define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_DISABLE_WHEN_USB_SUSPENDED true
#define RGB_DISABLE_WHEN_USB_SUSPENDED false Later, I can clean up stuff, on develop, to make it all nice and uniform. |
Description
The check actually errors out if not set to anything (just defined, per docs)
Types of Changes
Checklist