Skip to content

Commit

Permalink
Let BACKLIGHT_ENABLE control the Infinity LEDs
Browse files Browse the repository at this point in the history
  • Loading branch information
fredizzimo committed Jun 3, 2017
1 parent aaa67f6 commit a916f4e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 16 deletions.
6 changes: 4 additions & 2 deletions build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,10 @@ ifeq ($(strip $(LCD_ENABLE)), yes)
CIE1931_CURVE = yes
endif

ifeq ($(strip $(LED_ENABLE)), yes)
CIE1931_CURVE = yes
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
CIE1931_CURVE = yes
endif
endif

ifeq ($(strip $(CIE1931_CURVE)), yes)
Expand Down
4 changes: 2 additions & 2 deletions keyboards/ergodox/infinity/animations.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "lcd_backlight_keyframes.h"
#endif

#ifdef LED_ENABLE
#ifdef BACKLIGHT_ENABLE
#include "led_keyframes.h"
#endif

Expand Down Expand Up @@ -61,7 +61,7 @@ keyframe_animation_t default_suspend_animation = {
};
#endif

#if defined(LED_ENABLE)
#if defined(BACKLIGHT_ENABLE)
#define CROSSFADE_TIME 1000
#define GRADIENT_TIME 3000

Expand Down
9 changes: 2 additions & 7 deletions keyboards/ergodox/infinity/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,10 @@ CUSTOM_MATRIX ?= yes # Custom matrix file
SERIAL_LINK_ENABLE = yes
VISUALIZER_ENABLE ?= yes
LCD_ENABLE ?= yes
LED_ENABLE ?= no
BACKLIGHT_ENABLE ?= yes
LCD_BACKLIGHT_ENABLE ?= yes
MIDI_ENABLE = no
RGBLIGHT_ENABLE = no

ifdef LCD_ENABLE
include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk
endif

ifdef LED_ENABLE
include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk
endif
include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk
2 changes: 1 addition & 1 deletion keyboards/ergodox/keymaps/333fred/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SUBPROJECT_DEFAULT = infinity
LCD_BACKLIGHT_ENABLE = yes
LCD_ENABLE = yes
LED_ENABLE = yes
BACKLIGHT_ENABLE = yes
BACKLIGHT_ENABLE = yes
NKRO_ENABLE = yes
TAP_DANCE_ENABLE = yes
Expand Down
4 changes: 2 additions & 2 deletions quantum/visualizer/visualizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) {
update_keyframe_animation(animations[i], &state, delta, &sleep_time);
}
}
#ifdef LED_ENABLE
#ifdef BACKLIGHT_ENABLE
gdispGFlush(LED_DISPLAY);
#endif

Expand Down Expand Up @@ -372,7 +372,7 @@ void visualizer_init(void) {
#ifdef LCD_ENABLE
LCD_DISPLAY = get_lcd_display();
#endif
#ifdef LED_ENABLE
#ifdef BACKLIGHT_ENABLE
LED_DISPLAY = get_led_display();
#endif

Expand Down
3 changes: 1 addition & 2 deletions quantum/visualizer/visualizer.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ SRC += $(VISUALIZER_DIR)/resources/lcd_logo.c
OPT_DEFS += -DLCD_BACKLIGHT_ENABLE
endif

ifeq ($(strip $(LED_ENABLE)), yes)
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
SRC += $(VISUALIZER_DIR)/led_keyframes.c
OPT_DEFS += -DLED_ENABLE
endif

include $(GFXLIB)/gfx.mk
Expand Down

0 comments on commit a916f4e

Please sign in to comment.