Nicer preset graph configuration for one port devices

This commit is contained in:
Jan Käberich 2023-02-17 17:30:54 +01:00
parent 8ac9707242
commit 83dbfadf20

View File

@ -1542,6 +1542,7 @@ void VNA::createDefaultTracesAndGraphs(int ports)
} }
}; };
if(ports > 1) {
vector<vector<TracePlot*>> plots; vector<vector<TracePlot*>> plots;
for(int i=0;i<ports;i++) { for(int i=0;i<ports;i++) {
plots.push_back(vector<TracePlot*>()); plots.push_back(vector<TracePlot*>());
@ -1603,6 +1604,20 @@ void VNA::createDefaultTracesAndGraphs(int ports)
tile = tile->Child2(); tile = tile->Child2();
} }
} }
} else if(ports == 1) {
tiles->clear();
tiles->splitHorizontally();
auto trace = new Trace("S11", getDefaultColor(ports, 0, 0), "S11");
traceModel.addTrace(trace);
auto smithchart = new TraceSmithChart(traceModel);
auto xyplot = new TraceXYPlot(traceModel);
smithchart->updateSpan(settings.Freq.start, settings.Freq.stop);
smithchart->enableTrace(trace, true);
xyplot->updateSpan(settings.Freq.start, settings.Freq.stop);
xyplot->enableTrace(trace, true);
tiles->Child1()->setPlot(smithchart);
tiles->Child2()->setPlot(xyplot);
}
} }
void VNA::EnableDeembedding(bool enable) void VNA::EnableDeembedding(bool enable)