X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevice%2Fdevice.cpp;fp=pv%2Fdevice%2Fdevice.cpp;h=4a3ec35f1869364c04f02da03f2577c36cdcf7f8;hp=be25b5cb1cd017abb7ae0dd46f55650aeeb31878;hb=07dcf5615620315f4eda91a930b8540e64b625f2;hpb=29efe92a807a93572b44369d2703f572778ebb15 diff --git a/pv/device/device.cpp b/pv/device/device.cpp index be25b5cb..4a3ec35f 100644 --- a/pv/device/device.cpp +++ b/pv/device/device.cpp @@ -66,5 +66,17 @@ std::string Device::format_device_title() const return s.str(); } +bool Device::is_trigger_enabled() const +{ + assert(_sdi); + for (const GSList *l = _sdi->probes; l; l = l->next) { + const sr_probe *const p = (const sr_probe *)l->data; + assert(p); + if (p->trigger && p->trigger[0] != '\0') + return true; + } + return false; +} + } // device } // pv