X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevinst.cpp;h=c0b87fe243414bf5167f7af7f49aed527367d124;hp=4cae04aee29a32e8f98a862c0550a98f68957535;hb=e183f4e328db8bb134652254ba9bf0707dc16c66;hpb=42e634cff774d802c0fb1047f93f874aafe89277 diff --git a/pv/devinst.cpp b/pv/devinst.cpp index 4cae04ae..c0b87fe2 100644 --- a/pv/devinst.cpp +++ b/pv/devinst.cpp @@ -93,4 +93,16 @@ GVariant* DevInst::list_config(const sr_probe_group *group, int key) return data; } +void DevInst::enable_probe(const sr_probe *probe, bool enable) +{ + for (const GSList *p = _sdi->probes; p; p = p->next) + if (probe == p->data) { + const_cast(probe)->enabled = enable; + return; + } + + // Probe was not found in the device + assert(0); +} + } // pv