decouple RST settings from startup settings

This commit is contained in:
Jan Käberich 2024-05-01 13:33:18 +02:00
parent 77efc4d924
commit 5692356e90
9 changed files with 60 additions and 9 deletions

View file

@ -366,6 +366,18 @@ void SpectrumAnalyzer::deviceDisconnected()
emit sweepStopped();
}
void SpectrumAnalyzer::resetSettings()
{
settings.freqStart = DeviceDriver::getInfo(window->getDevice()).Limits.SA.minFreq;
settings.freqStop = DeviceDriver::getInfo(window->getDevice()).Limits.SA.maxFreq;
ConstrainAndUpdateFrequencies();
SetRBW(1000000);
SetAveraging(1);
SetWindow(DeviceDriver::SASettings::Window::FlatTop);
SetDetector(DeviceDriver::SASettings::Detector::PPeak);
Stop();
}
nlohmann::json SpectrumAnalyzer::toJSON()
{
nlohmann::json j;