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

Method refreshCurrentAutoGain

Default/Source/SourceWidget.cpp:459–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457}
458
459void
460SourceWidget::refreshCurrentAutoGain(std::string const &driver)
461{
462 bool enableGains = true;
463
464 if (this->panelConfig->agcSettings.find(driver) !=
465 this->panelConfig->agcSettings.end()) {
466 GainPresetSetting setting = this->panelConfig->agcSettings[driver];
467
468 if (this->selectAutoGain(setting.name)) {
469 this->ui->autoGainSlider->setValue(setting.value);
470 enableGains = false;
471 } else {
472 this->selectAutoGain(0);
473 }
474 } else {
475 this->selectAutoGain(0);
476 }
477
478 this->ui->gainsFrame->setEnabled(enableGains);
479}
480
481void
482SourceWidget::setBandwidth(float bw)

Callers 3

refreshGainsMethod · 0.95
refreshAutoGainsMethod · 0.95
setProfileMethod · 0.95

Calls 4

selectAutoGainMethod · 0.95
setValueMethod · 0.80
endMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected