summaryrefslogtreecommitdiff
path: root/tmk_core/protocol
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-05-07 18:22:46 -0500
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-05-07 16:22:46 -0700
commitaf89752bffbaf5dcea30ea16be66b4d682701bc4 (patch)
treec82f2bc25409159a44778379db8b3a35afc47b8a /tmk_core/protocol
parentc7f8548d9af2045996294602d2a4bd9a214ae23c (diff)
downloadqmk_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/protocol')
-rw-r--r--tmk_core/protocol/arm_atsam/led_matrix.c9
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 a2eab1b563..ea067a7439 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
}
}
+extern led_config_t g_led_config;
static void led_matrix_massdrop_config_override(int i)
{
float ro = 0;
@@ -438,14 +439,14 @@ static void led_matrix_massdrop_config_override(int i)
float bo = 0;
float po = (led_animation_orientation)
- ? (float)g_rgb_leds[i].point.y / 64.f * 100
- : (float)g_rgb_leds[i].point.x / 224.f * 100;
+ ? (float)g_led_config.point[i].y / 64.f * 100
+ : (float)g_led_config.point[i].x / 224.f * 100;
uint8_t highest_active_layer = biton32(layer_state);
- if (led_lighting_mode == LED_MODE_KEYS_ONLY && HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_UNDERGLOW)) {
+ if (led_lighting_mode == LED_MODE_KEYS_ONLY && HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) {
//Do not act on this LED
- } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && !HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_UNDERGLOW)) {
+ } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && !HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) {
//Do not act on this LED
} else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) {
//Do not act on this LED (Only show indicators)