mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-11 18:28:57 -04:00
Adds feature to Swap I/Q
This commit is contained in:
+27
-20
@@ -129,33 +129,36 @@ AppFrame::AppFrame() :
|
||||
// Make a menubar
|
||||
wxMenuBar *menuBar = new wxMenuBar;
|
||||
wxMenu *menu = new wxMenu;
|
||||
|
||||
menu->Append(wxID_SET_FREQ_OFFSET, "Set Frequency Offset");
|
||||
menu->Append(wxID_SET_PPM, "Set Device PPM");
|
||||
|
||||
wxMenu *dsMenu = new wxMenu;
|
||||
menu->Append(wxID_OPEN, "&Open Session");
|
||||
menu->Append(wxID_SAVE, "&Save Session");
|
||||
menu->Append(wxID_SAVEAS, "Save Session &As..");
|
||||
menu->AppendSeparator();
|
||||
menu->Append(wxID_RESET, "&Reset Session");
|
||||
|
||||
#ifndef __APPLE__
|
||||
menu->AppendSeparator();
|
||||
menu->Append(wxID_CLOSE);
|
||||
#endif
|
||||
|
||||
menuBar->Append(menu, wxT("&File"));
|
||||
|
||||
menu = new wxMenu;
|
||||
|
||||
menu->Append(wxID_SET_FREQ_OFFSET, "Frequency Offset");
|
||||
menu->Append(wxID_SET_PPM, "Device PPM");
|
||||
iqSwapMenuItem = menu->AppendCheckItem(wxID_SET_SWAP_IQ, "Swap I/Q");
|
||||
|
||||
wxMenu *dsMenu = new wxMenu;
|
||||
|
||||
dsMenu->AppendRadioItem(wxID_SET_DS_OFF, "Off");
|
||||
dsMenu->AppendRadioItem(wxID_SET_DS_I, "I-ADC");
|
||||
dsMenu->AppendRadioItem(wxID_SET_DS_Q, "Q-ADC");
|
||||
|
||||
menu->AppendSubMenu(dsMenu, "Direct Sampling");
|
||||
|
||||
wxMenu *sessionMenu = new wxMenu;
|
||||
sessionMenu->Append(wxID_OPEN, "&Open Session");
|
||||
sessionMenu->Append(wxID_SAVE, "&Save Session");
|
||||
sessionMenu->Append(wxID_SAVEAS, "Save Session &As..");
|
||||
sessionMenu->AppendSeparator();
|
||||
sessionMenu->Append(wxID_RESET, "&Reset Session");
|
||||
menu->AppendSubMenu(dsMenu, "Direct Sampling");
|
||||
|
||||
menu->AppendSubMenu(sessionMenu, "Session");
|
||||
menuBar->Append(menu, wxT("&Settings"));
|
||||
|
||||
menu->AppendSeparator();
|
||||
|
||||
menu->Append(wxID_CLOSE);
|
||||
|
||||
menuBar->Append(menu, wxT("&File"));
|
||||
|
||||
menu = new wxMenu;
|
||||
|
||||
std::vector<RtAudio::DeviceInfo>::iterator devices_i;
|
||||
@@ -183,7 +186,7 @@ AppFrame::AppFrame() :
|
||||
outputDeviceMenuItems[mdevices_i->first] = itm;
|
||||
}
|
||||
|
||||
menuBar->Append(menu, wxT("Active Demodulator &Output"));
|
||||
menuBar->Append(menu, wxT("Audio &Output"));
|
||||
|
||||
menu = new wxMenu;
|
||||
|
||||
@@ -340,6 +343,10 @@ void AppFrame::OnMenu(wxCommandEvent& event) {
|
||||
wxGetApp().setDirectSampling(1);
|
||||
} else if (event.GetId() == wxID_SET_DS_Q) {
|
||||
wxGetApp().setDirectSampling(2);
|
||||
} else if (event.GetId() == wxID_SET_SWAP_IQ) {
|
||||
bool swap_state = !wxGetApp().getSwapIQ();
|
||||
wxGetApp().setSwapIQ(swap_state);
|
||||
iqSwapMenuItem->Check(swap_state);
|
||||
} else if (event.GetId() == wxID_SET_PPM) {
|
||||
long ofs = wxGetNumberFromUser("Frequency correction for device in PPM.\ni.e. -51 for -51 PPM\n\nNote: you can adjust PPM interactively\nby holding ALT over the frequency tuning bar.\n", "Parts per million (PPM)",
|
||||
"Frequency Correction", wxGetApp().getPPM(), -1000, 1000, this);
|
||||
|
||||
Reference in New Issue
Block a user