@@ -140,7 +140,7 @@ static void vfx_task(void *pvParameter)
140
140
xEventGroupSetBits (user_event_group , VFX_FFT_NULL_BIT );
141
141
142
142
fft_amp [0 ] = sqrt (pow (vfx_fft_output [0 ], 2 ) + pow (vfx_fft_output [1 ], 2 )) / FFT_N ;
143
- fft_out [0 ] = fft_amp [0 ] / (65536 / vfx_disp_height ) * vfx .scale_factor ;
143
+ fft_out [0 ] = fft_amp [0 ] / (65536 / vfx_disp_height ) * vfx .scale_factor * 2 ;
144
144
if (fft_out [0 ] > vfx_disp_height ) {
145
145
fft_out [0 ] = vfx_disp_height ;
146
146
} else if (fft_out [0 ] < 1 ) {
@@ -149,7 +149,7 @@ static void vfx_task(void *pvParameter)
149
149
150
150
for (uint16_t k = 1 ; k < FFT_N /2 ; k ++ ) {
151
151
fft_amp [k ] = sqrt (pow (vfx_fft_output [2 * k ], 2 ) + pow (vfx_fft_output [2 * k + 1 ], 2 )) / FFT_N * 2 ;
152
- fft_out [k ] = fft_amp [k ] / (65536 / vfx_disp_height ) * vfx .scale_factor ;
152
+ fft_out [k ] = fft_amp [k ] / (65536 / vfx_disp_height ) * vfx .scale_factor * 2 ;
153
153
if (fft_out [k ] > vfx_disp_height ) {
154
154
fft_out [k ] = vfx_disp_height ;
155
155
} else if (fft_out [k ] < 1 ) {
@@ -240,7 +240,7 @@ static void vfx_task(void *pvParameter)
240
240
xEventGroupSetBits (user_event_group , VFX_FFT_NULL_BIT );
241
241
242
242
fft_amp [0 ] = sqrt (pow (vfx_fft_output [0 ], 2 ) + pow (vfx_fft_output [1 ], 2 )) / FFT_N ;
243
- fft_out [0 ] = fft_amp [0 ] / (65536 / vfx_disp_height ) * vfx .scale_factor ;
243
+ fft_out [0 ] = fft_amp [0 ] / (65536 / vfx_disp_height ) * vfx .scale_factor * 2 ;
244
244
if (fft_out [0 ] > vfx_disp_height ) {
245
245
fft_out [0 ] = vfx_disp_height ;
246
246
} else if (fft_out [0 ] < 1 ) {
@@ -249,7 +249,7 @@ static void vfx_task(void *pvParameter)
249
249
250
250
for (uint16_t k = 1 ; k < FFT_N /2 ; k ++ ) {
251
251
fft_amp [k ] = sqrt (pow (vfx_fft_output [2 * k ], 2 ) + pow (vfx_fft_output [2 * k + 1 ], 2 )) / FFT_N * 2 ;
252
- fft_out [k ] = fft_amp [k ] / (65536 / vfx_disp_height ) * vfx .scale_factor ;
252
+ fft_out [k ] = fft_amp [k ] / (65536 / vfx_disp_height ) * vfx .scale_factor * 2 ;
253
253
if (fft_out [k ] > vfx_disp_height ) {
254
254
fft_out [k ] = vfx_disp_height ;
255
255
} else if (fft_out [k ] < 1 ) {
@@ -466,7 +466,7 @@ static void vfx_task(void *pvParameter)
466
466
xEventGroupSetBits (user_event_group , VFX_FFT_NULL_BIT );
467
467
468
468
fft_amp [0 ] = sqrt (pow (vfx_fft_output [0 ], 2 ) + pow (vfx_fft_output [1 ], 2 )) / FFT_N ;
469
- fft_out [0 ] = 20 * log10 (fft_amp [0 ]) / (65536 / vfx_disp_height ) * vfx .scale_factor ;
469
+ fft_out [0 ] = 20 * log10 (fft_amp [0 ]) / (65536 / vfx_disp_height ) * vfx .scale_factor * 2 ;
470
470
if (fft_out [0 ] > center_y ) {
471
471
fft_out [0 ] = center_y ;
472
472
} else if (fft_out [0 ] < 0 ) {
@@ -475,7 +475,7 @@ static void vfx_task(void *pvParameter)
475
475
476
476
for (uint16_t k = 1 ; k < FFT_N /2 ; k ++ ) {
477
477
fft_amp [k ] = sqrt (pow (vfx_fft_output [2 * k ], 2 ) + pow (vfx_fft_output [2 * k + 1 ], 2 )) / FFT_N * 2 ;
478
- fft_out [k ] = 20 * log10 (fft_amp [k ]) / (65536 / vfx_disp_height ) * vfx .scale_factor ;
478
+ fft_out [k ] = 20 * log10 (fft_amp [k ]) / (65536 / vfx_disp_height ) * vfx .scale_factor * 2 ;
479
479
if (fft_out [k ] > center_y ) {
480
480
fft_out [k ] = center_y ;
481
481
} else if (fft_out [k ] < 0 ) {
@@ -570,7 +570,7 @@ static void vfx_task(void *pvParameter)
570
570
xEventGroupSetBits (user_event_group , VFX_FFT_NULL_BIT );
571
571
572
572
fft_amp [0 ] = sqrt (pow (vfx_fft_output [0 ], 2 ) + pow (vfx_fft_output [1 ], 2 )) / FFT_N ;
573
- fft_out [0 ] = 20 * log10 (fft_amp [0 ]) / (65536 / vfx_disp_height ) * vfx .scale_factor ;
573
+ fft_out [0 ] = 20 * log10 (fft_amp [0 ]) / (65536 / vfx_disp_height ) * vfx .scale_factor * 2 ;
574
574
if (fft_out [0 ] > center_y ) {
575
575
fft_out [0 ] = center_y ;
576
576
} else if (fft_out [0 ] < 0 ) {
@@ -579,7 +579,7 @@ static void vfx_task(void *pvParameter)
579
579
580
580
for (uint16_t k = 1 ; k < FFT_N /2 ; k ++ ) {
581
581
fft_amp [k ] = sqrt (pow (vfx_fft_output [2 * k ], 2 ) + pow (vfx_fft_output [2 * k + 1 ], 2 )) / FFT_N * 2 ;
582
- fft_out [k ] = 20 * log10 (fft_amp [k ]) / (65536 / vfx_disp_height ) * vfx .scale_factor ;
582
+ fft_out [k ] = 20 * log10 (fft_amp [k ]) / (65536 / vfx_disp_height ) * vfx .scale_factor * 2 ;
583
583
if (fft_out [k ] > center_y ) {
584
584
fft_out [k ] = center_y ;
585
585
} else if (fft_out [k ] < 0 ) {
0 commit comments