Frank Stettner [Thu, 2 Nov 2017 17:04:59 +0000 (18:04 +0100)]
drivers: Fix locale dependent string to float conversion
Some drivers used locale dependent functions for converting strings
to float/double values. These functions fail when the decimal mark
is a "," in the locale settings but the string contains a ".".
Soeren Apel [Wed, 11 Oct 2017 16:14:56 +0000 (18:14 +0200)]
demo: Properly handle low samplerates
A "low samplerate" in this case means anything where
samples_todo is less than SAMPLES_PER_FRAME. This case
wasn't handled properly before, resulting in wrong
amounts of data being sent out.
Soeren Apel [Mon, 9 Oct 2017 05:32:31 +0000 (07:32 +0200)]
lecroy-xstream: Fix sample rate
We can't use the memory size command because it returns
the *maximum* memory used, not the *actual* memory used.
Hence, we only know the number of samples per div once
sample data actually comes in.
Soeren Apel [Tue, 3 Oct 2017 11:29:46 +0000 (13:29 +0200)]
lecroy-xstream: Use best-effort strategy for unknown models
As there is a huge range of supported LeCroy scopes, naming
the IDN response for every single one of them is going to be
impossible. Hence, it makes more sense to treat all LeCroy
devices as if they were scopes and supported. This approach
lets users try to see how far they get and if they run into
issues, they can then be treated separately - e.g. by creating
a custom device profile.
Unless we do this, the vast majority of LeCroy scopes will
not be recognized by the driver.
beaglelogic: Changes for proper operation in PulseView
Set samplelimit to a sane value (was causing PulseView to
crash earlier), as well as advertise samplerate using SR_CONF_LIST
so that PulseView can show the sample rates.
The function drains off all the remaining data in the receive socket
and is triggered before starting a capture and after a capture is
completed. In the absence of this function, there is a possibility of
data corruption and also the NodeJS TCP server throws an error if the
buffer is not completely read out before the socket is closed.
BeagleLogic now supports two modes of interface - one being the
native mode running on an ARM system like the BeagleBone Black
and the other mode acting like a TCP client for the BeagleLogic
server running off a BeagleBone compatible system. This makes it
convenient for desktop users to retrieve samples from BeagleLogic,
no more copying files and SSHing into the BeagleBone hardware in
order to use BeagleLogic.
Stefan Brüns [Sat, 23 Sep 2017 20:16:24 +0000 (22:16 +0200)]
strutil: Fix sr_parse_rational for integral parts between -0 and -1
Values like '-0.1' would be parsed as being positive, as the integral
type does not discern +0 and -0. Also allow values without leading
integral value, to match behaviour of strtod/sr_atof.
Uwe Hermann [Sun, 17 Sep 2017 14:55:50 +0000 (16:55 +0200)]
Drop libftdi 0.x support, require libftdi 1.x.
There were some issues when using libftdi 0.x recently that are fixed
when switching to libftdi 1.x (not really worth the effort to investigate).
libftdi 1.x has been around several years now and should be available
in most recent distros and OSes. For the rare cases where it is not,
it's easy enough to get it via backport packages, or build from source,
or sigrok users can just use our binary installers for most OSes.
Gerhard Sittig [Fri, 18 Aug 2017 19:43:42 +0000 (21:43 +0200)]
brymen-bm86x: support channel selection (enable/disable channels)
The previous implementation unconditionally submitted analog data
whenever values could get extracted out of received serial packets.
This commit checks the channels' enabled state before submission. Care
is taken to obey the user's acquisition limits, exclusively counting
submitted not received values.
Gerhard Sittig [Fri, 18 Aug 2017 19:11:05 +0000 (21:11 +0200)]
lsr/es51919: support channel selection (enable/disable P1/P2)
Upon reception of serial data from the ES51919 LCR chipset, the data for
channels P1 and P2 was extracted from the packet, and unconditionally got
sent to the sigrok session.
Do check the channels' enabled state before submission. This fixes for
serial-lcr what recently got reported for a Brymen DMM. Tested with
Gerhard Sittig [Fri, 18 Aug 2017 18:07:23 +0000 (20:07 +0200)]
lcr/es51919: clean but don't free dev context in cleanup callback
The es51919_serial_clean() routine is called by std_dev_clear_with_callback().
Common code unconditionally frees the 'priv' part. The cleanup callback only
shall release descending resources which are local to the callee and opaque
to the caller.
This fixes a double free error. Tested with PeakTech 2170.
Gerhard Sittig [Sat, 29 Jul 2017 14:09:36 +0000 (16:09 +0200)]
asix-sigma: download sample data upon user initiated stop, too
When the acquisition was stopped before a configured limit was reached,
no sample data was retrieved. This is because the api.c stop routine did
unregister the receive callback.
Pass the stop request to the receive routine instead when stop is called
while the acquisition is still running. Have sample data downloaded very
much like it's done for reached limits, and existing logic will run the
stop routine again after state was advanced to "idle".
Extend the 'state' tracking while we are here, mark sample download as
well (that was omitted in the previous implementation). Though the
omission was non-fatal. Move the release of 'dram_line' to some earlier
location (as soon as the resource is not needed any longer), before some
rather complex calls to other routines will execute.
Uwe Hermann [Fri, 28 Jul 2017 19:29:12 +0000 (21:29 +0200)]
drivers: SR_CONF_CAPTURE_RATIO fixes.
Move the check for the capture ratio being 0..100 into the wrappers,
drop unneeded helper functions, fix incorrect variable types, minor
other consistency fixes.