X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Flogicsignal.cpp;h=27635f902f1fe80e47595e95a829fd3ad49957b7;hb=2b334bb4078d6e74e8ed4e3460c6596344dd9c8d;hp=5e5cb7db9fcc1753ff7d74c19f581cbd8f8116ff;hpb=b1e8c93d824986328a34d1c36273cb534fd65307;p=pulseview.git diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index 5e5cb7d..27635f9 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -65,8 +65,8 @@ const QColor LogicSignal::SignalColours[10] = { }; LogicSignal::LogicSignal(shared_ptr dev_inst, - const sr_channel *const probe, shared_ptr data) : - Signal(dev_inst, probe), + const sr_channel *const channel, shared_ptr data) : + Signal(dev_inst, channel), _data(data), _trigger_none(NULL), _trigger_rising(NULL), @@ -80,17 +80,17 @@ LogicSignal::LogicSignal(shared_ptr dev_inst, struct sr_trigger_match *match; const GSList *l, *m; - _colour = SignalColours[probe->index % countof(SignalColours)]; + _colour = SignalColours[channel->index % countof(SignalColours)]; /* Populate this channel's trigger setting with whatever we * find in the current session trigger, if anything. */ _trigger_match = 0; - if ((trigger = sr_session_trigger_get())) { + if ((trigger = sr_session_trigger_get(SigSession::_sr_session))) { for (l = trigger->stages; l && !_trigger_match; l = l->next) { stage = (struct sr_trigger_stage *)l->data; for (m = stage->matches; m && !_trigger_match; m = m->next) { match = (struct sr_trigger_match *)m->data; - if (match->channel == _probe) + if (match->channel == _channel) _trigger_match = match->match; } } @@ -113,7 +113,7 @@ shared_ptr LogicSignal::logic_data() const void LogicSignal::paint_back(QPainter &p, int left, int right) { - if (_probe->enabled) + if (_channel->enabled) paint_axis(p, get_y(), left, right); } @@ -125,7 +125,7 @@ void LogicSignal::paint_mid(QPainter &p, int left, int right) vector< pair > edges; - assert(_probe); + assert(_channel); assert(_data); assert(right >= left); @@ -137,7 +137,7 @@ void LogicSignal::paint_mid(QPainter &p, int left, int right) const double offset = _view->offset(); - if (!_probe->enabled) + if (!_channel->enabled) return; const float high_offset = y - View::SignalHeight + 0.5f; @@ -167,7 +167,7 @@ void LogicSignal::paint_mid(QPainter &p, int left, int right) snapshot->get_subsampled_edges(edges, min(max((int64_t)floor(start), (int64_t)0), last_sample), min(max((int64_t)ceil(end), (int64_t)0), last_sample), - samples_per_pixel / Oversampling, _probe->index); + samples_per_pixel / Oversampling, _channel->index); assert(edges.size() >= 2); // Paint the edges