MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / spectrum_rebuild

Method spectrum_rebuild

DSView/pv/sigsession.cpp:1699–1731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1697 }
1698
1699 void SigSession::spectrum_rebuild()
1700 {
1701 bool has_dso_signal = false;
1702
1703 for (auto s : _signals)
1704 {
1705 if (s->signal_type() == SR_CHANNEL_DSO){
1706 has_dso_signal = true;
1707 // check already have
1708 auto iter = _spectrum_traces.begin();
1709
1710 for (unsigned int i = 0; i < _spectrum_traces.size(); i++, iter++){
1711 if ((*iter)->get_index() == s->get_index())
1712 break;
1713 }
1714
1715 // if not, rebuild
1716 if (iter == _spectrum_traces.end())
1717 {
1718 auto spectrum_stack = new data::SpectrumStack(this, s->get_index());
1719 auto spectrum_trace = new view::SpectrumTrace(this, spectrum_stack, s->get_index());
1720 _spectrum_traces.push_back(spectrum_trace);
1721 }
1722 }
1723 }
1724
1725 if (!has_dso_signal)
1726 {
1727 RELEASE_ARRAY(_spectrum_traces);
1728 }
1729
1730 signals_changed();
1731 }
1732
1733 void SigSession::lissajous_rebuild(bool enable, int xindex, int yindex, double percent)
1734 {

Callers 1

acceptMethod · 0.80

Calls 4

signal_typeMethod · 0.80
sizeMethod · 0.80
get_indexMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected