| 2297 | } |
| 2298 | |
| 2299 | void 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 | |
| 2341 | void AppFrame::handleScopeProcessor() { |
| 2342 | if (scopeCanvas) { |
nothing calls this directly
no test coverage detected