Hi Bartosz, Thanks for the updated version.
May I ask where the term "averaging rate" came from? It seems the value isn't really a rate but rather the number of samples that are to be averaged over. Might I suggest SR_CONF_AVG_SAMPLES or some such instead? Regards, Martin On Wed, Jan 21, 2015 at 05:17:03PM +0100, Bartosz Golaszewski wrote: > > Add new config options to libsigrok - 'averaging', which allows to > enable averaging of samples and 'avg_rate' for setting the number > of samples to be averaged in each cycle. > > Signed-off-by: Bartosz Golaszewski <[email protected]> > --- > include/libsigrok/libsigrok.h | 6 ++++++ > src/hwdriver.c | 4 ++++ > 2 files changed, 10 insertions(+) > > diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h > index df1333a..0f187c8 100644 > --- a/include/libsigrok/libsigrok.h > +++ b/include/libsigrok/libsigrok.h > @@ -665,6 +665,12 @@ enum sr_configkey { > /** The device supports setting trigger slope. */ > SR_CONF_TRIGGER_SLOPE, > > + /** The device supports averaging. */ > + SR_CONF_AVERAGING, > + > + /** The device supports setting averaging rate. */ > + SR_CONF_AVG_RATE, > + > /** Trigger source. */ > SR_CONF_TRIGGER_SOURCE, > > diff --git a/src/hwdriver.c b/src/hwdriver.c > index 95d8163..8d595eb 100644 > --- a/src/hwdriver.c > +++ b/src/hwdriver.c > @@ -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_RATE, SR_T_UINT64, "avg_rate", > + "Averaging rate", NULL}, > {SR_CONF_TRIGGER_SOURCE, SR_T_STRING, "triggersource", > "Trigger source", NULL}, > {SR_CONF_HORIZ_TRIGGERPOS, SR_T_FLOAT, "horiz_triggerpos", > -- > 2.1.4 > > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > http://p.sf.net/sfu/gigenet > _______________________________________________ > sigrok-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sigrok-devel > ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ sigrok-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sigrok-devel

