@@ -25,6 +25,8 @@ namespace displaymenu {
2525 int fftHoldSpeed = 60 ;
2626 bool fftSmoothing = false ;
2727 int fftSmoothingSpeed = 100 ;
28+ bool snrSmoothing = false ;
29+ int snrSmoothingSpeed = 20 ;
2830
2931 OptionList<float , float > uiScales;
3032
@@ -63,6 +65,7 @@ namespace displaymenu {
6365 void updateFFTSpeeds () {
6466 gui::waterfall.setFFTHoldSpeed ((float )fftHoldSpeed / ((float )fftRate * 10 .0f ));
6567 gui::waterfall.setFFTSmoothingSpeed (std::min<float >((float )fftSmoothingSpeed / (float )(fftRate * 10 .0f ), 1 .0f ));
68+ gui::waterfall.setSNRSmoothingSpeed (std::min<float >((float )snrSmoothingSpeed / (float )(fftRate * 10 .0f ), 1 .0f ));
6669 }
6770
6871 void init () {
@@ -111,6 +114,9 @@ namespace displaymenu {
111114 fftSmoothing = core::configManager.conf [" fftSmoothing" ];
112115 fftSmoothingSpeed = core::configManager.conf [" fftSmoothingSpeed" ];
113116 gui::waterfall.setFFTSmoothing (fftSmoothing);
117+ snrSmoothing = core::configManager.conf [" snrSmoothing" ];
118+ snrSmoothingSpeed = core::configManager.conf [" snrSmoothingSpeed" ];
119+ gui::waterfall.setSNRSmoothing (snrSmoothing);
114120 updateFFTSpeeds ();
115121
116122 // Define and load UI scales
@@ -151,30 +157,44 @@ namespace displaymenu {
151157 core::configManager.conf [" fftHold" ] = fftHold;
152158 core::configManager.release (true );
153159 }
160+ ImGui::SameLine ();
161+ ImGui::FillWidth ();
162+ if (ImGui::InputInt (" ##sdrpp_fft_hold_speed" , &fftHoldSpeed)) {
163+ updateFFTSpeeds ();
164+ core::configManager.acquire ();
165+ core::configManager.conf [" fftHoldSpeed" ] = fftHoldSpeed;
166+ core::configManager.release (true );
167+ }
154168
155169 if (ImGui::Checkbox (" FFT Smoothing##_sdrpp" , &fftSmoothing)) {
156170 gui::waterfall.setFFTSmoothing (fftSmoothing);
157171 core::configManager.acquire ();
158172 core::configManager.conf [" fftSmoothing" ] = fftSmoothing;
159173 core::configManager.release (true );
160174 }
161-
162- ImGui::LeftLabel (" FFT Hold Speed" );
175+ ImGui::SameLine ();
163176 ImGui::FillWidth ();
164- if (ImGui::InputInt (" ##sdrpp_fft_hold_speed" , &fftHoldSpeed)) {
177+ if (ImGui::InputInt (" ##sdrpp_fft_smoothing_speed" , &fftSmoothingSpeed)) {
178+ fftSmoothingSpeed = std::max<int >(fftSmoothingSpeed, 1 );
165179 updateFFTSpeeds ();
166180 core::configManager.acquire ();
167- core::configManager.conf [" fftHoldSpeed " ] = fftHoldSpeed ;
181+ core::configManager.conf [" fftSmoothingSpeed " ] = fftSmoothingSpeed ;
168182 core::configManager.release (true );
169183 }
170184
171- ImGui::LeftLabel (" FFT Smoothing Speed" );
185+ if (ImGui::Checkbox (" SNR Smoothing##_sdrpp" , &snrSmoothing)) {
186+ gui::waterfall.setSNRSmoothing (snrSmoothing);
187+ core::configManager.acquire ();
188+ core::configManager.conf [" snrSmoothing" ] = snrSmoothing;
189+ core::configManager.release (true );
190+ }
191+ ImGui::SameLine ();
172192 ImGui::FillWidth ();
173- if (ImGui::InputInt (" ##sdrpp_fft_smoothing_speed " , &fftSmoothingSpeed )) {
174- fftSmoothingSpeed = std::max<int >(fftSmoothingSpeed , 1 );
193+ if (ImGui::InputInt (" ##sdrpp_snr_smoothing_speed " , &snrSmoothingSpeed )) {
194+ snrSmoothingSpeed = std::max<int >(snrSmoothingSpeed , 1 );
175195 updateFFTSpeeds ();
176196 core::configManager.acquire ();
177- core::configManager.conf [" fftSmoothingSpeed " ] = fftSmoothingSpeed ;
197+ core::configManager.conf [" snrSmoothingSpeed " ] = snrSmoothingSpeed ;
178198 core::configManager.release (true );
179199 }
180200
0 commit comments