X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;ds=sidebyside;f=pv%2Fdevinst.cpp;h=b28fce08269f4c3f238d01c8fd016e5aecb560ec;hb=1b1dbb9158e2dfb6814517583de9015c94f28b1a;hp=c0b87fe243414bf5167f7af7f49aed527367d124;hpb=e183f4e328db8bb134652254ba9bf0707dc16c66;p=pulseview.git diff --git a/pv/devinst.cpp b/pv/devinst.cpp index c0b87fe..b28fce0 100644 --- a/pv/devinst.cpp +++ b/pv/devinst.cpp @@ -98,6 +98,7 @@ 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; + config_changed(); return; } @@ -105,4 +106,17 @@ void DevInst::enable_probe(const sr_probe *probe, bool enable) assert(0); } +uint64_t DevInst::get_sample_limit() +{ + uint64_t sample_limit; + GVariant* gvar = get_config(NULL, SR_CONF_LIMIT_SAMPLES); + if (gvar != NULL) { + sample_limit = g_variant_get_uint64(gvar); + g_variant_unref(gvar); + } else { + sample_limit = 0U; + } + return sample_limit; +} + } // pv