]> sigrok.org Git - libsigrok.git/commitdiff
new config options: averaging
authorBartosz Golaszewski <redacted>
Thu, 22 Jan 2015 09:22:58 +0000 (10:22 +0100)
committerUwe Hermann <redacted>
Sun, 25 Jan 2015 17:00:40 +0000 (18:00 +0100)
Add new config options to libsigrok - 'averaging', which allows to
enable averaging of samples and 'avg_samples' for setting the number
of samples to be averaged over in each cycle.

Signed-off-by: Bartosz Golaszewski <redacted>
include/libsigrok/libsigrok.h
src/hwdriver.c

index df1333a9e79d938acb9e4ca5f54415932b98083e..65e9da80a2db24757fc99697d41ab2f75a8d1f86 100644 (file)
@@ -665,6 +665,15 @@ enum sr_configkey {
        /** The device supports setting trigger slope. */
        SR_CONF_TRIGGER_SLOPE,
 
+       /** The device supports averaging. */
+       SR_CONF_AVERAGING,
+
+       /**
+        * The device supports setting number of samples to be
+        * averaged over.
+        */
+       SR_CONF_AVG_SAMPLES,
+
        /** Trigger source. */
        SR_CONF_TRIGGER_SOURCE,
 
index 95d8163f09d00e6627a3d07bb089bb8d12655a97..239592d3ebc9157e35148d5d1d73091540e8c332 100644 (file)
@@ -79,6 +79,10 @@ static struct sr_config_info sr_config_info_data[] = {
                "Run length encoding", NULL},
        {SR_CONF_TRIGGER_SLOPE, SR_T_STRING, "triggerslope",
                "Trigger slope", NULL},
+       {SR_CONF_AVERAGING, SR_T_BOOL, "averaging",
+               "Averaging", NULL},
+       {SR_CONF_AVG_SAMPLES, SR_T_UINT64, "avg_samples",
+               "Number of samples to average over", NULL},
        {SR_CONF_TRIGGER_SOURCE, SR_T_STRING, "triggersource",
                "Trigger source", NULL},
        {SR_CONF_HORIZ_TRIGGERPOS, SR_T_FLOAT, "horiz_triggerpos",