diff options
| author | XScorpion2 <rcalt2vt@gmail.com> | 2019-05-07 18:22:46 -0500 |
|---|---|---|
| committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-05-07 16:22:46 -0700 |
| commit | af89752bffbaf5dcea30ea16be66b4d682701bc4 (patch) | |
| tree | c82f2bc25409159a44778379db8b3a35afc47b8a /tmk_core | |
| parent | c7f8548d9af2045996294602d2a4bd9a214ae23c (diff) | |
| download | qmk_firmware-af89752bffbaf5dcea30ea16be66b4d682701bc4.tar.gz qmk_firmware-af89752bffbaf5dcea30ea16be66b4d682701bc4.zip | |
rgb_led struct conversion (aka: Per led (key) type rgb matrix effects - part 2) (#5783)
* Initial conversion of the rgb_led struct
* Converting last keyboard & updating effects to take advantage of the new structure
* New struct should not be const
* Updated docs
* Changing define ___ for no led to NO_LED
* Missed converting some keymap usages of the old struct layout
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/protocol/arm_atsam/led_matrix.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index a2eab1b56..ea067a743 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c | |||
| @@ -431,6 +431,7 @@ static void led_run_pattern(led_setup_t *f, float* ro, float* go, float* bo, flo | |||
| 431 | } | 431 | } |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | extern led_config_t g_led_config; | ||
| 434 | static void led_matrix_massdrop_config_override(int i) | 435 | static void led_matrix_massdrop_config_override(int i) |
| 435 | { | 436 | { |
| 436 | float ro = 0; | 437 | float ro = 0; |
| @@ -438,14 +439,14 @@ static void led_matrix_massdrop_config_override(int i) | |||
| 438 | float bo = 0; | 439 | float bo = 0; |
| 439 | 440 | ||
| 440 | float po = (led_animation_orientation) | 441 | float po = (led_animation_orientation) |
| 441 | ? (float)g_rgb_leds[i].point.y / 64.f * 100 | 442 | ? (float)g_led_config.point[i].y / 64.f * 100 |
| 442 | : (float)g_rgb_leds[i].point.x / 224.f * 100; | 443 | : (float)g_led_config.point[i].x / 224.f * 100; |
| 443 | 444 | ||
| 444 | uint8_t highest_active_layer = biton32(layer_state); | 445 | uint8_t highest_active_layer = biton32(layer_state); |
| 445 | 446 | ||
| 446 | if (led_lighting_mode == LED_MODE_KEYS_ONLY && HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_UNDERGLOW)) { | 447 | if (led_lighting_mode == LED_MODE_KEYS_ONLY && HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { |
| 447 | //Do not act on this LED | 448 | //Do not act on this LED |
| 448 | } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && !HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_UNDERGLOW)) { | 449 | } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && !HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { |
| 449 | //Do not act on this LED | 450 | //Do not act on this LED |
| 450 | } else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) { | 451 | } else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) { |
| 451 | //Do not act on this LED (Only show indicators) | 452 | //Do not act on this LED (Only show indicators) |
