-
-
Notifications
You must be signed in to change notification settings - Fork 40k
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
RGB Matrix support for Massdrop CTRL/ALT #5328
Conversation
Co-authored-by: Matt Schneeberger <[email protected]>
This commit is to get the Massdrop lighting code working again through use of the compilation define USE_MASSDROP_CONFIGURATOR added to a keymap's rules.mk. Added keymaps for both CTRL and ALT named default_md and mac_md. These should be used if the Massdrop style lighting is desired.
@patrickmt, when you get the chance, could you check if these changes have reasonable performance? |
This is looking pretty good. :) Before we merge this I'd like to see all the affected users contacted first. There is a tension here between not breaking travis and not breaking a user's git workspace, and it would be best if we could resolve that tension by getting sign-off from everyone involved. By my reckoning we need sign-off from @abishalom, @reywood, and @valen214. Have I missed anyone? This also seems to add new keymaps like |
Good to hear! The @abishalom should be okay, since he didn't mess around with any of the Massdrop lighting stuff. I did tweak his keymap to use the new RGB Matrix system keycodes, and I recall flashing it to confirm that it worked fine. Though, as I'm writing this now, it might make sense to revert those changes, and active the Massdrop compatibility mode flag, as it could be jarring to wake up one morning, flash your keymap, and see that your default lighting effects have changed :) Up to him if he wants me to revert those changes. @patrickmt attempted to fix @reywood's and @valen214's keymaps to work with the Massdrop compatibility mode, and had some success in doing so. IIRC, reywood's effect is working, but valen214's was far too complicated to try and debug. That said, due to the nature of this PR, these breakages are almost unavoidable, since the whole point is to transition off of the unique Massdrop system, and onto the standard RGB Matrix system. Plus, once XScorpion2's RGB Matrix performance improvements get merged, and |
Those reasons are good, but they don't address our primary concern- that these people may wake up one day, try to update qmk, and then have a merge conflict on their hand that they have no clue how to fix. Our preferred way to address that is for them sign off to let us know they're aware of and ok with this change to their files. |
Ah, gotcha. I'm was just trying to offer some background as to why things have changed the way they have 😄 |
Consider me warned 😃👍 |
Fine with the changes; don't really care about the RGB customization tbh. |
same here 🙂 |
@skullydazed well, we have the sign offs from affected users. And I believe that @patrickmt was going to test these changes too. |
Merged this into #5372 locally, and tested it with my CTRL. The performance was fantastic with the two worst offenders rgb_matrix_multisplash and rgb_matrix_digital_rain only taking 6ms of time to completed compared to the 35ms without the perf improvements. |
@patrickmt if you could check out this PR, and make sure it's okay? Though, like @XScorpion2 mentions, it may be worth testing this PR with #5372, as that PR drastically improves performance. |
https://github.com/XScorpion2/qmk_firmware/tree/dev/rgb_ctrl has all the goodies merged in if you want to use that for testing. Though I did a crap job merging in ws2812 support so don't try rgblight on that branch... |
I've taken a quick look at XScorpion2's branch: default_md keymaps for both CTRL and ALT do not compile. The main reason is that for #5096, there existed a global variable in rgb_matrix.h which replaced the Massdrop version's frame counter. To remedy this for my tests, I declared g_tick in tmk_core/protocol/arm_atsam/led_matrix.c and increment this counter once per flush. RGB updates are happening as fast as possible instead of their intended 10ms intervals. This is derailing other timings on the system. Again, methods were in place in #5096 that solved this issue. @daniel5151 please look into this again |
Hmm, thats odd that it's affecting system timings that much. Can you provide info on what you are seeing that is affected and on which board? I've got a CTRL that I've been using for testing, haven't had compile errors though, but just been using the Default keymap. Didn't even realize there was a default_md as well. Will try and repro it as well tonight and see if there are changes in rgb matrix that I should change too. Thanks for looking at this PR and my branch as well. |
@patrickmt does everything work as expected on this PR (i.e: without XScorpion2's changes)? |
Thought about it a bit more, I suspect the timings are animation speed related, which is actually expected with my PR as I did a lot to ensure the following:
So this means board performance will no longer affect animation speed, and you can adjust any value including speed to levels that you lile and the animation will respect it. The end result is that you can no longer use animation speed as an indication of performance, and the compared to previously the animations may appear faster or slower. So use the key code to increase or decrease speed to your desired level. |
OK, I see the issue with default_md. It is using a combination of RGB_MATRIX_SKIP_FRAMES 10, the old 32 bit g_tick timer, and USE_MASSDROP_CONFIGURATOR to ensure the 10ms interval animation timing. This is an easy fix and is entirely on my PR #5372. That being said, I'd suggest merging just this PR as is and don't merge my PR until I fixed the above issue. @patrickmt thanks again for the review. |
@daniel5151 I will be testing this PR alone as well soon. @XScorpion2 That sounds good if it is an easy fix and exactly what is missing. Thanks! |
That's why I don't necessarily trust Travis. Specifically, it's an issue with the recent zeal code change (sorry), and doesn't affect this. So aside from the Travis issues, this is good to go, correct? |
Good job everyone! |
* upstream/master: (445 commits) Update ps2avrgb template to use standard matrix/i2c code (qmk#4957) [Keyboard] Simplified handwired/xealous since most of the features are in core now. (qmk#5556) [Keyboard] Move scrabblepad into donutcables directory (qmk#5553) [Keymap] Additional RGB options set (qmk#5551) [Keyboard] Add Budget96 by Donut Cables (qmk#5550) [Keyboard] Added configurable defaults for RGB backlight parameters. (qmk#5549) Added Hacked Motospeed keyboard (qmk#5534) [Keymap] New HS60/v2 HHKB keymap for goatmaster (qmk#5545) [Keyboard] add treeadstone48 (qmk#5405) [Keyboard] Doro67 Multi PCB port (qmk#5539) [Keyboard] V60 Type R - Turn on leds for Configurator + Refactor (qmk#5546) RGB Matrix support for Massdrop CTRL/ALT (qmk#5328) Added encoder support to split common code (qmk#5477) Eager Per Row Debouncing added (added to Ergodox) (qmk#5498) Added configurable defaults for RGB backlight indicators. [Keyboard] Small Refactor of Duck boards (qmk#5521) [Keyboard] Quantrik Kyuu 65% Board (qmk#5541) Call default zeal60 rgb file remove call to custom rgb file Removed duplicated zeal60 files ...
* port Massdrop CTRL/ALT to use RGB Matrix Co-authored-by: Matt Schneeberger <[email protected]> * Massdrop lighting support working This commit is to get the Massdrop lighting code working again through use of the compilation define USE_MASSDROP_CONFIGURATOR added to a keymap's rules.mk. Added keymaps for both CTRL and ALT named default_md and mac_md. These should be used if the Massdrop style lighting is desired. * Updating config based on testing results with patrickmt & compile errors * Updates for PR5328 For CTRL and ALT: Moved location of new RGB Matrix macros from config_led.h to config.h. Added RGB_MATRIX_LED_FLUSH_LIMIT (time between flushes) to config.h for correct LED driver update timing. Re-added missing breathing code for when Massdrop configurator mode is defined. * remove prilik keymap form PR
* port Massdrop CTRL/ALT to use RGB Matrix Co-authored-by: Matt Schneeberger <[email protected]> * Massdrop lighting support working This commit is to get the Massdrop lighting code working again through use of the compilation define USE_MASSDROP_CONFIGURATOR added to a keymap's rules.mk. Added keymaps for both CTRL and ALT named default_md and mac_md. These should be used if the Massdrop style lighting is desired. * Updating config based on testing results with patrickmt & compile errors * Updates for PR5328 For CTRL and ALT: Moved location of new RGB Matrix macros from config_led.h to config.h. Added RGB_MATRIX_LED_FLUSH_LIMIT (time between flushes) to config.h for correct LED driver update timing. Re-added missing breathing code for when Massdrop configurator mode is defined. * remove prilik keymap form PR
* port Massdrop CTRL/ALT to use RGB Matrix Co-authored-by: Matt Schneeberger <[email protected]> * Massdrop lighting support working This commit is to get the Massdrop lighting code working again through use of the compilation define USE_MASSDROP_CONFIGURATOR added to a keymap's rules.mk. Added keymaps for both CTRL and ALT named default_md and mac_md. These should be used if the Massdrop style lighting is desired. * Updating config based on testing results with patrickmt & compile errors * Updates for PR5328 For CTRL and ALT: Moved location of new RGB Matrix macros from config_led.h to config.h. Added RGB_MATRIX_LED_FLUSH_LIMIT (time between flushes) to config.h for correct LED driver update timing. Re-added missing breathing code for when Massdrop configurator mode is defined. * remove prilik keymap form PR
* port Massdrop CTRL/ALT to use RGB Matrix Co-authored-by: Matt Schneeberger <[email protected]> * Massdrop lighting support working This commit is to get the Massdrop lighting code working again through use of the compilation define USE_MASSDROP_CONFIGURATOR added to a keymap's rules.mk. Added keymaps for both CTRL and ALT named default_md and mac_md. These should be used if the Massdrop style lighting is desired. * Updating config based on testing results with patrickmt & compile errors * Updates for PR5328 For CTRL and ALT: Moved location of new RGB Matrix macros from config_led.h to config.h. Added RGB_MATRIX_LED_FLUSH_LIMIT (time between flushes) to config.h for correct LED driver update timing. Re-added missing breathing code for when Massdrop configurator mode is defined. * remove prilik keymap form PR
…n respopnse to the last update (qmk#5328)
* rewrite keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c in respopnse to the last update (#5328) * remove print.h * changed default parameters, modified readme
* rewrite keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c in respopnse to the last update (qmk#5328) * remove print.h * changed default parameters, modified readme
Building off of the excellent work done by @helluvamatt a few months ago, this PR switches the Massdrop CTRL/ALT to use QMK's built-in RGB Matrix LED lighting system.
It does also implement 2 small RGB Matrix tweaks: a new breathing effect, and a
RGB_MATRIX_EXTRA_TOG
option. This brings RGB Matrix a bit closer feature-wise to the old Massdrop system.Description
USE_MASSDROP_CONFIGURATOR
enables overriding RGB Matrix effects with effects defined usingled_instruction_t led_instructions[]
.Known Issues
This PR breaks two keymaps: massdrop/alt:reywood and massdrop/ctrl:responsive_pattern
Performance
No EEPROM support (see EEPROM support for Massdrop arm_atsam (CTRL & ALT) #4625)
Future Improvements
Types of Changes
Issues Fixed or Closed by This PR
Checklist