mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-09-28 08:16:37 -04:00
Don't show gain options if device has none
This commit is contained in:
parent
44ae37905b
commit
ed57350866
@ -600,8 +600,13 @@ void AppFrame::updateDeviceParams() {
|
||||
iqSwapMenuItem->Check(wxGetApp().getSDRThread()->getIQSwap());
|
||||
}
|
||||
|
||||
agcMenuItem = newSettingsMenu->AppendCheckItem(wxID_AGC_CONTROL, "Automatic Gain");
|
||||
agcMenuItem->Check(wxGetApp().getAGCMode());
|
||||
agcMenuItem = nullptr;
|
||||
if (soapyDev->listGains(SOAPY_SDR_RX, 0).size()) {
|
||||
agcMenuItem = newSettingsMenu->AppendCheckItem(wxID_AGC_CONTROL, "Automatic Gain");
|
||||
agcMenuItem->Check(wxGetApp().getAGCMode());
|
||||
} else if (wxGetApp().getAGCMode()) {
|
||||
wxGetApp().setAGCMode(false);
|
||||
}
|
||||
|
||||
SoapySDR::ArgInfoList::const_iterator args_i;
|
||||
settingArgs = soapyDev->getSettingInfo();
|
||||
@ -687,8 +692,6 @@ void AppFrame::updateDeviceParams() {
|
||||
demodTray->Layout();
|
||||
}
|
||||
|
||||
agcMenuItem->Check(wxGetApp().getAGCMode());
|
||||
|
||||
|
||||
#if USE_HAMLIB
|
||||
if (wxGetApp().getConfig()->getRigEnabled() && !wxGetApp().rigIsActive()) {
|
||||
|
Loading…
Reference in New Issue
Block a user