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

Method actionOnMenuSDRStartStop

src/AppFrame.cpp:2100–2113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2098}
2099
2100bool AppFrame::actionOnMenuSDRStartStop(wxCommandEvent &event) {
2101 if (event.GetId() == wxID_SDR_START_STOP) {
2102 if (!wxGetApp().getSDRThread()->isTerminated()) {
2103 wxGetApp().stopDevice(true, 2000);
2104 } else {
2105 SDRDeviceInfo *dev = wxGetApp().getDevice();
2106 if (dev != nullptr) {
2107 wxGetApp().setDevice(dev, 0);
2108 }
2109 }
2110 return true;
2111 }
2112 return false;
2113}
2114
2115void AppFrame::OnClose(wxCloseEvent& event) {
2116 wxGetApp().closeDeviceSelector();

Callers

nothing calls this directly

Calls 5

getSDRThreadMethod · 0.80
stopDeviceMethod · 0.80
isTerminatedMethod · 0.45
getDeviceMethod · 0.45
setDeviceMethod · 0.45

Tested by

no test coverage detected