]> sigrok.org Git - pulseview.git/blobdiff - pv/devinst.cpp
Notify that config change when probes are enabled/disabled
[pulseview.git] / pv / devinst.cpp
index 4cae04aee29a32e8f98a862c0550a98f68957535..4480c43fdb995234cb516cd1127ab632e4949ffb 100644 (file)
@@ -93,4 +93,17 @@ 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<sr_probe*>(probe)->enabled = enable;
+                       config_changed();
+                       return;
+               }
+
+       // Probe was not found in the device
+       assert(0);
+}
+
 } // pv