Remove IS_HOST_LED_ON
and migrate usages (#19753)
This commit is contained in:
@@ -54,7 +54,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
bool rgb_matrix_indicators_user(void) {
|
||||
if (rgb_matrix_config.enable) {
|
||||
HSV hsv = rgb_matrix_config.hsv;
|
||||
if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
|
||||
if (host_keyboard_led_state().caps_lock) {
|
||||
HSV hsv_inv_hue = {hsv.h + 128, hsv.s, hsv.v};
|
||||
set_hsv_at(hsv_inv_hue, 30);
|
||||
}
|
||||
|
@@ -46,26 +46,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
// Capslock, Scroll lock and Numlock indicator
|
||||
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
if (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF);
|
||||
if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) {
|
||||
if (led_state.scroll_lock) {
|
||||
rgb_matrix_set_color(LED_I, RGB_GREEN);
|
||||
}
|
||||
|
||||
#ifdef INVERT_NUMLOCK_INDICATOR
|
||||
if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF
|
||||
if (!led_state.num_lock) { // on if NUM lock is OFF
|
||||
rgb_matrix_set_color(LED_B, RGB_GREEN);
|
||||
rgb_matrix_set_color(LED_N, RGB_GREEN);
|
||||
rgb_matrix_set_color(LED_M, RGB_GREEN);
|
||||
}
|
||||
#else
|
||||
if (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // Normal, on if NUM lock is ON
|
||||
if (led_state.num_lock) { // Normal, on if NUM lock is ON
|
||||
rgb_matrix_set_color(LED_B, RGB_GREEN);
|
||||
rgb_matrix_set_color(LED_N, RGB_GREEN);
|
||||
rgb_matrix_set_color(LED_M, RGB_GREEN);
|
||||
}
|
||||
#endif // INVERT_NUMLOCK_INDICATOR
|
||||
|
||||
if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
|
||||
if (led_state.caps_lock) {
|
||||
rgb_matrix_set_color(LED_CAPS, RGB_RED);
|
||||
rgb_matrix_set_color(LED_Q, RGB_RED);
|
||||
rgb_matrix_set_color(LED_A, RGB_RED);
|
||||
|
Reference in New Issue
Block a user