mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-27 06:08:37 -05:00
spectrum visual spacing/floor tweak
This commit is contained in:
parent
3c822e1bd8
commit
2b7edb9b0f
@ -784,6 +784,9 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
|
||||
if (val < 0.01) {
|
||||
val = 0.01;
|
||||
}
|
||||
if (val > 0.99) {
|
||||
val = 0.99;
|
||||
}
|
||||
spectrumAvgMeter->setLevel(val);
|
||||
proc->setFFTAverageRate(val);
|
||||
|
||||
|
@ -290,7 +290,7 @@ void SpectrumVisualProcessor::process() {
|
||||
fft_floor_maa = fft_floor_maa + (fft_floor_ma - fft_floor_maa) * 0.05;
|
||||
|
||||
for (int i = 0, iMax = fftSize; i < iMax; i++) {
|
||||
float v = (log10(fft_result_maa[i]+0.25 - (fft_floor_maa-1.0)) / log10((fft_ceil_maa+0.25) - (fft_floor_maa-1.0)));
|
||||
float v = (log10(fft_result_maa[i]+0.25 - (fft_floor_maa-0.75)) / log10((fft_ceil_maa+0.25) - (fft_floor_maa-0.75)));
|
||||
output->spectrum_points[i * 2] = ((float) i / (float) iMax);
|
||||
output->spectrum_points[i * 2 + 1] = v;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user