MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / actionOnMenuAGC

Method actionOnMenuAGC

src/AppFrame.cpp:1537–1567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1535}
1536
1537bool AppFrame::actionOnMenuAGC(wxCommandEvent& event) {
1538
1539 if (event.GetId() == wxID_AGC_CONTROL) {
1540
1541 if (wxGetApp().getDevice() == nullptr) {
1542 agcMenuItem->Check(true);
1543 return true;
1544 }
1545 if (!wxGetApp().getAGCMode()) {
1546 wxGetApp().setAGCMode(true);
1547 gainSpacerItem->Show(false);
1548 gainSizerItem->Show(false);
1549 demodTray->Layout();
1550 }
1551 else {
1552 wxGetApp().setAGCMode(false);
1553 gainSpacerItem->Show(true);
1554 gainSizerItem->Show(true);
1555 gainSizerItem->SetMinSize(wxGetApp().getDevice()->getSoapyDevice()->listGains(SOAPY_SDR_RX, 0).size() * 40, 0);
1556 demodTray->Layout();
1557 gainCanvas->updateGainUI();
1558 }
1559
1560 //full Refresh, some graphical elements has changed
1561 Refresh();
1562
1563 return true;
1564 }
1565
1566 return false;
1567}
1568
1569bool AppFrame::actionOnMenuSampleRate(wxCommandEvent& event) {
1570

Callers

nothing calls this directly

Calls 7

ShowMethod · 0.80
getSoapyDeviceMethod · 0.80
updateGainUIMethod · 0.80
getDeviceMethod · 0.45
getAGCModeMethod · 0.45
setAGCModeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected