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

Method actionOnMenuFreqOffset

src/AppFrame.cpp:2035–2050  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2033}
2034
2035bool AppFrame::actionOnMenuFreqOffset(wxCommandEvent &event) {
2036 if (event.GetId() == wxID_SET_FREQ_OFFSET) {
2037 //enter in KHz to accommodate > 2GHz shifts for down/upconverters on 32 bit platforms.
2038 long ofs = wxGetNumberFromUser(
2039 "Shift the displayed frequency by this amount of KHz.\ni.e. -125000 for -125 MHz", "Frequency (KHz)",
2040 "Frequency Offset", (long long) (wxGetApp().getOffset() / 1000.0), -2000000000, 2000000000, this);
2041 if (ofs != -1) {
2042 wxGetApp().setOffset((long long) ofs * 1000);
2043
2044 settingsMenuItems[wxID_SET_FREQ_OFFSET]->SetItemLabel(
2045 getSettingsLabel("Frequency Offset", to_string(wxGetApp().getOffset() / 1000), "KHz"));
2046 }
2047 return true;
2048 }
2049 return false;
2050}
2051
2052bool AppFrame::actionOnMenuIQSwap(wxCommandEvent &event) {
2053 if (event.GetId() == wxID_SET_IQSWAP) {

Callers

nothing calls this directly

Calls 2

getOffsetMethod · 0.45
setOffsetMethod · 0.45

Tested by

no test coverage detected