Skip to content

Commit e973efa

Browse files
committed
Correct typo in magnitude variable
1 parent 5cfbf1b commit e973efa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/audio_spectrogram.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ int main() {
132132
// map the FFT magnitude values to pixel values
133133
for (int i = 0; i < (LCD_WIDTH / 2); i++) {
134134
// get the current FFT magnitude value
135-
q15_t magntitude = fft_mag_q15[i + FFT_BINS_SKIP];
135+
q15_t magnitude = fft_mag_q15[i + FFT_BINS_SKIP];
136136

137137
// scale it between 0 to 255 to map, so we can map it to a color based on the color map
138-
int color_index = (magntitude / FFT_MAG_MAX) * 255;
138+
int color_index = (magnitude / FFT_MAG_MAX) * 255;
139139

140140
if (color_index > 255) {
141141
color_index = 255;

0 commit comments

Comments
 (0)