diff options
author | Nick Brassel <[email protected]> | 2024-11-27 21:29:12 +1100 |
---|---|---|
committer | Nick Brassel <[email protected]> | 2024-11-27 21:29:12 +1100 |
commit | 9f76541b29056150cf57d69569a14a59e13995c7 (patch) | |
tree | 66c7398d873fcda88aebe3090603aefe045ff52e /keyboards/system76/launch_1/rgb_matrix_kb.inc | |
parent | 57be4871616ee9a8fe042f6186010d436ec7d4b1 (diff) | |
parent | eb04b94eecbb9b3e64ca9c74f937b5f762440b17 (diff) | |
download | qmk_firmware-9f76541b29056150cf57d69569a14a59e13995c7.tar.gz qmk_firmware-9f76541b29056150cf57d69569a14a59e13995c7.zip |
Merge branch 'develop'
Diffstat (limited to 'keyboards/system76/launch_1/rgb_matrix_kb.inc')
-rw-r--r-- | keyboards/system76/launch_1/rgb_matrix_kb.inc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/keyboards/system76/launch_1/rgb_matrix_kb.inc b/keyboards/system76/launch_1/rgb_matrix_kb.inc index f29183dde0..abde7aae19 100644 --- a/keyboards/system76/launch_1/rgb_matrix_kb.inc +++ b/keyboards/system76/launch_1/rgb_matrix_kb.inc @@ -46,7 +46,7 @@ static bool active_keys(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); uint8_t layer = get_highest_layer(layer_state); - RGB rgb = hsv_to_rgb(rgb_matrix_config.hsv); + rgb_t rgb = hsv_to_rgb(rgb_matrix_config.hsv); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); @@ -69,7 +69,7 @@ static bool active_keys(effect_params_t* params) { return led_max < RGB_MATRIX_LED_COUNT; } -RGB raw_rgb_data[RGB_MATRIX_LED_COUNT] = {0}; +rgb_t raw_rgb_data[RGB_MATRIX_LED_COUNT] = {0}; static uint8_t normalize_component(uint8_t component) { uint16_t x = (uint16_t)component; @@ -78,9 +78,9 @@ static uint8_t normalize_component(uint8_t component) { return (uint8_t)x; } -static RGB normalize_index(uint8_t i) { - RGB raw = raw_rgb_data[i]; - RGB rgb = { +static rgb_t normalize_index(uint8_t i) { + rgb_t raw = raw_rgb_data[i]; + rgb_t rgb = { .r = normalize_component(raw.r), .g = normalize_component(raw.g), .b = normalize_component(raw.b), @@ -92,7 +92,7 @@ static bool raw_rgb(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - RGB rgb = normalize_index(i); + rgb_t rgb = normalize_index(i); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } return led_max < RGB_MATRIX_LED_COUNT; @@ -137,7 +137,7 @@ static bool unlocked(effect_params_t* params) { for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - HSV hsv = { + hsv_t hsv = { .h = i + unlocked_ticks, .s = 0xFF, .v = 0x70, @@ -149,7 +149,7 @@ static bool unlocked(effect_params_t* params) { } } - RGB rgb = hsv_to_rgb(hsv); + rgb_t rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } return led_max < RGB_MATRIX_LED_COUNT; |