cancel RGB matrix indicator

This commit is contained in:
NaturalZh 2024-03-14 10:07:11 +08:00
parent ce713759a8
commit 8851b89c27
2 changed files with 13 additions and 7 deletions

View File

@ -61,7 +61,7 @@ const uint16_t PROGMEM dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES] = {
DIP_SWITCH_OFF_ON(TO(0), TO(1)),
};
#endif
/*
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
switch (get_highest_layer(layer_state)) {
@ -87,4 +87,4 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
}
return true;
}
*/

View File

@ -271,35 +271,41 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
//caps lock display
if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 255, 255, 255);
// RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 255, 255, 255);
IND = IND | CAPS_ON;
} else {
/*
if (!rgb_matrix_get_flags()) {
RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 0, 0, 0);
}
*/
IND = IND & (~CAPS_ON);
}
//number lock display
if (host_keyboard_led_state().num_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_INDEX, 255, 255, 255);
// RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_INDEX, 255, 255, 255);
IND = IND | NUM_ON;
} else {
/*
if (!rgb_matrix_get_flags()) {
RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_INDEX, 0, 0, 0);
}
*/
IND = IND & (~NUM_ON);
}
//scroll lock display
if (host_keyboard_led_state().scroll_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(SCR_LOCK_INDEX, 255, 255, 255);
// RGB_MATRIX_INDICATOR_SET_COLOR(SCR_LOCK_INDEX, 255, 255, 255);
IND = IND | SCR_ON;
} else {
/*
if (!rgb_matrix_get_flags()) {
RGB_MATRIX_INDICATOR_SET_COLOR(SCR_LOCK_INDEX, 0, 0, 0);
}
*/
IND = IND & (~SCR_ON);
}
/*
switch (get_highest_layer(layer_state)) {
case 0:{
if (FN_ON) {
@ -330,7 +336,7 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
return true;
}
*/
s_serial_to_parallel(IND);
return true;
}