]> sigrok.org Git - libsigrok.git/log
libsigrok.git
7 years agoAdd SR_CONF_SIGNAL_GENERATOR.
Uwe Hermann [Thu, 2 Mar 2017 13:35:17 +0000 (14:35 +0100)]
Add SR_CONF_SIGNAL_GENERATOR.

7 years agorohde-schwarz-sme-0x: Drop prototypes for non-existing functions.
Uwe Hermann [Thu, 2 Mar 2017 13:25:27 +0000 (14:25 +0100)]
rohde-schwarz-sme-0x: Drop prototypes for non-existing functions.

7 years agorohde-schwarz-sme-0x: Minor whitespace and consistency fixes.
Uwe Hermann [Thu, 2 Mar 2017 13:23:07 +0000 (14:23 +0100)]
rohde-schwarz-sme-0x: Minor whitespace and consistency fixes.

7 years agorohde-schwarz-sme-0x: Coding style fixes
Soeren Apel [Thu, 23 Feb 2017 16:33:47 +0000 (17:33 +0100)]
rohde-schwarz-sme-0x: Coding style fixes

7 years agorohde-schwarz-sme-0x: Initial device support
Vlad Ivanov [Thu, 27 Oct 2016 13:22:55 +0000 (09:22 -0400)]
rohde-schwarz-sme-0x: Initial device support

Signed-off-by: Vlad Ivanov <redacted>
7 years agohwdriver: Drop unneeded debug message.
Uwe Hermann [Sun, 26 Feb 2017 14:43:35 +0000 (15:43 +0100)]
hwdriver: Drop unneeded debug message.

The logs already show scan attempts per-driver, no need to also log the
init per-driver, since that's always happening and cannot (normally) fail.

7 years agoFix analog output display
Sven Schnelle [Sat, 11 Feb 2017 19:16:59 +0000 (20:16 +0100)]
Fix analog output display

I've seen the following output from sigrok-cli:

CH1: 478.720 mV
CH1: -514 mV
CH1: -0 V

I added some debug, and it seems like the digits value isn't reset
to the actual value after calling sr_analog_si_prefix_friendly():

using 6 digits
value2 0.478720 digits 6
value2 -0.513536 digits 3
value2 -0.487424 digits 0

This commit fixes this by resetting the value to the actual value before.

Signed-off-by: Sven Schnelle <redacted>
7 years agoFix initial sample value for demo driver
Sven Schnelle [Tue, 14 Feb 2017 22:30:13 +0000 (23:30 +0100)]
Fix initial sample value for demo driver

devc->step is not reset on acquistion start, so acquisition
starts with a different value every time. Thats annoying when
using the demo driver to debug sigrok, so lets make sure that
it's reset to 0.

Signed-off-by: Sven Schnelle <redacted>
7 years agoBuild: fix #865 yet again
Marcus Comstedt [Wed, 1 Feb 2017 17:50:26 +0000 (18:50 +0100)]
Build: fix #865 yet again

It appears that the symmetry changes of setting CC and CFLAGS correctly
for C code compilation in commit 104f02f broke things for people using
some other version of setuptools which uses those vars instead of
CXX and CXXFLAGS when compiling C++ code. In order to make this work
everywhere, set _both_ sets of variables as required for C++ compilation.
No C code is compiled by the python binding module anyway.

7 years agoREADME.devices: Update hantek-6xxx entry.
Uwe Hermann [Fri, 27 Jan 2017 00:14:02 +0000 (01:14 +0100)]
README.devices: Update hantek-6xxx entry.

7 years agoz60_libsigrok.rules: Add Hantek 6022BL.
Uwe Hermann [Fri, 27 Jan 2017 00:11:50 +0000 (01:11 +0100)]
z60_libsigrok.rules: Add Hantek 6022BL.

7 years agoAdd support for Hantek 6022BL
Sebastian Tabares Amaya [Wed, 28 Dec 2016 03:41:17 +0000 (22:41 -0500)]
Add support for Hantek 6022BL

7 years agoagilent-dmm: Add support for U124xC.
Aurelien Jacobs [Mon, 16 Jan 2017 10:53:11 +0000 (11:53 +0100)]
agilent-dmm: Add support for U124xC.

7 years agoagilent_dmm: Split generic part of recv_log_u128x() to recv_log().
Aurelien Jacobs [Mon, 16 Jan 2017 10:47:42 +0000 (11:47 +0100)]
agilent_dmm: Split generic part of recv_log_u128x() to recv_log().

7 years agoagilent-dmm: Add support for Vsense (Non-Contact Voltage).
Aurelien Jacobs [Tue, 17 Jan 2017 22:42:18 +0000 (23:42 +0100)]
agilent-dmm: Add support for Vsense (Non-Contact Voltage).

7 years agoagilent-dmm: Fix handling of the 2nd channel of 2 channels models.
Aurelien Jacobs [Tue, 17 Jan 2017 23:54:29 +0000 (00:54 +0100)]
agilent-dmm: Fix handling of the 2nd channel of 2 channels models.

The 2nd channel of those models is not limited to temperature,
so it is necessary to query CONF? @2.

7 years agoagilent-dmm: Set correct length in strncmp().
Aurelien Jacobs [Mon, 16 Jan 2017 10:45:20 +0000 (11:45 +0100)]
agilent-dmm: Set correct length in strncmp().

7 years agolibsigrok.h: Add SR_MQ_HARMONIC_RATIO.
Aurelien Jacobs [Mon, 16 Jan 2017 10:44:22 +0000 (11:44 +0100)]
libsigrok.h: Add SR_MQ_HARMONIC_RATIO.

7 years agoscpi_serial: Convert 'got_newline' variable to gboolean.
Uwe Hermann [Sat, 21 Jan 2017 14:17:35 +0000 (15:17 +0100)]
scpi_serial: Convert 'got_newline' variable to gboolean.

7 years agoscpi: Do not block when reading header of definite length blocks
Stefan Brüns [Fri, 13 Jan 2017 22:10:41 +0000 (23:10 +0100)]
scpi: Do not block when reading header of definite length blocks

When using SCPI over serial (over USB), we want the header without waiting
for the terminating newline, as otherwise the transfer may time out.
sr_scpi_get_data() will block until the message is complete.

7 years agoscpi_serial: Get rid of intermediate buffer, do not strip newline
Stefan Brüns [Sun, 8 Jan 2017 17:32:05 +0000 (18:32 +0100)]
scpi_serial: Get rid of intermediate buffer, do not strip newline

Lowlevel access functions should not alter the data. sr_scpi_get_string(),
which is called by most highlevel access functions, strips newlines
in a central place, and is only fed with data which contains newlines
as a final terminator.
IEEE 488.2 definite length blocks may contain arbitrary data, thus the
payload up to the provided length should be passed unaltered.

Track if the last received character is a newline, which can be used
by sr_scpi_get_string() and its callers to determine if the response
is complete.

7 years agoscpi: Query current time just once, use microseconds for timeout
Stefan Brüns [Thu, 12 Jan 2017 00:20:17 +0000 (01:20 +0100)]
scpi: Query current time just once, use microseconds for timeout

g_get_monotonic_time() returns current time in microseconds, use the same
granularity for storing the read timeout.
There is also no need to check the timeout if data has just been read.

7 years agoyokogawa-dlm: Mostly fix dumping of current timebase
Stefan Brüns [Sat, 14 Jan 2017 19:56:08 +0000 (20:56 +0100)]
yokogawa-dlm: Mostly fix dumping of current timebase

sr_period_string takes the frequency as its argument, i.e. the reciprocal
of the timebase. Obviously this will not work for frequencies less than
1Hz / timebases greater than 1 second, but at least is correct for all
other available timebases.

7 years agohameg_hmo: Mostly fix dumping of current timebase
Stefan Brüns [Wed, 11 Jan 2017 23:29:03 +0000 (00:29 +0100)]
hameg_hmo: Mostly fix dumping of current timebase

sr_period_string takes the frequency as its argument, i.e. the reciprocal
of the timebase. Obviously this will not work for frequencies less than
1Hz / timebases greater than 1 second, but at least is correct for all
other available timebases.

7 years agotests/strutil: Check output of sr_period_string
Stefan Brüns [Sat, 14 Jan 2017 19:50:12 +0000 (20:50 +0100)]
tests/strutil: Check output of sr_period_string

7 years agostrutil: Fix sr_period_string output
Stefan Brüns [Sat, 14 Jan 2017 19:48:08 +0000 (20:48 +0100)]
strutil: Fix sr_period_string output

The output was wrong for all frequencies but 1 Hz, 1 kHz, 1 MHz and 1 GHz.
With this changes, the output may still be off due to rounding, but will
be correct as to the shown accuracy.

7 years agoscpi: Don't process received data of zero length
Gerhard Sittig [Fri, 30 Dec 2016 12:16:04 +0000 (13:16 +0100)]
scpi: Don't process received data of zero length

When nothing was received in a read attempt, we need not adjust the
buffered data's read position nor the glib string object's size. Skip
any processing for empty input, just keep checking for timeouts.

7 years agoscpi: Rephrase buffer resize for free space during SCPI read, add comments
Gerhard Sittig [Sat, 7 Jan 2017 12:08:12 +0000 (13:08 +0100)]
scpi: Rephrase buffer resize for free space during SCPI read, add comments

Routine sr_scpi_get_data() checks for free space in the receive buffer,
and resizes the buffer when free space drops below a threshold. The
previous logic assumed that the resize and the read logic would interact
in some specific way to achieve the desired operation.

Adjust the buffer resize such that more free space is pre-allocated, yet
the payload size of the buffer is not affected. This eliminates the
dependency of the optional resize logic from subsequent activity for
reception of data that is non-optional.

Add comments while we are here, outline the steps taken in the
sr_scpi_get_data() routine.

7 years agohameg-hmo: Rephrase the channel constraints check (analog vs digital)
Gerhard Sittig [Fri, 6 Jan 2017 21:00:28 +0000 (22:00 +0100)]
hameg-hmo: Rephrase the channel constraints check (analog vs digital)

Phrase the logic which checks the use of analog channels and digital
pods in more generic terms. Place a comment about the contraints' being
potentially dependent on the specific HMO model. This implementation
should lend itself better to future adjustment (HMO1002?).

7 years agohameg-hmo: Map logic data from second digital pod to channels D8-D15
Gerhard Sittig [Fri, 6 Jan 2017 19:53:50 +0000 (20:53 +0100)]
hameg-hmo: Map logic data from second digital pod to channels D8-D15

An internal libsigrok implementation detail prevents partial submission
of logic data for different channel groups in multiple calls. Instead
one logic packet needs to be sent in a single call, which combines data
for all channels.

Introduce a logic data storage which folds samples from several channel
groups that were received at different points in time into a combined
memory layout of larger unitsize. Stick with the former shortcut of
passing on the input bytes directly when only the first digital pod is
used during acquisition.

This change correctly maps data from the second pod to channels D8-D15.

7 years agohameg-hmo: Do read from second digital pod during acquisition
Gerhard Sittig [Fri, 6 Jan 2017 17:56:40 +0000 (18:56 +0100)]
hameg-hmo: Do read from second digital pod during acquisition

The previous implementation only added one of the digital channels to
the list of enabled channels that are involved in the acquisition (the
first one that was found). This means that when the set of used digital
channels spans more than one pod/group, the second pod will never be
read from.

Make sure to enable one digital channel per pod/group, such that
acquisition will retrieve data from all involved input sources.

Add comments while we are here. Mention how the different setup, check,
start, and receive routines which are spread across several files do
interact to achieve acquisition.

7 years agohameg-hmo: Send exactly one sigrok frame per scope frame
Gerhard Sittig [Fri, 6 Jan 2017 17:12:55 +0000 (18:12 +0100)]
hameg-hmo: Send exactly one sigrok frame per scope frame

The previous implementation used to put FRAME_BEGIN and FRAME_END
markers around each received chunk of samples, while those chunks
correspond to a single channel (analog) or a group of eight channels
(digital) each. In other words, the hameg-hmo driver had provided a
multiple of the requested frames, and those frames were incomplete.

Make sure to only send FRAME_BEGIN before the first channel's data,
and FRAME_END after the last channel's data of a frame. Thus make
sigrok frames exactly match the scope's frames.

Add some comments on the frame marker and the acquisition stop logic
while we are here.

7 years agohameg-hmo: Use the host's endianess to read analog channel data via SCPI
Gerhard Sittig [Fri, 30 Dec 2016 22:46:27 +0000 (23:46 +0100)]
hameg-hmo: Use the host's endianess to read analog channel data via SCPI

Configure the scope to the host's native endianess before downloading
acquisition data from analog channels. This unbreaks operation on those
models which default to a representation which differs from the host.

7 years agoRevert "hameg-hmo: Support BE format for SCPI sample downloads"
Gerhard Sittig [Sat, 7 Jan 2017 20:15:00 +0000 (21:15 +0100)]
Revert "hameg-hmo: Support BE format for SCPI sample downloads"

Undo the change which queries the scope's endianess and has the floats
converted after reception. An alternative implementation will perform
better.

7 years agoRevert "scpi: Don't process received data of zero length"
Gerhard Sittig [Sat, 7 Jan 2017 20:16:33 +0000 (21:16 +0100)]
Revert "scpi: Don't process received data of zero length"

Undo the change which skips management activities when no data was
received. This change breaks the current implementation, and needs to
get deferred until a delicate interaction between the resize and the
read logic has been eliminated.

7 years agolicense: remove FSF postal address from boiler plate license text
Gerhard Sittig [Thu, 20 Oct 2016 07:57:25 +0000 (09:57 +0200)]
license: remove FSF postal address from boiler plate license text

Remove the FSF postal address as it might change (it did in the past).
Reference the gnu.org website instead which is more stable.

7 years agoasyc-ii: Rephrase "exponent" logic when parsing packets
Gerhard Sittig [Sat, 31 Dec 2016 13:25:07 +0000 (14:25 +0100)]
asyc-ii: Rephrase "exponent" logic when parsing packets

Replace a C library strcspn(3) call with the more portable glib
g_strstr_len(3) routine. This is possible since a single separator
is searched for, no actual "set of characters" is involved.

As a byproduct, this eliminates a "late" reference to 'cnt' at the
bottom of the routine, after the value was assigned in a rather distant
location at the top of the routine. The cost of strlen() should be
acceptable for a buffer with a single digit total length.

7 years agoasyc-ii: Prefer more portable and common string routines
Gerhard Sittig [Sat, 31 Dec 2016 11:54:39 +0000 (12:54 +0100)]
asyc-ii: Prefer more portable and common string routines

Replace C language string operations with their glib incarnations for
improved portability. Prefer a common sigrok float conversion routine
over a DIY implementation.

7 years agoasyc-ii: Unobfuscate a comment on packet parse constraints
Gerhard Sittig [Sat, 31 Dec 2016 11:48:59 +0000 (12:48 +0100)]
asyc-ii: Unobfuscate a comment on packet parse constraints

The specific packet layout puts constraints on the parse logic (case
sensitive comparison, order of comparison). Fix a comment that made no
sense before, and better reflect that there are two constraints.

7 years agoscpi: Rephrase length logic in data block reception, comment/group code
Gerhard Sittig [Fri, 30 Dec 2016 12:27:29 +0000 (13:27 +0100)]
scpi: Rephrase length logic in data block reception, comment/group code

Slightly rephrase the SCPI code which parses the responses that carry
(binary) data blocks. Be explicit about NUL termination when parsing the
leading length spec in the response, obsoleting the array initializer.
Add lots of comments and group source code lines to better reflect
what's happening from the protocol's perspective.

Fix the returned error code in the path which reads responses of
excessive length in chunks. The previous implementation detected errors
but always returned code 0 (success).

7 years agoscpi: Don't process received data of zero length
Gerhard Sittig [Fri, 30 Dec 2016 12:16:04 +0000 (13:16 +0100)]
scpi: Don't process received data of zero length

When nothing was received in a read attempt, we need not adjust the
buffered data's read position nor the glib string object's size. Skip
any processing for empty input, just keep checking for timeouts.

7 years agoscpi: Minor style nits
Gerhard Sittig [Fri, 30 Dec 2016 12:11:59 +0000 (13:11 +0100)]
scpi: Minor style nits

Drop an initial assignment to a variable which never takes effect.
Add braces around the body of a more complex if block. Separate routines
from each other by exactly one empty line.

7 years agohameg-hmo: Support BE format for SCPI sample downloads
Gerhard Sittig [Fri, 30 Dec 2016 22:46:27 +0000 (23:46 +0100)]
hameg-hmo: Support BE format for SCPI sample downloads

When the channel state is retrieved, query the pre-set byteorder for
SCPI data blocks as well. When samples get retrieved during capture,
support float representations in either big or little endian format.

This commit unbreaks devices which operate in BE format by default
(tested with HMO2524). It keeps working with LE format as before. For
devices which don't support the byteorder query or return unknown
responses, LE format is assumed for backwards compatibility. The
device's byteorder is only queried and never set. This makes the
commit least intrusive.

7 years agohameg-hmo: Declare support for 2 pods / 16 channels on HMO2524 and above
Gerhard Sittig [Sun, 6 Nov 2016 11:30:09 +0000 (12:30 +0100)]
hameg-hmo: Declare support for 2 pods / 16 channels on HMO2524 and above

A comment mentioned that the models HMO2524 and above support 16 digital
channels (and thus have two pods for the probes). Move those models to a
section that declares the respective features, including trigger support
on the upper digital channels.

Model detection and reflection of supported channels was tested on HMO2524.

7 years agohameg-hmo: Release enabled channels when acquisition start fails
Gerhard Sittig [Sun, 6 Nov 2016 11:08:02 +0000 (12:08 +0100)]
hameg-hmo: Release enabled channels when acquisition start fails

Commit db81fbb58261 made sure to release a potentially previously
allocated list of enabled channels before (re-)building the list in the
current invocation of acquisition start.

This commit frees the memory in the error path near the failed creation
already, which reduces the period of time where unused resources are
held, and eliminates a memory leak when acquisition is not stopped after
failed start.

Both approaches can coexist. Freeing an empty list is perfectly fine.

7 years agohameg-hmo: Fix index access for models with 2 pods / 16 digital channels
Gerhard Sittig [Sun, 6 Nov 2016 10:51:08 +0000 (11:51 +0100)]
hameg-hmo: Fix index access for models with 2 pods / 16 digital channels

Fix the code which registers the name of the second pod for digital
probes. The previous implementation registered the first pod twice, and
lost the reference to the second pod. No harm was done, none of the
supported models declared support for two pods so far.

Factor out a channel to group mapping in the registration of digital
channels, while we are here.

7 years agoserial-lcr: update README.devices (firmware upload, comm port specs)
Gerhard Sittig [Mon, 26 Dec 2016 12:14:26 +0000 (13:14 +0100)]
serial-lcr: update README.devices (firmware upload, comm port specs)

Catch up with the rename of deree-de5000 to serial-lcr. Put an item in
the "needs a comm port spec" section, too.

7 years agoderee-de5000: rename to serial-lcr, update configure logic
Gerhard Sittig [Mon, 26 Dec 2016 12:12:35 +0000 (13:12 +0100)]
deree-de5000: rename to serial-lcr, update configure logic

The former DER EE DE-5000 driver was a very thin wrapper around the
ES51919 LCR meter chipset. None of its source was specific to the
deree-de5000 device. In fact it contained code for all currently
supported LCR meters, and it's expected that all LCR meters which
will get added in the future will fit in as well.

Follow the serial-dmm model. Rename the src/hardware/deree-de5000/
directory to serial-lcr/. Update the configure logic. Although the
source directory and the configure option are named serial-lcr, the
LCR meter still is used by specifying the "deree-de5000" device driver
(which just happens to reside in the serial-lcr driver sources, among
others).

7 years agoHACKING: Improve description of Doxygen conventions.
Uwe Hermann [Tue, 20 Dec 2016 16:47:59 +0000 (17:47 +0100)]
HACKING: Improve description of Doxygen conventions.

7 years agoserial-dmm: add DMM entry for Metrix MX56C (ASYC-II based)
Gerhard Sittig [Mon, 28 Nov 2016 00:23:38 +0000 (01:23 +0100)]
serial-dmm: add DMM entry for Metrix MX56C (ASYC-II based)

7 years agodmm: introduce support for ASYC-II 16-byte protocol in PRINT mode
Gerhard Sittig [Mon, 28 Nov 2016 00:01:15 +0000 (01:01 +0100)]
dmm: introduce support for ASYC-II 16-byte protocol in PRINT mode

Introduce an asycii.c source file (modelled after metex14.c) which
implements support for the 16-byte protocol of the ASYC-II multimeter
chipset (RX only, when the PRINT button was pressed).

7 years agoConsistently use the "PeakTech" vendor name spelling.
Uwe Hermann [Mon, 5 Dec 2016 11:19:05 +0000 (12:19 +0100)]
Consistently use the "PeakTech" vendor name spelling.

(as per vendor website, and also to be consistent with our wiki)

7 years agoBindings: Link C++ code with gnustl_shared if it exists (Android)
Marcus Comstedt [Tue, 6 Dec 2016 20:01:23 +0000 (21:01 +0100)]
Bindings: Link C++ code with gnustl_shared if it exists (Android)

7 years agoJava: Use correct JNI function when calling Vector.add
Marcus Comstedt [Tue, 6 Dec 2016 20:00:25 +0000 (21:00 +0100)]
Java: Use correct JNI function when calling Vector.add

7 years agofx2lafw: fix device product string check
Vlad Ivanov [Sun, 13 Nov 2016 11:22:27 +0000 (14:22 +0300)]
fx2lafw: fix device product string check

Signed-off-by: Vlad Ivanov <redacted>
7 years agofx2lafw: warn on fail to open plausible devices
Karl Palsson [Tue, 22 Nov 2016 13:12:55 +0000 (13:12 +0000)]
fx2lafw: warn on fail to open plausible devices

Instead of silently ignoring all devices that fail to open.

This fixes bug #867.

Signed-off-by: Karl Palsson <redacted>
7 years agoMakefile: fix for #865.
Vadim A. Misbakh-Soloviov [Thu, 10 Nov 2016 09:56:43 +0000 (16:56 +0700)]
Makefile: fix for #865.

Buildsystem wants CXX to be defined as $(CXX).
Otherwise it fallbacks to default value, which does not contain
"-std=c++11" statement.

Other changes (like CC=$(CC) and CFLAGS=$(CFLAGS) instead of CXX ones)
is not directly fix the issue, but fix cases, where CFLAGS (and CC)
differs from CXX* ones, so it could lead to similar errors in the future.

7 years agoBindings: Make Ruby bindings build with Ruby 2.0
Marcus Comstedt [Wed, 16 Nov 2016 15:42:37 +0000 (16:42 +0100)]
Bindings: Make Ruby bindings build with Ruby 2.0

The alias "rb_ary_new_from_args" for "rb_ary_new3" was not introduced
until in Ruby 2.1.

7 years agoderee-de5000: add driver item for the Peaktech 2170 model
Gerhard Sittig [Sun, 6 Nov 2016 21:20:05 +0000 (22:20 +0100)]
deree-de5000: add driver item for the Peaktech 2170 model

Register another driver for the Peaktech 2170 LCR meter, which is
based on the ES51919/ES51920 chipset, too.

7 years agoderee-de5000: prepare to add more ES51919 based LCR meters
Gerhard Sittig [Sun, 6 Nov 2016 21:01:37 +0000 (22:01 +0100)]
deree-de5000: prepare to add more ES51919 based LCR meters

The "deree-de5000" driver is a very thin wrapper around the ES51919
chipset. We expect more models from other vendors to use that same
support code.

Model the registration of vendor/model combinations after the serial-dmm
approach. Register the DER EE DE-5000 device as the currently only
member in a list of drivers which all use the ES51919 chipset (no model
specific routines are registered in the absence of support for other LCR
meter chips).

This commit does not change the driver's behaviour nor the set of
supported hardware. It prepares the addition of more drivers in the
future.

7 years agoserial-dmm: Expand a code comment.
Uwe Hermann [Sun, 6 Nov 2016 13:45:08 +0000 (14:45 +0100)]
serial-dmm: Expand a code comment.

7 years agoserial-dmm: comment nit on the UART bitrate for ES519xx chips
Gerhard Sittig [Sat, 5 Nov 2016 17:01:43 +0000 (18:01 +0100)]
serial-dmm: comment nit on the UART bitrate for ES519xx chips

Factor out identical comments on the UART bitrate of ES519xx based
multimeters. These probably got copied from the first item as of 2012
when new items were added in 2014 (the added devices were from the
same vendor and rebadged).

Expand on the fact that the bitrate still is within spec, and does not
harm at all. Strictly speaking the comment could get dropped.

7 years agoserial-dmm: sort the list of device drivers (part 12, vc870)
Gerhard Sittig [Sat, 5 Nov 2016 16:54:29 +0000 (17:54 +0100)]
serial-dmm: sort the list of device drivers (part 12, vc870)

This commit puts 'vc870' meters into one group. Which completes the
series of commits which sort the list of supported serial DMMs.

7 years agoserial-dmm: sort the list of device drivers (part 11, sort ut71x)
Gerhard Sittig [Sat, 5 Nov 2016 16:35:36 +0000 (17:35 +0100)]
serial-dmm: sort the list of device drivers (part 11, sort ut71x)

This commit sorts items in the 'ut71x' group. This is separated from
collecting the group to reduce the diff size and simplify verification.

7 years agoserial-dmm: sort the list of device drivers (part 10, group ut71x)
Gerhard Sittig [Sat, 5 Nov 2016 16:32:53 +0000 (17:32 +0100)]
serial-dmm: sort the list of device drivers (part 10, group ut71x)

This commit puts 'ut71x' meters into one group. Item order is kept to
reduce the diff size and simplify verification.

7 years agoserial-dmm: sort the list of device drivers (part 9, rs9lcd)
Gerhard Sittig [Sat, 5 Nov 2016 16:29:35 +0000 (17:29 +0100)]
serial-dmm: sort the list of device drivers (part 9, rs9lcd)

This commit puts 'rs9lcd' meters into one group.

7 years agoserial-dmm: sort the list of device drivers (part 8, sort metex14)
Gerhard Sittig [Sat, 5 Nov 2016 16:01:39 +0000 (17:01 +0100)]
serial-dmm: sort the list of device drivers (part 8, sort metex14)

This commit sorts items in the 'metex14' group. This is separated from
collecting the group to reduce the diff size and simplify verification.

7 years agoserial-dmm: sort the list of device drivers (part 7, group metex14)
Gerhard Sittig [Sat, 5 Nov 2016 15:55:45 +0000 (16:55 +0100)]
serial-dmm: sort the list of device drivers (part 7, group metex14)

This commit puts 'metex14' meters into one group. Item order is kept to
reduce the diff size and simplify verification.

7 years agoserial-dmm: sort the list of device drivers (part 6, fs9922)
Gerhard Sittig [Sat, 5 Nov 2016 15:52:27 +0000 (16:52 +0100)]
serial-dmm: sort the list of device drivers (part 6, fs9922)

This commit puts 'fs9922' meters into one group.

7 years agoserial-dmm: sort the list of device drivers (part 5, sort fs9721)
Gerhard Sittig [Sat, 5 Nov 2016 16:23:34 +0000 (17:23 +0100)]
serial-dmm: sort the list of device drivers (part 5, sort fs9721)

This commit sorts items in the 'fs9721' group. This is separated from
collecting the group to reduce the diff size and simplify verification.

7 years agoserial-dmm: sort the list of device drivers (part 4, group fs9721)
Gerhard Sittig [Sat, 5 Nov 2016 16:12:43 +0000 (17:12 +0100)]
serial-dmm: sort the list of device drivers (part 4, group fs9721)

This commit puts 'fs9721' meters into one group. Item order is kept to
reduce the diff size and simplify verification.

7 years agoserial-dmm: sort the list of device drivers (part 3, es519xx)
Gerhard Sittig [Sat, 5 Nov 2016 15:40:35 +0000 (16:40 +0100)]
serial-dmm: sort the list of device drivers (part 3, es519xx)

This commit puts 'es519xx' meters into one group.

7 years agoserial-dmm: sort the list of device drivers (part 2, dtm0660)
Gerhard Sittig [Sat, 5 Nov 2016 15:31:11 +0000 (16:31 +0100)]
serial-dmm: sort the list of device drivers (part 2, dtm0660)

This commit puts 'dtm0660' meters into one group.

7 years agoserial-dmm: sort the list of device drivers (part 1, bm25x)
Gerhard Sittig [Sat, 5 Nov 2016 15:19:58 +0000 (16:19 +0100)]
serial-dmm: sort the list of device drivers (part 1, bm25x)

The previous implementation seems to have added drivers in their "order
of appearance". Start sorting the rather long list, to simplify several
tasks: Add new entries as more drivers get written, find existing items
during research, identify and compare similar models during maintenance.
As a byproduct, there will be no doubt about where to put things during
future work :) and duplicates will be spotted immediately.

This commit puts 'bm25x' meters into one group. And comments on the sort
order and motivation for sorting the table.

7 years agoes51919 lcr: unbreak channel setup after successful detection
Gerhard Sittig [Tue, 18 Oct 2016 18:35:23 +0000 (20:35 +0200)]
es51919 lcr: unbreak channel setup after successful detection

Commit 6bcb3ee8763bb introduced initial support for the Cyrustek ES51919
chipset. Its setup_channels() routine used to init a variable to assume
failure, then a loop added channels and changed the value to success.

Commit 5e23fcab889c6 changed channel setup to never fail, but kept the
initialization with an error code. Which prevented the operation of
successfully detected LCR meters.

Remove the no longer needed variable, instead always return success from
an operation which cannot fail.

Fixes: 5e23fcab889c6 "Simplify channel creation."
Signed-off-by: Gerhard Sittig <redacted>
7 years agoserial-dmm: add support for Peaktech-3330 (based on FS9721)
Gerhard Sittig [Wed, 12 Oct 2016 10:10:04 +0000 (12:10 +0200)]
serial-dmm: add support for Peaktech-3330 (based on FS9721)

Add another DMM entry for Peaktech-3330, which is based on the FS9721
chipset. Support was tested with the CP210x based USB cable.

Signed-off-by: Gerhard Sittig <redacted>
7 years agooutput/ascii: add support for user configurable character set
Gerhard Sittig [Sun, 16 Oct 2016 16:25:23 +0000 (18:25 +0200)]
output/ascii: add support for user configurable character set

Since tastes and requirements might differ, introduce support for a
user specified character set in the construction of ASCII art graphs
of signal levels. The syntax is "charset=<low><high>[<fall><rise>]",
the default remains backwards compatible with existing consumers.

In comparison to assuming a fixed character set, this change addresses
several distinct aspects:

Users can adjust the output for "higher visual contrast", or "straight
lines" instead of dotted patterns, or "increased difference in height"
for low and high signal levels, or "filled" (block like, "wall of text")
appearance of periods with high levels. User adjustable characters are
needed, as no single fixed set can satisfy the differing expectations.
Perception of the output heavily depends on specific terminals and fonts
in use.

Then there is the issue of levels versus edges, and how their timing
relates. By default edges are drawn at a point in time where the signal
was sampled and was deteremined to already _have_ changed and have
settled to the new level, which means that the position of edges in the
resulting graph might be off by up to one sample period. Strictly
speaking, the available set of samples only contains levels, and does
not hint where exactly an edge might have occured. Though this might be
considered rather nitpicky, representing the graph without edges does
better reflect the input data, and might simplify postprocessing.

Compare the previously only supported format (still the default, -O ascii):

  1:...................................................../""""""""""""""""""""
  1:""""""""""""""""""""""""""""""""\.........................................
  1:..........................................................................

to those example alternatives:

  $ sigrok-cli -i file.sr -O ascii:charset=_\"\\/
  1:_____________________________________________________/""""""""""""""""""""
  1:""""""""""""""""""""""""""""""""\_________________________________________
  1:__________________________________________________________________________

  $ sigrok-cli -i file.sr -O ascii:charset=_\"
  1:_____________________________________________________"""""""""""""""""""""
  1:""""""""""""""""""""""""""""""""__________________________________________
  1:__________________________________________________________________________

  $ sigrok-cli -i file.sr -O ascii:charset=_^
  1:_____________________________________________________^^^^^^^^^^^^^^^^^^^^^
  1:^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^__________________________________________
  1:__________________________________________________________________________

  $ sigrok-cli -i file.sr -O ascii:charset=_M
  1:_____________________________________________________MMMMMMMMMMMMMMMMMMMMM
  1:MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM__________________________________________
  1:__________________________________________________________________________

  $ sigrok-cli -i file.sr -O ascii:charset=_X
  1:_____________________________________________________XXXXXXXXXXXXXXXXXXXXX
  1:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX__________________________________________
  1:__________________________________________________________________________

Signed-off-by: Gerhard Sittig <redacted>
7 years agoudev: Add comment about Rocktech BM102.
Uwe Hermann [Wed, 2 Nov 2016 18:09:22 +0000 (19:09 +0100)]
udev: Add comment about Rocktech BM102.

7 years agoudev: Add DreamSourceLab DScope VID/PID.
Uwe Hermann [Wed, 2 Nov 2016 18:08:57 +0000 (19:08 +0100)]
udev: Add DreamSourceLab DScope VID/PID.

7 years agoudev: Update for new post-firmware Hantek 6022BE VID/PID.
Uwe Hermann [Mon, 31 Oct 2016 14:30:12 +0000 (15:30 +0100)]
udev: Update for new post-firmware Hantek 6022BE VID/PID.

7 years agohantek-6xxx: Add "fx2lafw-" prefix to the firmware files.
Uwe Hermann [Mon, 31 Oct 2016 13:42:29 +0000 (14:42 +0100)]
hantek-6xxx: Add "fx2lafw-" prefix to the firmware files.

7 years agohantek-6xxx: Update driver to use the USB product version field.
Uwe Hermann [Wed, 12 Oct 2016 20:33:19 +0000 (22:33 +0200)]
hantek-6xxx: Update driver to use the USB product version field.

We now require the use of the latest fx2lafw firmware which uses the
same USB VID/PID (1D50:608E) for the Hantek 6022BE and the variants
and rebadges of that device (e.g. the SainSmart DDS120).

The variants can be distinguished via the USB product version field.

7 years agoagilent-dmm: style improvement
Aurelien Jacobs [Mon, 17 Oct 2016 21:15:51 +0000 (23:15 +0200)]
agilent-dmm: style improvement

7 years agoagilent-dmm: add support for Log-* data_source for U128x
Aurelien Jacobs [Fri, 14 Oct 2016 20:52:17 +0000 (22:52 +0200)]
agilent-dmm: add support for Log-* data_source for U128x

7 years agoagilent-dmm: rework job management
Aurelien Jacobs [Thu, 15 Sep 2016 16:19:49 +0000 (18:19 +0200)]
agilent-dmm: rework job management

This allows much faster and configurable sampling rate, and faster
reaction to function switch.
This also gives a more repeatable job ordering and more reliable
query/reply association.

7 years agoagilent-dmm: prepare config handling to easily receive more options
Aurelien Jacobs [Thu, 15 Sep 2016 16:14:54 +0000 (18:14 +0200)]
agilent-dmm: prepare config handling to easily receive more options

7 years agoanalog: use SI prefix only with units that accept SI prefixes
Aurelien Jacobs [Tue, 13 Sep 2016 15:57:07 +0000 (17:57 +0200)]
analog: use SI prefix only with units that accept SI prefixes

7 years agoagilent-dmm: fix handling of continuity mode for U128x
Aurelien Jacobs [Tue, 13 Sep 2016 12:37:30 +0000 (14:37 +0200)]
agilent-dmm: fix handling of continuity mode for U128x

7 years agoagilent-dmm: add support for pulse width and duty cycle on U128x
Aurelien Jacobs [Tue, 13 Sep 2016 12:23:03 +0000 (14:23 +0200)]
agilent-dmm: add support for pulse width and duty cycle on U128x

7 years agoanalog: use correct unit for dBm/dBV
Aurelien Jacobs [Sun, 11 Sep 2016 17:18:19 +0000 (19:18 +0200)]
analog: use correct unit for dBm/dBV

7 years agoagilent-dmm: add support for dBm/dBV modes
Aurelien Jacobs [Sun, 11 Sep 2016 17:17:34 +0000 (19:17 +0200)]
agilent-dmm: add support for dBm/dBV modes

7 years agoagilent-dmm: add support for reading secondary display and temperature
Aurelien Jacobs [Sun, 11 Sep 2016 16:56:52 +0000 (18:56 +0200)]
agilent-dmm: add support for reading secondary display and temperature

7 years agotests: relax the "version text" length check, accept longer strings
Gerhard Sittig [Sun, 16 Oct 2016 16:25:22 +0000 (18:25 +0200)]
tests: relax the "version text" length check, accept longer strings

The version text length check fails for git setups that use more digits
in abbreviated hashes, as is recommended by e.g. the Linux kernel project.

Raise the upper limit for acceptable version strings, and add comments
on how the limits were determined. The test still might fail in setups
of slightly different configuration, but now it's easier to see why the
test failed, and how to adjust the test.

Signed-off-by: Gerhard Sittig <redacted>
7 years agoasix-sigma: fix buffer length check in register write helper
Gerhard Sittig [Sun, 16 Oct 2016 16:25:21 +0000 (18:25 +0200)]
asix-sigma: fix buffer length check in register write helper

Fix the array size check in the sigma_write_register() routine. The
'len' parameter specifies the number of bytes to write, while the 'buf'
array holds one nibble per array item.

The previous implementation (commit e8686e3ae36c1) switched to a
constant size and made the buffer large enough so that no existing
request would exceed the buffer, fixing an overflow that was present
before that commit. But the most recent size check was incomplete and
might erroneously succeed for larger amounts of write data.

It's assumed that the issue which gets addressed here never occured in
practice. The constant-size buffer could hold up to 39 bytes of input
data in their transport representation, while the largest data that was
passed to the write routine is six bytes (trigger LUT params).

Fixes: e8686e3ae36c1 "asix-sigma: Avoid use of variable length arrays"
Signed-off-by: Gerhard Sittig <redacted>
7 years agoasix-sigma: store "limit samples" value, re-determine "limit msecs" period
Gerhard Sittig [Sun, 16 Oct 2016 16:25:20 +0000 (18:25 +0200)]
asix-sigma: store "limit samples" value, re-determine "limit msecs" period

The driver internally implements the "limit samples" feature by means of
the "limit sample period" approach. Determination of the corresponding
period of time for captures depends on the sample rate as well as the
maximum sample count, and thus needs to be re-done when either setting
changes.

Introduce a "limit_samples" variable so that the value is available when
needed later. As a byproduct the parameter can be retrieved now (get).

Add comments to the sigma_set_samplerate() routine's sections, since
quite a bit is happening there, and interacts with other locations.

Signed-off-by: Gerhard Sittig <redacted>
7 years agoasix-sigma: fix out-of-range access to the samplerates[] array
Gerhard Sittig [Sun, 16 Oct 2016 16:25:19 +0000 (18:25 +0200)]
asix-sigma: fix out-of-range access to the samplerates[] array

Commit 2c9c0df86eaf removed the sentinel from the samplerates[] array,
but did not adjust the test which checked whether a rate is listed in
the set of supported rates. This could result in an out-of-range access
beyond the array's last item.

Fix the "listed?" check after iterating the table of supported rates.
Cope with either presence or absence of a sentinel in the array.

Address some more style nits while we are here. Rename an identifier
for a local variable which unintentionally might suggest that it would
be a preprocessor macro (all-caps). Reduce redundancy in data type
references as well as in the determination of the array size.

Signed-off-by: Gerhard Sittig <redacted>
7 years agoasix-sigma: update comments in firmware download code paths
Gerhard Sittig [Sun, 16 Oct 2016 16:25:18 +0000 (18:25 +0200)]
asix-sigma: update comments in firmware download code paths

The current implementation of the ASIX Sigma firmware download contains
comments which express uncertainty. Rephrase them, no magic is involved.

Discuss the polarity of the CCLK hardware signal. Which shall eliminate
potential concerns in future reviews or maintenance.

This commit only updates comments, and does not change behaviour.

Signed-off-by: Gerhard Sittig <redacted>
7 years agoDoxyfile*: Set GENERATE_TODOLIST to NO.
Uwe Hermann [Mon, 26 Sep 2016 15:02:54 +0000 (17:02 +0200)]
Doxyfile*: Set GENERATE_TODOLIST to NO.

We don't really need or use this. Bugs/issues should go into Bugzilla.

7 years agodemo: File naming consistency changes.
Uwe Hermann [Sun, 18 Sep 2016 23:48:56 +0000 (01:48 +0200)]
demo: File naming consistency changes.

7 years agohantek-dso: File naming consistency changes.
Uwe Hermann [Sun, 18 Sep 2016 16:54:56 +0000 (18:54 +0200)]
hantek-dso: File naming consistency changes.