Start GUI with ideal calibration standards

This commit is contained in:
Jan Käberich 2023-07-29 18:11:57 +02:00
parent 175cade3da
commit 853cf310c9
3 changed files with 15 additions and 0 deletions

View File

@ -414,3 +414,14 @@ void Calkit::fromJSON(nlohmann::json j)
standards.push_back(s);
}
}
void Calkit::setIdealDefault()
{
manufacturer = "LibreVNA";
description = "Default calibration kit with ideal standards";
clearStandards();
addStandard(new CalStandard::Open("Ideal Open Standard", 50.0, 0, 0, 0, 0, 0, 0));
addStandard(new CalStandard::Short("Ideal Short Standard", 50.0, 0, 0, 0, 0, 0, 0));
addStandard(new CalStandard::Load("Ideal Load Standard", 50.0, 0, 0, 50.0, 0, 0));
addStandard(new CalStandard::Through("Ideal Through Standard", 50.0, 0, 0));
}

View File

@ -53,6 +53,8 @@ public:
virtual nlohmann::json toJSON() override;
virtual void fromJSON(nlohmann::json j) override;
void setIdealDefault();
private:
void clearStandards();
QString manufacturer, serialnumber, description;

View File

@ -157,6 +157,8 @@ VNA::VNA(AppWindow *window, QString name)
}
});
cal.getKit().setIdealDefault();
// portExtension.setCalkit(&cal.getCalibrationKit());
// De-embedding menu