Fix missing define to map rgb_matrix function set to rgblight. #11084
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.
Necessary fix for rgb_matrix to work with via configurator.
Description
VIA configurator, a well known and convenient tool for changing settings and binds via generic HID protocol, allows to control rgblight QMK module. However, there is rgb_matrix - a separate LED module with more features and fancy effects. Right now a developer has to choose between having rgb_matrix and having VIA support. This PR aims to fix this.
In the core of QMK there is a list of defines that directly map rgb_matrix functions to rgblight ones (see rgb_matrix.h lines 152:192). The control interfaces of both rgblight and rgb_matrix are practically the same. The only function VIA uses that is not mapped is
eeconfig_update_rgblight_current
, and this PR fixes this.Now VIA does not have a template for rgb_matrix, but we can use it's ability to extend an existing config and define our own effect list that matches rgb_matrix effects. Another catch is that VIA effect speed slider range is 0..3, while qmk expects 0..255. For the sake of cleanness of the code base I suggest that effect speed setting is disabled in VIA config (it is still adjustable by keycodes RGB_SPI and RGB_SPD). If VIA devs find time to work on this, a new option of "lighting":"qmk_rgb_matrix" parameter may be added, that incorporates necessary changes.
As a result of this fix one can set
VIA_ENABLE = yes
andRGB_MATRIX_ENABLE = WS2812
and expect it to succesfully compile and work as expected. It was tested thoroughly on a live device (geekboards macropad v2) with no problems observed. I am willing to help test this with any other board that supports via+rgblight.Example of VIA config
Demo video
Types of Changes
Issues Fixed or Closed by This PR
Checklist