mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 15:04:11 +00:00
Bugfixes TDR
This commit is contained in:
parent
8d382e8b9c
commit
5ddc3d6794
5 changed files with 68 additions and 6 deletions
|
|
@ -130,6 +130,7 @@ void Trace::fillFromTouchstone(Touchstone &t, unsigned int parameter, QString fi
|
|||
}
|
||||
touchstone = true;
|
||||
emit typeChanged(this);
|
||||
emit outputSamplesChanged(0, data.size());
|
||||
}
|
||||
|
||||
void Trace::fromLivedata(Trace::LivedataType type, LiveParameter param)
|
||||
|
|
@ -283,6 +284,9 @@ void Trace::fromJSON(nlohmann::json j)
|
|||
}
|
||||
qDebug() << "Creating math operation of type:" << operation;
|
||||
auto op = TraceMath::createMath(type);
|
||||
if(jm.contains("settings")) {
|
||||
op->fromJSON(jm["settings"]);
|
||||
}
|
||||
MathInfo info;
|
||||
info.enabled = jm.value("enabled", true);
|
||||
info.math = op;
|
||||
|
|
@ -492,7 +496,7 @@ double Trace::minX()
|
|||
if(lastMath->numSamples() > 0) {
|
||||
return lastMath->rData().front().x;
|
||||
} else {
|
||||
return numeric_limits<double>::quiet_NaN();
|
||||
return numeric_limits<double>::max();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -501,7 +505,7 @@ double Trace::maxX()
|
|||
if(lastMath->numSamples() > 0) {
|
||||
return lastMath->rData().back().x;
|
||||
} else {
|
||||
return numeric_limits<double>::quiet_NaN();
|
||||
return numeric_limits<double>::lowest();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue