MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / handleScopeSpectrumProcessors

Method handleScopeSpectrumProcessors

src/AppFrame.cpp:2299–2339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2297}
2298
2299void AppFrame::handleScopeSpectrumProcessors() {
2300 SpectrumVisualProcessor *proc = wxGetApp().getSpectrumProcessor();
2301
2302 if (spectrumAvgMeter->inputChanged()) {
2303 float val = spectrumAvgMeter->getInputValue();
2304 if (val < 0.01) {
2305 val = 0.01f;
2306 }
2307 if (val > 0.99) {
2308 val = 0.99f;
2309 }
2310 spectrumAvgMeter->setLevel(val);
2311 proc->setFFTAverageRate(val);
2312
2313 GetStatusBar()->SetStatusText(
2314 wxString::Format(wxT("Spectrum averaging speed changed to %0.2f%%."), val * 100.0));
2315 }
2316
2317 SpectrumVisualProcessor *dproc = wxGetApp().getDemodSpectrumProcessor();
2318
2319 if (dproc) {
2320 dproc->setView(demodWaterfallCanvas->getViewState(), demodWaterfallCanvas->getCenterFrequency(),
2321 demodWaterfallCanvas->getBandwidth());
2322 }
2323
2324 SpectrumVisualProcessor *wproc = waterfallDataThread->getProcessor();
2325
2326 if (waterfallSpeedMeter->inputChanged()) {
2327 float val = waterfallSpeedMeter->getInputValue();
2328 waterfallSpeedMeter->setLevel(val);
2329 waterfallDataThread->setLinesPerSecond((int) ceil(val * val));
2330 waterfallCanvas->setLinesPerSecond((int) ceil(val * val));
2331 GetStatusBar()->SetStatusText(
2332 wxString::Format(wxT("Waterfall max speed changed to %d lines per second."), (int) ceil(val * val)));
2333 }
2334
2335 wproc->setView(waterfallCanvas->getViewState(), waterfallCanvas->getCenterFrequency(),
2336 waterfallCanvas->getBandwidth());
2337
2338 proc->setView(wproc->isView(), wproc->getCenterFrequency(), wproc->getBandwidth());
2339}
2340
2341void AppFrame::handleScopeProcessor() {
2342 if (scopeCanvas) {

Callers

nothing calls this directly

Calls 13

getSpectrumProcessorMethod · 0.80
getInputValueMethod · 0.80
setLevelMethod · 0.80
setFFTAverageRateMethod · 0.80
getViewStateMethod · 0.80
isViewMethod · 0.80
inputChangedMethod · 0.45
setViewMethod · 0.45
getCenterFrequencyMethod · 0.45
getBandwidthMethod · 0.45
getProcessorMethod · 0.45

Tested by

no test coverage detected