Makefile fixes and update of Visualizer
This commit is contained in:
		
							parent
							
								
									9772e697a0
								
							
						
					
					
						commit
						07d0d5cbe4
					
				
					 5 changed files with 29 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue