PPM correction now editable + saved and loaded/applied per-device by serial and name

This commit is contained in:
Charles J. Cliffe
2015-04-13 21:18:45 -04:00
parent 68d4627e99
commit 55fd0c986f
8 changed files with 89 additions and 25 deletions
+5
View File
@@ -132,6 +132,7 @@ AppFrame::AppFrame() :
wxMenu *menu = new wxMenu;
// menu->Append(wxID_NEW);
menu->Append(wxID_SET_FREQ_OFFSET, "Set Frequency Offset");
menu->Append(wxID_SET_PPM, "Set Device PPM");
menu->Append(wxID_OPEN, "&Open Session");
menu->Append(wxID_SAVE, "&Save Session");
menu->Append(wxID_SAVEAS, "Save Session &As..");
@@ -318,6 +319,10 @@ void AppFrame::OnMenu(wxCommandEvent& event) {
if (ofs != -1) {
wxGetApp().setOffset(ofs);
}
} else if (event.GetId() == wxID_SET_PPM) {
long ofs = wxGetNumberFromUser("Frequency correction for device in PPM.\ni.e. -51 for -51 PPM", "Parts per million (PPM)",
"Frequency Correction", wxGetApp().getPPM(), -1000, 1000, this);
wxGetApp().setPPM(ofs);
} else if (event.GetId() == wxID_SAVE) {
if (!currentSessionFile.empty()) {
saveSession(currentSessionFile);