mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 15:04:11 +00:00
display error flags in statusbar (overload/unlock/unlevel)
This commit is contained in:
parent
6d6f0843e9
commit
e3f072b307
15 changed files with 89 additions and 13 deletions
|
|
@ -11,6 +11,7 @@ Trace::Trace(QString name, QColor color, LiveParameter live)
|
|||
_color(color),
|
||||
_liveType(LivedataType::Overwrite),
|
||||
_liveParam(live),
|
||||
vFactor(0.66),
|
||||
reflection(true),
|
||||
visible(true),
|
||||
paused(false),
|
||||
|
|
@ -103,6 +104,11 @@ void Trace::setName(QString name) {
|
|||
emit nameChanged();
|
||||
}
|
||||
|
||||
void Trace::setVelocityFactor(double v)
|
||||
{
|
||||
vFactor = v;
|
||||
}
|
||||
|
||||
void Trace::fillFromTouchstone(Touchstone &t, unsigned int parameter)
|
||||
{
|
||||
if(parameter >= t.ports()*t.ports()) {
|
||||
|
|
@ -249,8 +255,7 @@ const std::vector<Trace::MathInfo>& Trace::getMathOperations() const
|
|||
|
||||
double Trace::velocityFactor()
|
||||
{
|
||||
// TODO make changeable
|
||||
return 0.66;
|
||||
return vFactor;
|
||||
}
|
||||
|
||||
double Trace::timeToDistance(double time)
|
||||
|
|
@ -293,8 +298,9 @@ nlohmann::json Trace::toJSON()
|
|||
j["filename"] = filename.toStdString();
|
||||
j["parameter"] = fileParemeter;
|
||||
}
|
||||
j["velocityFactor"] = vFactor;
|
||||
j["reflection"] = reflection;
|
||||
// TODO how to save assigned markers?
|
||||
|
||||
nlohmann::json mathList;
|
||||
for(auto m : mathOps) {
|
||||
if(m.math->getType() == Type::Last) {
|
||||
|
|
@ -343,6 +349,7 @@ void Trace::fromJSON(nlohmann::json j)
|
|||
throw runtime_error("Failed to create from file:" + what);
|
||||
}
|
||||
}
|
||||
vFactor = j.value("velocityFactor", 0.66);
|
||||
reflection = j.value("reflection", false);
|
||||
for(auto jm : j["math"]) {
|
||||
QString operation = QString::fromStdString(jm.value("operation", ""));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue