diff --git a/Software/PC_Application/SpectrumAnalyzer/spectrumanalyzer.cpp b/Software/PC_Application/SpectrumAnalyzer/spectrumanalyzer.cpp index ed847c0..a393668 100644 --- a/Software/PC_Application/SpectrumAnalyzer/spectrumanalyzer.cpp +++ b/Software/PC_Application/SpectrumAnalyzer/spectrumanalyzer.cpp @@ -266,9 +266,9 @@ SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window) SetRBW(pref.Startup.SA.RBW); SetAveraging(pref.Startup.SA.averaging); settings.pointNum = 1001; - cbWindowType->setCurrentIndex(pref.Startup.SA.window); - cbDetector->setCurrentIndex(pref.Startup.SA.detector); - cbSignalID->setChecked(pref.Startup.SA.signalID); + SetWindow((Window) pref.Startup.SA.window); + SetDetector((Detector) pref.Startup.SA.detector); + SetSignalID(pref.Startup.SA.signalID); } finalize(central); @@ -412,7 +412,7 @@ void SpectrumAnalyzer::SettingsChanged() } average.reset(settings.pointNum); UpdateAverageCount(); - traceModel.clearVNAData(); + traceModel.clearLiveData(); emit traceModel.SpanChanged(settings.f_start, settings.f_stop); } @@ -937,10 +937,10 @@ void SpectrumAnalyzer::LoadSweepSettings() ConstrainAndUpdateFrequencies(); SetRBW(s.value("SARBW", pref.Startup.SA.RBW).toUInt()); settings.pointNum = 1001; - cbWindowType->setCurrentIndex(s.value("SAWindow", pref.Startup.SA.window).toInt()); - cbDetector->setCurrentIndex(s.value("SADetector", pref.Startup.SA.detector).toInt()); + SetWindow((Window) s.value("SAWindow", pref.Startup.SA.window).toInt()); + SetDetector((Detector) s.value("SADetector", pref.Startup.SA.detector).toInt()); + SetSignalID(s.value("SASignalID", pref.Startup.SA.signalID).toBool()); SetAveraging(s.value("SAAveraging", pref.Startup.SA.averaging).toInt()); - cbSignalID->setChecked(s.value("SASignalID", pref.Startup.SA.signalID).toBool()); } void SpectrumAnalyzer::StoreSweepSettings() diff --git a/Software/PC_Application/Traces/tracemodel.cpp b/Software/PC_Application/Traces/tracemodel.cpp index daae0b6..091f3d6 100644 --- a/Software/PC_Application/Traces/tracemodel.cpp +++ b/Software/PC_Application/Traces/tracemodel.cpp @@ -195,7 +195,7 @@ void TraceModel::fromJSON(nlohmann::json j) } } -void TraceModel::clearVNAData() +void TraceModel::clearLiveData() { for(auto t : traces) { if (t->isLive()) { diff --git a/Software/PC_Application/Traces/tracemodel.h b/Software/PC_Application/Traces/tracemodel.h index eb75529..3f30e47 100644 --- a/Software/PC_Application/Traces/tracemodel.h +++ b/Software/PC_Application/Traces/tracemodel.h @@ -53,7 +53,7 @@ signals: void traceNameChanged(Trace *t); public slots: - void clearVNAData(); + void clearLiveData(); void addVNAData(const Protocol::Datapoint& d, const Protocol::SweepSettings& settings); void addSAData(const Protocol::SpectrumAnalyzerResult& d, const Protocol::SpectrumAnalyzerSettings& settings); diff --git a/Software/PC_Application/VNA/vna.cpp b/Software/PC_Application/VNA/vna.cpp index d82a54d..26b74dc 100644 --- a/Software/PC_Application/VNA/vna.cpp +++ b/Software/PC_Application/VNA/vna.cpp @@ -653,7 +653,7 @@ void VNA::SettingsChanged(std::function cb) window->getDevice()->Configure(settings, [=](Device::TransmissionResult res){ // device received command, reset traces now average.reset(settings.points); - traceModel.clearVNAData(); + traceModel.clearLiveData(); UpdateAverageCount(); UpdateCalWidget(); if(cb) {