Add localized LED flash effect on keypress to Massdrop ALT (#4340)
This commit is contained in:
parent
388df5359b
commit
63e212c0b7
6 changed files with 438 additions and 4 deletions
|
@ -257,13 +257,15 @@ issi3733_led_t *led_cur;
|
|||
uint8_t led_per_run = 15;
|
||||
float breathe_mult;
|
||||
|
||||
void led_matrix_run(led_setup_t *f)
|
||||
__attribute__ ((weak))
|
||||
void led_matrix_run(void)
|
||||
{
|
||||
float ro;
|
||||
float go;
|
||||
float bo;
|
||||
float px;
|
||||
uint8_t led_this_run = 0;
|
||||
led_setup_t *f = (led_setup_t*)led_setups[led_animation_id];
|
||||
|
||||
if (led_cur == 0) //Denotes start of new processing cycle in the case of chunked processing
|
||||
{
|
||||
|
@ -459,13 +461,19 @@ uint8_t led_matrix_init(void)
|
|||
|
||||
//Run led matrix code once for initial LED coloring
|
||||
led_cur = 0;
|
||||
led_matrix_run((led_setup_t*)led_setups[led_animation_id]);
|
||||
rgb_matrix_init_user();
|
||||
led_matrix_run();
|
||||
|
||||
DBGC(DC_LED_MATRIX_INIT_COMPLETE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void rgb_matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
#define LED_UPDATE_RATE 10 //ms
|
||||
|
||||
//led data processing can take time, so process data in chunks to free up the processor
|
||||
|
@ -502,7 +510,7 @@ void led_matrix_task(void)
|
|||
if (led_cur != lede)
|
||||
{
|
||||
//m15_off; //debug profiling
|
||||
led_matrix_run((led_setup_t*)led_setups[led_animation_id]);
|
||||
led_matrix_run();
|
||||
//m15_on; //debug profiling
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ typedef struct led_disp_s {
|
|||
} led_disp_t;
|
||||
|
||||
uint8_t led_matrix_init(void);
|
||||
void rgb_matrix_init_user(void);
|
||||
|
||||
#define LED_MODE_NORMAL 0 //Must be 0
|
||||
#define LED_MODE_KEYS_ONLY 1
|
||||
|
@ -134,7 +135,7 @@ extern void *led_setups[];
|
|||
extern issi3733_led_t *led_cur;
|
||||
extern issi3733_led_t *lede;
|
||||
|
||||
void led_matrix_run(led_setup_t *f);
|
||||
void led_matrix_run(void);
|
||||
void led_matrix_task(void);
|
||||
|
||||
void gcr_compute(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue