mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-11-03 23:02:34 +01:00 
			
		
		
		
	[Keyboard] correct indicator light states (#5434)
function of indicator lights was inverted. these changes correct that.
This commit is contained in:
		
							parent
							
								
									3e7a2c49a6
								
							
						
					
					
						commit
						a6c9e53510
					
				@ -113,20 +113,20 @@ void matrix_scan_user(void) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void led_set_user(uint8_t usb_led) {
 | 
					void led_set_user(uint8_t usb_led) {
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
 | 
				
			||||||
    writePinLow(B6);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(B6);
 | 
					    writePinHigh(B6);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(B6);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
 | 
				
			||||||
    writePinLow(B5);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(B5);
 | 
					    writePinHigh(B5);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(B5);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  /*
 | 
					  /*
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
 | 
				
			||||||
    writePinLow(C6);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(C6);
 | 
					    writePinHigh(C6);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(C6);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  */
 | 
					  */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -135,9 +135,9 @@ void led_set_user(uint8_t usb_led) {
 | 
				
			|||||||
uint32_t layer_state_set_user(uint32_t state)
 | 
					uint32_t layer_state_set_user(uint32_t state)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (biton32(state) == 2) {
 | 
					    if (biton32(state) == 2) {
 | 
				
			||||||
    writePinLow(C6);
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
    writePinHigh(C6);
 | 
					    writePinHigh(C6);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							writePinLow(C6);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return state;
 | 
					    return state;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -71,20 +71,20 @@ void matrix_scan_user(void) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void led_set_user(uint8_t usb_led) {
 | 
					void led_set_user(uint8_t usb_led) {
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
 | 
				
			||||||
    writePinLow(B6);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(B6);
 | 
					    writePinHigh(B6);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(B6);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
 | 
				
			||||||
    writePinLow(B5);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(B5);
 | 
					    writePinHigh(B5);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(B5);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  /*
 | 
					  /*
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
 | 
				
			||||||
    writePinLow(C6);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(C6);
 | 
					    writePinHigh(C6);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(C6);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  */
 | 
					  */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -93,9 +93,9 @@ void led_set_user(uint8_t usb_led) {
 | 
				
			|||||||
uint32_t layer_state_set_user(uint32_t state)
 | 
					uint32_t layer_state_set_user(uint32_t state)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (biton32(state) == 2) {
 | 
					    if (biton32(state) == 2) {
 | 
				
			||||||
    writePinLow(C6);
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
    writePinHigh(C6);
 | 
					    writePinHigh(C6);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							writePinLow(C6);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return state;
 | 
					    return state;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -44,20 +44,20 @@ void matrix_scan_user(void) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void led_set_user(uint8_t usb_led) {
 | 
					void led_set_user(uint8_t usb_led) {
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
 | 
				
			||||||
    writePinLow(B2);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(B2);
 | 
					    writePinHigh(B2);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(B2);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
 | 
				
			||||||
    writePinLow(B1);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(B1);
 | 
					    writePinHigh(B1);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(B1);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
 | 
				
			||||||
    writePinLow(B3);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(B3);
 | 
					    writePinHigh(B3);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(B3);
 | 
				
			||||||
  }*/
 | 
					  }*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -66,9 +66,9 @@ void led_set_user(uint8_t usb_led) {
 | 
				
			|||||||
uint32_t layer_state_set_user(uint32_t state)
 | 
					uint32_t layer_state_set_user(uint32_t state)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (biton32(state) == 1) {
 | 
					    if (biton32(state) == 1) {
 | 
				
			||||||
    writePinLow(B3);
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
    writePinHigh(B3);
 | 
					    writePinHigh(B3);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							writePinLow(B3);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return state;
 | 
					    return state;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -43,20 +43,20 @@ void matrix_scan_user(void) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void led_set_user(uint8_t usb_led) {
 | 
					void led_set_user(uint8_t usb_led) {
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
 | 
				
			||||||
    writePinLow(B2);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(B2);
 | 
					    writePinHigh(B2);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(B2);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
 | 
				
			||||||
    writePinLow(B1);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(B1);
 | 
					    writePinHigh(B1);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(B1);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
  if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
 | 
					  if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
 | 
				
			||||||
    writePinLow(B3);
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    writePinHigh(B3);
 | 
					    writePinHigh(B3);
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    writePinLow(B3);
 | 
				
			||||||
  }*/
 | 
					  }*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -65,9 +65,9 @@ void led_set_user(uint8_t usb_led) {
 | 
				
			|||||||
uint32_t layer_state_set_user(uint32_t state)
 | 
					uint32_t layer_state_set_user(uint32_t state)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (biton32(state) == 1) {
 | 
					    if (biton32(state) == 1) {
 | 
				
			||||||
    writePinLow(B3);
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
    writePinHigh(B3);
 | 
					    writePinHigh(B3);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							writePinLow(B3);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return state;
 | 
					    return state;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user