Updated rgb_led struct field modifier to flags (#5619)

Updated effects to test led flags
Updated massdrop to use new flags field for led toggle
This commit is contained in:
XScorpion2 2019-04-30 00:18:50 +02:00 committed by MechMerlin
parent 1d784f0f95
commit a7113c8ed0
57 changed files with 1164 additions and 1019 deletions

View file

@ -1,7 +1,7 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
extern rgb_config_t rgb_matrix_config;
// alphas = color1, mods = color2
@ -14,7 +14,8 @@ bool rgb_matrix_alphas_mods(effect_params_t* params) {
RGB rgb2 = hsv_to_rgb(hsv);
for (uint8_t i = led_min; i < led_max; i++) {
if (g_rgb_leds[i].modifier) {
RGB_MATRIX_TEST_LED_FLAGS();
if (HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_MODIFIER)) {
rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b);
} else {
rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b);