diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 5b8396b..10643f6 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -376,16 +376,21 @@ void AppFrame::OnMenu(wxCommandEvent& event) { "Frequency Offset", wxGetApp().getOffset(), -2000000000, 2000000000, this); if (ofs != -1) { wxGetApp().setOffset(ofs); + wxGetApp().saveConfig(); } } else if (event.GetId() == wxID_SET_DS_OFF) { wxGetApp().setDirectSampling(0); + wxGetApp().saveConfig(); } else if (event.GetId() == wxID_SET_DS_I) { wxGetApp().setDirectSampling(1); + wxGetApp().saveConfig(); } else if (event.GetId() == wxID_SET_DS_Q) { wxGetApp().setDirectSampling(2); + wxGetApp().saveConfig(); } else if (event.GetId() == wxID_SET_SWAP_IQ) { bool swap_state = !wxGetApp().getSwapIQ(); wxGetApp().setSwapIQ(swap_state); + wxGetApp().saveConfig(); 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)", diff --git a/src/CubicSDR.cpp b/src/CubicSDR.cpp index 3e47710..1fa1e54 100644 --- a/src/CubicSDR.cpp +++ b/src/CubicSDR.cpp @@ -193,7 +193,6 @@ void CubicSDR::setOffset(long long ofs) { SDRDeviceInfo *dev = (*getDevices())[getDevice()]; config.getDevice(dev->getDeviceId())->setOffset(ofs); - config.save(); } void CubicSDR::setDirectSampling(int mode) { @@ -204,7 +203,6 @@ void CubicSDR::setDirectSampling(int mode) { SDRDeviceInfo *dev = (*getDevices())[getDevice()]; config.getDevice(dev->getDeviceId())->setDirectSampling(mode); - config.save(); } int CubicSDR::getDirectSampling() { @@ -215,7 +213,6 @@ void CubicSDR::setSwapIQ(bool swapIQ) { sdrPostThread->setSwapIQ(swapIQ); SDRDeviceInfo *dev = (*getDevices())[getDevice()]; config.getDevice(dev->getDeviceId())->setIQSwap(swapIQ); - config.save(); } bool CubicSDR::getSwapIQ() { @@ -309,7 +306,6 @@ void CubicSDR::setPPM(int ppm_in) { SDRDeviceInfo *dev = (*getDevices())[getDevice()]; config.getDevice(dev->getDeviceId())->setPPM(ppm_in); - config.save(); } int CubicSDR::getPPM() {