mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 23:43:42 +00:00
median option for averaging
This commit is contained in:
parent
82891ac766
commit
dced1732d6
10 changed files with 172 additions and 22 deletions
|
|
@ -265,6 +265,13 @@ SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window)
|
|||
|
||||
// Set initial sweep settings
|
||||
auto pref = Preferences::getInstance();
|
||||
|
||||
if(pref.Acquisition.useMedianAveraging) {
|
||||
average.setMode(Averaging::Mode::Median);
|
||||
} else {
|
||||
average.setMode(Averaging::Mode::Mean);
|
||||
}
|
||||
|
||||
if(pref.Startup.RememberSweepSettings) {
|
||||
LoadSweepSettings();
|
||||
} else {
|
||||
|
|
@ -1075,6 +1082,11 @@ void SpectrumAnalyzer::updateGraphColors()
|
|||
emit graphColorsChanged();
|
||||
}
|
||||
|
||||
void SpectrumAnalyzer::setAveragingMode(Averaging::Mode mode)
|
||||
{
|
||||
average.setMode(mode);
|
||||
}
|
||||
|
||||
QString SpectrumAnalyzer::WindowToString(SpectrumAnalyzer::Window w)
|
||||
{
|
||||
switch(w) {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ public:
|
|||
virtual void fromJSON(nlohmann::json j) override;
|
||||
|
||||
void updateGraphColors();
|
||||
void setAveragingMode(Averaging::Mode mode);
|
||||
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue