MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / onPSDMessage

Method onPSDMessage

Panoramic/Scanner.cpp:505–525  ·  view source on GitHub ↗

///////////////////////// Slots /////////////////////////////////////

Source from the content-addressed store, hash-verified

503
504////////////////////////////// Slots /////////////////////////////////////
505void
506Scanner::onPSDMessage(const Suscan::PSDMessage &msg)
507{
508 if (!this->fsGuessed) {
509 this->fs = msg.getSampleRate();
510 this->analyzer->setBufferingSize(this->rtt * this->fs / 1000);
511 this->analyzer->setBandwidth(this->fs);
512 this->fsGuessed = true;
513 this->views[0].fftBandwidth = this->views[1].fftBandwidth = this->fs;
514 this->getSpectrumView().setRange(this->freqMin, this->freqMax);
515 }
516
517 if (msg.size() == SIGDIGGER_SCANNER_SPECTRUM_SIZE) {
518 this->getSpectrumView().feed(
519 msg.get(),
520 nullptr,
521 msg.getFrequency());
522 }
523
524 emit spectrumUpdated();
525}
526
527void
528Scanner::onAnalyzerHalted(void)

Callers

nothing calls this directly

Calls 8

setBufferingSizeMethod · 0.80
setRangeMethod · 0.80
getSampleRateMethod · 0.45
setBandwidthMethod · 0.45
sizeMethod · 0.45
feedMethod · 0.45
getMethod · 0.45
getFrequencyMethod · 0.45

Tested by

no test coverage detected