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

Method setSampleRate

Default/Source/SourceWidget.cpp:567–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565}
566
567void
568SourceWidget::setSampleRate(unsigned int rate)
569{
570 if (this->rate != rate) {
571 float step;
572 this->rate = rate;
573 if (rate == 0) {
574 this->setProcessRate(0);
575 this->ui->sampleRateLabel->setText("N/A");
576 } else {
577 this->ui->sampleRateLabel->setText(
578 SuWidgetsHelpers::formatQuantity(rate, 4, "sp/s"));
579 }
580
581 this->ui->bwSpin->setMaximum(this->rate);
582
583 step = SU_POW(10., SU_FLOOR(SU_LOG(this->rate)));
584
585 if (step >= 10.f)
586 step /= 10.f;
587 }
588}
589
590void
591SourceWidget::populateAntennaCombo(Suscan::AnalyzerSourceInfo const &info)

Callers 4

applySourceInfoMethod · 0.95
setProfileMethod · 0.95
onPSDMessageMethod · 0.95
installDataSaverMethod · 0.45

Calls 1

setProcessRateMethod · 0.95

Tested by

no test coverage detected