Hi Bartosz, I agree we should have config key support for this. We already support some oscilloscopes (the Rigol DS1000 series for a start) where the hardware supports averaging over a configurable number of samples but this is not currently mapped through libsigrok.
However, I would suggest splitting this into two keys: a boolean one that enables/disables averaging, and an integer one that sets the number of samples to be averaged. I prefer to avoid squeezing multiple meanings into the same integer config key, because then we have to treat that key specially to present good UI for it. The design of the config key API is intended to make it easy to build UI widgets mostly automatically. Regards, Martin On Tue, Jan 20, 2015 at 04:51:16PM +0100, Bartosz Golaszewski wrote: > > We are working on an implementation of sigrok driver for our device: > > http://baylibre.com/acme/ > > Version 1 offers eight analog channels. Version 2 is still a > prototype, but instead of a BeagleBone Black cape, it's going to be > connected via USB, which will allow us to use PulseView as GUI. > > We have our own open-source software suite available, but would like > to go with a well-known and maintained project. Our internal > command-line client implements configuration settings for displaying > averaged values. This proved to be very useful for our beta-testers, > and we would like to propose adding such configuration option for > analog channels to sigrok. > > The first patch just adds the option to the sigrok config list. The > second patch implements support for avg_rate in the demo driver. > > I marked this series as RFC since sigrok-cli displays a message > saying: "Device only sent X samples" when receiving less samples than > expected, and looking at sigrok-cli I don't have an idea on how to > solve it yet. > > Any comments are appreciated. > > Bartosz Golaszewski (2): new config option: averaging rate demo: > implement averaging rate setting > > include/libsigrok/libsigrok.h | 3 ++ src/hardware/demo/demo.c > | 107 +++++++++++++++++++++++++++++++++++++----- src/hwdriver.c > | 2 + 3 files changed, 100 insertions(+), 12 deletions(-) > > -- 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

