summaryrefslogtreecommitdiffstats
path: root/quantum/led_matrix/led_matrix.c
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2022-08-07 13:23:53 +0800
committerlokher <lokher@gmail.com>2022-08-07 13:23:53 +0800
commitc3f7cee76404e15b90bb399f3eebb34ec2a47354 (patch)
tree17dbd73aa0d0a547c527b7762ddf4eb739c95601 /quantum/led_matrix/led_matrix.c
parentc67d72639d15196807cfcac2f3c088b5a412b796 (diff)
Update led_matrix.c
Diffstat (limited to 'quantum/led_matrix/led_matrix.c')
-rw-r--r--quantum/led_matrix/led_matrix.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c
index 07b3bbca30..e79138132b 100644
--- a/quantum/led_matrix/led_matrix.c
+++ b/quantum/led_matrix/led_matrix.c
@@ -626,18 +626,18 @@ void led_matrix_increase_val(void) {
void led_matrix_decrease_val_helper(bool write_to_eeprom) {
led_matrix_set_val_eeprom_helper(qsub8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom);
+#ifdef LED_MATRIX_BRIGHTNESS_TURN_OFF_VAL
+ if (led_matrix_eeconfig.enable && led_matrix_eeconfig.val <= LED_MATRIX_BRIGHTNESS_TURN_OFF_VAL) {
+ dprintf("decrease_val to disable\n");
+ led_matrix_toggle_eeprom_helper(write_to_eeprom);
+ }
+#endif
}
void led_matrix_decrease_val_noeeprom(void) {
led_matrix_decrease_val_helper(false);
}
void led_matrix_decrease_val(void) {
led_matrix_decrease_val_helper(true);
-#ifdef LED_MATRIX_BRIGHTNESS_TURN_OFF_VAL
- if (led_matrix_eeconfig.enable && led_matrix_eeconfig.val <= LED_MATRIX_BRIGHTNESS_TURN_OFF_VAL) {
- dprintf("decrease_val to disable\n");
- led_matrix_toggle_eeprom_helper(true);
- }
-#endif
}
void led_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {