We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d498711 commit 0193333Copy full SHA for 0193333
main/src/user/vfx.c
@@ -50,6 +50,7 @@ static void vfx_task_handle(void *pvParameter)
50
while (1) {
51
#if defined(CONFIG_SCREEN_PANEL_OUTPUT_FFT)
52
// LCD FFT Output
53
+ uint8_t color_cnt = 0;
54
uint16_t color_tmp = 0;
55
uint16_t color_idx = 0;
56
uint16_t color_ctr = vfx_ctr;
@@ -119,12 +120,17 @@ static void vfx_task_handle(void *pvParameter)
119
120
}
121
122
- color_idx = ++color_tmp;
123
+ if (++color_cnt % (16 / FFT_PERIOD) == 0) {
124
+ color_idx = ++color_tmp;
125
+ } else {
126
+ color_idx = color_tmp;
127
+ }
128
+
129
if (color_idx > 511) {
130
color_idx = 0;
131
132
- gfxSleepMilliseconds(16);
133
+ gfxSleepMilliseconds(FFT_PERIOD);
134
135
fft_destroy(fft_plan);
136
#else
0 commit comments