summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3840585)
raw | patch | inline | side by side (parent: 3840585)
author | Bert Vermeulen <bert@biot.com> | |
Mon, 5 Aug 2013 20:21:41 +0000 (22:21 +0200) | ||
committer | Bert Vermeulen <bert@biot.com> | |
Mon, 5 Aug 2013 20:21:41 +0000 (22:21 +0200) |
A MinimumInterval of 0 means whatever the device sends gets dispatched
to collectd. This is the default.
to collectd. This is the default.
src/sigrok.c | patch | blob | history |
diff --git a/src/sigrok.c b/src/sigrok.c
index 001830d46d818ede7afd310912ede883b68471a6..245a64c59ab6ca8ac0cf529c18df454b1a54b601 100644 (file)
--- a/src/sigrok.c
+++ b/src/sigrok.c
/* Minimum interval between dispatches coming from this plugin. The RRD
* plugin, at least, complains when written to with sub-second intervals.*/
-#define DEFAULT_MIN_DISPATCH_INTERVAL TIME_T_TO_CDTIME_T(1)
+#define DEFAULT_MIN_DISPATCH_INTERVAL TIME_T_TO_CDTIME_T(0)
static pthread_t sr_thread;
static int sr_thread_running = FALSE;
cf_util_get_string(item, &cfdev->conn);
else if (!strcasecmp(item->key, "serialcomm"))
cf_util_get_string(item, &cfdev->serialcomm);
- else if (!strcasecmp(item->key, "interval"))
+ else if (!strcasecmp(item->key, "minimuminterval"))
cf_util_get_cdtime(item, &cfdev->min_dispatch_interval);
else
WARNING("Invalid keyword '%s'.", item->key);
if (packet->type != SR_DF_ANALOG)
return;
- if (cdtime() - cfdev->last_dispatch < cfdev->min_dispatch_interval)
+ if (cfdev->min_dispatch_interval && \
+ cdtime() - cfdev->last_dispatch < cfdev->min_dispatch_interval)
return;
/* Ignore all but the first sample on the first probe. */