| 1535 | } |
| 1536 | |
| 1537 | bool 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 | |
| 1569 | bool AppFrame::actionOnMenuSampleRate(wxCommandEvent& event) { |
| 1570 |
nothing calls this directly
no test coverage detected