diff options
Diffstat (limited to 'apps/plugins/fft/fft.c')
-rw-r--r-- | apps/plugins/fft/fft.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c index e591954664..2b7f6a4fbe 100644 --- a/apps/plugins/fft/fft.c +++ b/apps/plugins/fft/fft.c | |||
@@ -929,13 +929,15 @@ static void draw_spectrogram_vertical(unsigned this_max, unsigned graph_max) | |||
929 | if(bins_acc >= ARRAYLEN_PLOT) | 929 | if(bins_acc >= ARRAYLEN_PLOT) |
930 | { | 930 | { |
931 | unsigned index = (SHADES-1)*bins_max / graph_max; | 931 | unsigned index = (SHADES-1)*bins_max / graph_max; |
932 | unsigned color; | ||
932 | 933 | ||
933 | /* These happen because we exaggerate the graph a little for | 934 | /* These happen because we exaggerate the graph a little for |
934 | * linear mode */ | 935 | * linear mode */ |
935 | if(index >= SHADES) | 936 | if(index >= SHADES) |
936 | index = SHADES-1; | 937 | index = SHADES-1; |
937 | 938 | ||
938 | mylcd_set_foreground(SPECTROGRAPH_PALETTE(index)); | 939 | color = FB_UNPACK_SCALAR_LCD(SPECTROGRAPH_PALETTE(index)); |
940 | mylcd_set_foreground(color); | ||
939 | mylcd_drawpixel(fft_spectrogram_pos, y); | 941 | mylcd_drawpixel(fft_spectrogram_pos, y); |
940 | 942 | ||
941 | if(--y < 0) | 943 | if(--y < 0) |
@@ -973,13 +975,15 @@ static void draw_spectrogram_horizontal(unsigned this_max, unsigned graph_max) | |||
973 | if(bins_acc >= ARRAYLEN_PLOT) | 975 | if(bins_acc >= ARRAYLEN_PLOT) |
974 | { | 976 | { |
975 | unsigned index = (SHADES-1)*bins_max / graph_max; | 977 | unsigned index = (SHADES-1)*bins_max / graph_max; |
978 | unsigned color; | ||
976 | 979 | ||
977 | /* These happen because we exaggerate the graph a little for | 980 | /* These happen because we exaggerate the graph a little for |
978 | * linear mode */ | 981 | * linear mode */ |
979 | if(index >= SHADES) | 982 | if(index >= SHADES) |
980 | index = SHADES-1; | 983 | index = SHADES-1; |
981 | 984 | ||
982 | mylcd_set_foreground(SPECTROGRAPH_PALETTE(index)); | 985 | color = FB_UNPACK_SCALAR_LCD(SPECTROGRAPH_PALETTE(index)); |
986 | mylcd_set_foreground(color); | ||
983 | mylcd_drawpixel(x, fft_spectrogram_pos); | 987 | mylcd_drawpixel(x, fft_spectrogram_pos); |
984 | 988 | ||
985 | if(++x >= LCD_WIDTH) | 989 | if(++x >= LCD_WIDTH) |