| 2066 | } |
| 2067 | |
| 2068 | bool AppFrame::actionOnMenuPerformance(wxCommandEvent &event) { |
| 2069 | if (event.GetId() >= wxID_PERF_BASE && event.GetId() <= wxID_PERF_BASE + (int) AppConfig::PERF_HIGH) { |
| 2070 | |
| 2071 | int perfEnumAsInt = event.GetId() - wxID_PERF_BASE; |
| 2072 | AppConfig::PerfModeEnum perfEnumSet = AppConfig::PERF_NORMAL; |
| 2073 | |
| 2074 | if (perfEnumAsInt == (int) AppConfig::PERF_HIGH) { |
| 2075 | perfEnumSet = AppConfig::PERF_HIGH; |
| 2076 | |
| 2077 | } else if (perfEnumAsInt == (int) AppConfig::PERF_LOW) { |
| 2078 | perfEnumSet = AppConfig::PERF_LOW; |
| 2079 | } |
| 2080 | |
| 2081 | wxGetApp().getConfig()->setPerfMode(perfEnumSet); |
| 2082 | |
| 2083 | //update Channelizer mode: |
| 2084 | if (perfEnumSet == AppConfig::PERF_HIGH) { |
| 2085 | wxGetApp().setChannelizerType(SDRPostPFBCH2); |
| 2086 | } else { |
| 2087 | wxGetApp().setChannelizerType(SDRPostPFBCH); |
| 2088 | } |
| 2089 | |
| 2090 | //update UI |
| 2091 | wxMenuItem *selectedPerfModeItem = performanceMenuItems[event.GetId()]; |
| 2092 | performanceMenuItems[wxID_PERF_CURRENT]->SetItemLabel( |
| 2093 | getSettingsLabel("CPU usage", selectedPerfModeItem->GetItemLabel().ToStdString())); |
| 2094 | |
| 2095 | return true; |
| 2096 | } |
| 2097 | return false; |
| 2098 | } |
| 2099 | |
| 2100 | bool AppFrame::actionOnMenuSDRStartStop(wxCommandEvent &event) { |
| 2101 | if (event.GetId() == wxID_SDR_START_STOP) { |
nothing calls this directly
no test coverage detected