Fix invalid layer API usage in RGB Matrix docs (#25449)

This commit is contained in:
Joel Challis 2025-07-04 20:09:27 +01:00 committed by GitHub
parent 177e461d90
commit 9e103614f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -486,7 +486,7 @@ This example sets the modifiers to be a specific color based on the layer state.
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
hsv_t hsv = {0, 255, 255}; hsv_t hsv = {0, 255, 255};
if (layer_state_is(layer_state, 2)) { if (get_highest_layer(layer_state|default_layer_state) == 2) {
hsv = (hsv_t){130, 255, 255}; hsv = (hsv_t){130, 255, 255};
} else { } else {
hsv = (hsv_t){30, 255, 255}; hsv = (hsv_t){30, 255, 255};