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

Method onToggleSNR

Default/GenericInspector/InspectorUI.cpp:808–823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806}
807
808void
809InspectorUI::onToggleSNR(void)
810{
811 this->estimating = this->ui->snrButton->isChecked();
812
813 if (this->estimating) {
814 this->estimator.setSigma(1.f);
815 this->estimator.setAlpha(1.f / (this->decider.getIntervals()));
816 gettimeofday(&this->last_estimator_update, nullptr);
817 } else {
818 std::vector<float> empty;
819 this->ui->histogram->setSNRModel(empty);
820 }
821
822 this->ui->snrResetButton->setEnabled(this->estimating);
823}
824
825void
826InspectorUI::onResetSNR(void)

Callers

nothing calls this directly

Calls 3

setSigmaMethod · 0.80
setAlphaMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected