Skip to content

Commit 0193333

Browse files
committed
vfx: update FFT period
1 parent d498711 commit 0193333

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

main/src/user/vfx.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ static void vfx_task_handle(void *pvParameter)
5050
while (1) {
5151
#if defined(CONFIG_SCREEN_PANEL_OUTPUT_FFT)
5252
// LCD FFT Output
53+
uint8_t color_cnt = 0;
5354
uint16_t color_tmp = 0;
5455
uint16_t color_idx = 0;
5556
uint16_t color_ctr = vfx_ctr;
@@ -119,12 +120,17 @@ static void vfx_task_handle(void *pvParameter)
119120
}
120121
}
121122

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+
123129
if (color_idx > 511) {
124130
color_idx = 0;
125131
}
126132

127-
gfxSleepMilliseconds(16);
133+
gfxSleepMilliseconds(FFT_PERIOD);
128134
}
129135
fft_destroy(fft_plan);
130136
#else

0 commit comments

Comments
 (0)