mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 06:53:37 +00:00
Updated graphs to use new math system
This commit is contained in:
parent
a7ff3d60fb
commit
49f9b5442d
16 changed files with 263 additions and 518 deletions
|
|
@ -56,12 +56,12 @@ std::complex<double> TraceSmithChart::pixelToData(QPoint p)
|
|||
QPoint TraceSmithChart::markerToPixel(TraceMarker *m)
|
||||
{
|
||||
QPoint ret = QPoint();
|
||||
if(!m->isTimeDomain()) {
|
||||
// if(!m->isTimeDomain()) {
|
||||
if(m->getPosition() >= sweep_fmin && m->getPosition() <= sweep_fmax) {
|
||||
auto d = m->getData();
|
||||
ret = transform.map(QPoint(d.real() * smithCoordMax, -d.imag() * smithCoordMax));
|
||||
}
|
||||
}
|
||||
// }
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -160,9 +160,9 @@ void TraceSmithChart::draw(QPainter &p) {
|
|||
// only draw markers if the trace has at least one point
|
||||
auto markers = t.first->getMarkers();
|
||||
for(auto m : markers) {
|
||||
if (m->isTimeDomain()) {
|
||||
continue;
|
||||
}
|
||||
// if (m->isTimeDomain()) {
|
||||
// continue;
|
||||
// }
|
||||
if (limitToSpan && (m->getPosition() < sweep_fmin || m->getPosition() > sweep_fmax)) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -268,7 +268,7 @@ void TraceSmithChart::updateContextMenu()
|
|||
|
||||
bool TraceSmithChart::supported(Trace *t)
|
||||
{
|
||||
if(t->isReflection()) {
|
||||
if(t->outputType() == Trace::DataType::Frequency && t->isReflection()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue