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

Method setSampleRate

Components/MainSpectrum.cpp:610–636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608}
609
610void
611MainSpectrum::setSampleRate(unsigned int rate)
612{
613 if (this->cachedRate != rate) {
614 int freq = static_cast<int>(rate);
615 bool lowerSideBand =
616 this->filterSkewness == SYMMETRIC || this->filterSkewness == LOWER;
617 bool upperSideBand =
618 this->filterSkewness == SYMMETRIC || this->filterSkewness == UPPER;
619
620 WATERFALL_CALL(setDemodRanges(
621 lowerSideBand ? -freq / 2 : 1,
622 1,
623 1,
624 upperSideBand ? +freq / 2 : 1,
625 this->filterSkewness == SYMMETRIC));
626
627 WATERFALL_CALL(setSampleRate(rate));
628
629 WATERFALL_CALL(setSpanFreq(rate / this->zoom));
630 this->ui->loLcd->setMin(-freq / 2 + this->getCenterFreq());
631 this->ui->loLcd->setMax(freq / 2 + this->getCenterFreq());
632
633 this->cachedRate = rate;
634 this->resAdjusted = false;
635 }
636}
637
638qint32 MainSpectrum::computeLowCutFreq(int bw) const
639{

Callers

nothing calls this directly

Calls 2

getCenterFreqMethod · 0.95
setMaxMethod · 0.80

Tested by

no test coverage detected