summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/visualizer/led_test.c4
-rw-r--r--quantum/visualizer/visualizer.mk8
2 files changed, 5 insertions, 7 deletions
diff --git a/quantum/visualizer/led_test.c b/quantum/visualizer/led_test.c
index c2ea30b55b..a9abace8df 100644
--- a/quantum/visualizer/led_test.c
+++ b/quantum/visualizer/led_test.c
@@ -89,8 +89,8 @@ static uint8_t crossfade_start_frame[NUM_ROWS][NUM_COLS];
static uint8_t crossfade_end_frame[NUM_ROWS][NUM_COLS];
static uint8_t compute_gradient_color(float t, float index, float num) {
- const float two_pi = 2.0f * PI;
- float normalized_index = (1.0f - index / (num - 1)) * two_pi;
+ const float two_pi = M_2_PI;
+ float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi;
float x = t * two_pi + normalized_index;
float v = 0.5 * (cosf(x) + 1.0f);
return (uint8_t)(255.0f * v);
diff --git a/quantum/visualizer/visualizer.mk b/quantum/visualizer/visualizer.mk
index b5dfad8e1a..149968de72 100644
--- a/quantum/visualizer/visualizer.mk
+++ b/quantum/visualizer/visualizer.mk
@@ -25,6 +25,8 @@ EXTRAINCDIRS += $(GFXINC) $(VISUALIZER_DIR)
GFXLIB = $(LIB_PATH)/ugfx
VPATH += $(VISUALIZER_PATH)
+OPT_DEFS += -DVISUALIZER_ENABLE
+
ifdef LCD_ENABLE
OPT_DEFS += -DLCD_ENABLE
ULIBS += -lm
@@ -44,12 +46,8 @@ UDEFS += -DLED_ENABLE
endif
include $(GFXLIB)/gfx.mk
-#SERIAL_SRC = $(wildcard $(SERIAL_PATH)/protocol/*.c)
-#SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
-#SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
-#SRC += $(GFXSRC)
+SRC += $(patsubst $(TOP_DIR)/%,%,$(GFXSRC))
OPT_DEFS += $(patsubst %,-D%,$(patsubst -D%,%,$(GFXDEFS)))
-#ULIBS += $(patsubst %,-l%,$(patsubst -l%,%,$(GFXLIBS)))
ifndef VISUALIZER_USER
VISUALIZER_USER = visualizer_user.c