| 1744 | } |
| 1745 | |
| 1746 | void SigSession::math_rebuild(bool enable, view::DsoSignal *dsoSig1, |
| 1747 | view::DsoSignal *dsoSig2, |
| 1748 | data::MathStack::MathType type) |
| 1749 | { |
| 1750 | ds_lock_guard lock(_data_mutex); |
| 1751 | |
| 1752 | assert(dsoSig1); |
| 1753 | assert(dsoSig2); |
| 1754 | |
| 1755 | DESTROY_OBJECT(_math_trace); |
| 1756 | |
| 1757 | auto math_stack = new data::MathStack(this, dsoSig1, dsoSig2, type); |
| 1758 | _math_trace = new view::MathTrace(enable, math_stack, dsoSig1, dsoSig2); |
| 1759 | |
| 1760 | if (_math_trace && _math_trace->enabled()) |
| 1761 | { |
| 1762 | int rt = _view_data->get_dso()->samplerate(); |
| 1763 | if (rt > 0){ |
| 1764 | _math_trace->get_math_stack()->set_samplerate(rt); |
| 1765 | _math_trace->get_math_stack()->realloc(_device_agent.get_sample_limit()); |
| 1766 | _math_trace->get_math_stack()->calc_math(_math_trace->get_vDialfactor()); |
| 1767 | } |
| 1768 | } |
| 1769 | signals_changed(); |
| 1770 | } |
| 1771 | |
| 1772 | void SigSession::math_disable() |
| 1773 | { |
no test coverage detected