X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevice%2Fdevinst.cpp;h=0301063440200d4b693105623f329fbce303b9f6;hp=f85c6f5e0dd7ea8756784521f6eca36df2e60af8;hb=87b79835014a386fb51b52bc993dbb693bd27197;hpb=2445160a5d1eb98196d2a1d57246d4c37dd13811 diff --git a/pv/device/devinst.cpp b/pv/device/devinst.cpp index f85c6f5..0301063 100644 --- a/pv/device/devinst.cpp +++ b/pv/device/devinst.cpp @@ -90,19 +90,19 @@ GVariant* DevInst::list_config(const sr_channel_group *group, int key) return data; } -void DevInst::enable_probe(const sr_probe *probe, bool enable) +void DevInst::enable_channel(const sr_channel *channel, bool enable) { assert(_owner); sr_dev_inst *const sdi = dev_inst(); assert(sdi); - for (const GSList *p = sdi->probes; p; p = p->next) - if (probe == p->data) { - const_cast(probe)->enabled = enable; + for (const GSList *p = sdi->channels; p; p = p->next) + if (channel == p->data) { + const_cast(channel)->enabled = enable; config_changed(); return; } - // Probe was not found in the device + // Channel was not found in the device assert(0); } @@ -126,13 +126,13 @@ bool DevInst::is_trigger_enabled() const void DevInst::start() { - if (sr_session_start() != SR_OK) + if (sr_session_start(SigSession::_sr_session) != SR_OK) throw tr("Failed to start session."); } void DevInst::run() { - sr_session_run(); + sr_session_run(SigSession::_sr_session); } } // device