-
-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Improved OpenRGB protctol for RGB Matrix keyboards #13036
base: master
Are you sure you want to change the base?
Conversation
void matrix_init_user(void) | ||
{ | ||
//user initialization | ||
} | ||
|
||
void matrix_scan_user(void) | ||
{ | ||
//user matrix | ||
} | ||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) | ||
{ | ||
return true; | ||
} |
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.
void matrix_init_user(void) | |
{ | |
//user initialization | |
} | |
void matrix_scan_user(void) | |
{ | |
//user matrix | |
} | |
bool process_record_user(uint16_t keycode, keyrecord_t *record) | |
{ | |
return true; | |
} |
// Runs just one time when the keyboard initializes. | ||
void matrix_init_user(void) { | ||
}; | ||
|
||
// Runs constantly in the background, in a loop. | ||
void matrix_scan_user(void) { | ||
}; |
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.
// Runs just one time when the keyboard initializes. | |
void matrix_init_user(void) { | |
}; | |
// Runs constantly in the background, in a loop. | |
void matrix_scan_user(void) { | |
}; |
@@ -278,7 +278,7 @@ enum usb_endpoints { | |||
#define KEYBOARD_EPSIZE 8 | |||
#define SHARED_EPSIZE 32 | |||
#define MOUSE_EPSIZE 8 | |||
#define RAW_EPSIZE 32 | |||
#define RAW_EPSIZE 64 |
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.
IIRC, this may cause issues.
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.
Issues with VIA? If so, maybe only change it to 64 if OpenRGB is enabled in the meantime?
@drashna Updated the PR with the changes you asked for. Is this something you guys will be more willing to merge considering there's no need to configure the boards for OpenRGB now? |
At this stage I think I'm okay with the changes as they stand, apart from the question about @Kasper24 -- coming from the perspective of using this PR as heavy inspiration for the lighting side of things with XAP, was the implementaton of "zones" something that was inherently useful for UI-side configurability? Wondering if we need to extend the rgb_matrix definitions "properly" beforehand, allowing for zone naming and assignment of LEDs to specific zones. Thoughts? |
32 bytes per packet would be rather limiting. The frame rate of effects run from the host is dependent on how many color values we can pack into one USB message. Right now we can pack 20 colors into one 64-byte packet which allows for smooth animations at 60fps as long as the RGB Matrix layer can keep up. I would expect 32 bytes (10 colors, and that's if we only use 2 bytes of overhead) would be significantly slower. |
Then in this case you're going to have to only bump it to 64 when OpenRGB is enabled. Not using OpenRGB shouldn't inadvertently break other people using raw hid, on the off chance that they're reliant on it being 32 bytes long. |
|
Also, XAP has its own endpoint, and is 64 bytes in length. There is some preamble required to correlate messages with their responses, and at this point the maximum data size is 60 bytes. |
Thank you for your contribution! |
Use the correct define Add const before declaration Fix compile error whoops Add const before declaration Formatting Formating and remove unused macros
…w automatic matrix
…IX_GET_LED_INFO Reduces the amount of hid calls allowing by a big margin for faster initialization
…to white on startup * Static is red by default, so blue is enough to differentiate them
Any updates on getting this pulled in? Seems it’s just waiting on a review? |
This is a major improvement over #10961 - the matrix in OpenRGB is now using the points array to build the matrix, which makes adding more keyboard as easy as OPENRGB_ENABLE = YES in the rules file. There's no need anymore to add additional info for each keyboard
OpenRGB PR