Commit Graph

5245 Commits

Author SHA1 Message Date
Elen Eisendle ca7d442692 serial-dmm/uni-t-dmm: Add UNI-T UT804 DMM definitions 2020-04-04 23:25:09 +02:00
Andreas Sandberg 35037b1d8b input/trace32_ad: Fix pod_data uninitialised warning
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-04-04 22:25:03 +02:00
Andreas Sandberg 5ff772410b gwinstek-gpd: Fix use of uninitialized variable
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-04-04 22:24:26 +02:00
Juan M. Bello-Rivas 5652085a4e bindings/cxx: Include missing header file
Including the `functional` header is necessary in order to use `std::function` in the definition of `LogCallbackFunction` when compiling with gcc 7.3.0.
2020-04-04 22:24:21 +02:00
Uwe Hermann 49d130200d bindings/ruby: Disable Ruby bindings until we have a fix for #1526.
The Ruby bindings currently don't build (at least with Ruby 2.7
and/or SWIG 4.x). Disable them as a temporary workaround until we
have a more permanent fix.
2020-04-04 22:24:05 +02:00
Uwe Hermann c9901879f6 configure.ac: Also check for "swig4.0". 2020-04-04 22:24:05 +02:00
Uwe Hermann e803574173 bindings/java: Fix build issue with SWIG 4.x.
Tested with SWIG 3.x and SWIG 4.x.

This fixes bug #1527.
2020-04-04 22:24:05 +02:00
Uwe Hermann 6762401d2b Doxygen: Fix various warnings.
src/resource.c:414: warning: unbalanced grouping commands

  conversion.c:81: warning: argument 'lo_thr' from the argument list of sr_a2l_schmitt_trigger has multiple @param documentation sections

  src/analog.c:611: warning: return value 'SR_ERR_ARG' of sr_rational_div has multiple documentation sections

  src/device.c:205: warning: explicit link request to 'TRUE' could not be resolved
  src/device.c:205: warning: explicit link request to 'FALSE' could not be resolved
  src/device.c:231: warning: explicit link request to 'TRUE' could not be resolved
  src/device.c:231: warning: explicit link request to 'FALSE' could not be resolved

  src/serial.c:246: warning: explicit link request to 'NULL' could not be resolved

  src/strutil.c:602: warning: explicit link request to 'NULL' could not be resolved

  src/device.c:94: warning: unable to resolve reference to 'sr_channel_free()' for \ref command

  src/strutil.c:597: warning: unable to resolve reference to 'sr_hexdump_free()' for \ref command
  src/strutil.c:622: warning: unable to resolve reference to 'sr_hexdump_new()' for \ref command

  src/device.c:430: warning: The following parameters of sr_dev_inst_channel_add(struct sr_dev_inst *sdi, int index, int type, const char *name) are not documented: parameter 'sdi'

  src/session.c:163: warning: The following parameters of fd_source_new(struct sr_session *session, void *key, gintptr fd, int events, int timeout_ms) are not documented: parameter 'events'
2020-03-25 20:27:57 +01:00
Uwe Hermann 82b9f3d116 Doxygen: Properly mark a few symbols as private.
(otherwise these end up in the API docs)

Remove all @internal markings, only use @private where needed.
2020-03-25 20:10:24 +01:00
Uwe Hermann deaaebb28d bindings/python/Doxyfile: Set OPTIMIZE_OUTPUT_JAVA to NO. 2020-03-25 19:38:48 +01:00
Uwe Hermann b4066aa80e Doxyfile_internal: Fix various settings and paths. 2020-03-25 19:38:48 +01:00
Uwe Hermann 4e9e767be0 Doxyfile: Predefine HAVE_SERIAL_COMM for serial docs.
Without this, src/serial.c API docs won't be generated.
2020-03-25 19:38:19 +01:00
Uwe Hermann b07a07fec2 Doxyfile: Fix/update path and file references. 2020-03-25 19:35:20 +01:00
Uwe Hermann 2faa1db033 Doxyfile: Bring back the workaround for bug #1422. 2020-03-24 21:15:15 +01:00
Uwe Hermann e2bd01f4a7 All Doxyfile files: Update file template to doxygen 1.8.16.
This is done semi-automatically by running "doxygen -u Doxyfile".
2020-03-24 21:15:15 +01:00
Uwe Hermann d7357ebbb6 All Doxyfile files: Set CREATE_SUBDIRS to NO. 2020-03-24 21:15:15 +01:00
Uwe Hermann 20680f58ff manson-hcs-3xxx: Support device IDs with and without "HCS-" prefix.
Since we've now seen lots of devices in the wild that come with the
"HCS-" prefix in the ID, it's probably safe to assume all of them
could have it.

This fixes bug #1530.
2020-03-24 21:10:27 +01:00
Uwe Hermann bfa79fbdb6 asix-sigma: Drop duplicate error message prefixes.
The sr_err() call automatically adds a prefix to all messages, in
this specific case "asix-sigma: " will be added.
2020-03-24 19:22:11 +01:00
Daniel Trnka 440810958c asix-sigma: move DRAM line buffer allocation closer to its use
Move the allocation of the DRAM line buffer in the sample download code
path closer to the location where that buffer is used and gets released.
2020-03-24 19:20:40 +01:00
Daniel Trnka f73b00b647 asix-sigma: check for successful register access in sample download
The previous implementation got stuck in an infinite loop when data
acquisition started, but the device got disconnected before the data
acquisition terminates. An implementation detail ignored communication
errors, and never saw the expected condition that was required to
continue in the sample download sequence. Unbreak that code path.
2020-03-24 19:20:40 +01:00
Uwe Hermann f5c863e572 korad-kaxxxxp: Fix max. possible current for all devices.
Even though the devices/websites/manuals usually say 0..30V, the
hardware actually accepts up to 31V, both via serial as well as by
simply rotating the knob on the device (and our driver already
reflects that).

The same is true for current, it's usually 0..5A as per docs, but many
(probably all) devices accept 5.1A via serial and knob.

Thus, set the max current of all devices to 5.1A (or 3.1A for 3A
devices). We're assuming they all have this property, and we've seen
this in practice on at least three different versions of the device.
2020-03-22 16:58:54 +01:00
David Sastre Medina 7415217ede korad-kaxxxxp: Add a new ID for KORAD KA3005P V4.2 power supply
On a recently acquired Korad KA3005P power supply, the ID supplied by the
device is not known by libsigrok.

$ sigrok-cli --driver=korad-kaxxxxp:conn=/dev/ttyACM0 --scan
sr: korad-kaxxxxp: Unknown model ID 'KORAD KA3005P V4.2' detected, aborting.

This fixes bug #1522.

Thanks to bitaround@gmail.com for the amperage fix.
2020-03-22 15:52:16 +01:00
jirjirjir c4a46475a6 rigol-ds: Rigol DS1152E-EDU support fix 2020-03-16 23:44:25 +01:00
Soeren Apel 781ae4484d Fix #1509 by providing alternate sample format scales 2020-02-28 23:26:20 +01:00
Martin Ling 8491cf7cad python: Apply typemap for VariantBase to VariantContainerBase.
Fixes #1480.
2020-01-05 18:25:13 +00:00
Uwe Hermann f0362f595a agilent-dmm: Add Agilent U1237AX (completely untested). 2019-12-27 22:08:41 +01:00
Uwe Hermann e47e23355f agilent-dmm: U127x: Fix mode switch event handling.
The DMMs report as an event to which mode the user switched (by turning the
rotary switch): "*0", "*1", etc.

Most other DMMs have few modes, but the U127x DMMs have up to 11 different
modes (i.e., "*10" is a valid event).
2019-12-27 20:59:04 +01:00
Uwe Hermann 4c660b46c1 Makefile.am: Add missing src/serial_hid.h. 2019-12-24 16:39:01 +01:00
Uwe Hermann f0901a5050 src/serial_hid.h: Include guard consistency fix. 2019-12-24 16:38:56 +01:00
Uwe Hermann 31b4a9a236 input/csv: Set default "header" option value to true.
This makes re-opening files that were saved via the libsigrok CSV
output module slightly more convenient.
2019-12-22 23:50:22 +01:00
Uwe Hermann 5a27356705 output/csv: Set default "time" option value to false. 2019-12-22 23:50:11 +01:00
Uwe Hermann d649ff2290 manson-hcs-3xxx: support new HCS-3200 / PPS-13610 model string.
This fixes bug #1441.
2019-12-22 23:19:47 +01:00
Uwe Hermann c810ad60b4 mastech-ms6514: Add missing string.h #include. 2019-12-22 21:06:46 +01:00
Uwe Hermann aca2b460cc README.devices: Document MASTECH MS6514 interface enabling. 2019-12-22 15:52:46 +01:00
Uwe Hermann 9b1101d621 configure.ac: mastech-ms6514: Add serial_comm flag. 2019-12-22 15:33:45 +01:00
Dave Buechi 23669c3df3 Initial support for MASTECH MS6514 thermometer 2019-12-22 15:32:51 +01:00
Uwe Hermann 212769c3b8 input/csv: Consistently use a newline before the last return statement. 2019-12-22 14:42:34 +01:00
Gerhard Sittig 51e60cde09 input/csv: style nits, drop @brief and DIAG in debug output
The @brief keyword is not needed since JAVADOC_AUTOBRIEF is enabled in the
Doxygen configuration. Remove a remaining "DIAG" prefix in a debug
message, the output already is filtered according to the log level, and
prefixed by the module name.
2019-12-22 14:35:41 +01:00
Gerhard Sittig 811dcf7ea9 input/csv: re-calculate samplerate after file re-import
Don't clobber the user provided samplerate (specified by input module
options). This allows to re-determine the samplerate from a potentially
changed file on disk upon reload.
2019-12-21 18:20:04 +01:00
Gerhard Sittig 307b239390 input/csv: expand cleanup (resource release) and unbreak file reload
The list of previously created channels is kept across file reloads. We
also need to keep (or re-create) the list of channels that are used for
datafeed submission of analog data.

Release more allocated resources in the .cleanup() routine, and do reset
internal state such that a .reset() thus .cleanup() then .receive() call
sequence will work. This code path is taken for re-import of files (see
bug #1241, CSV was affected).
2019-12-21 18:20:04 +01:00
Gerhard Sittig fbefa03f58 input/csv: improve reliabilty of text line isolation
Slightly unobfuscate the "end of current input chunk" marker in the data
processing loop. Make the variable's identifier reflect that it's not a
temporary, but instead something worth keeping around until needed again.

Unbreak the calculation of line numbers in those situations where input
chunks (including previously accumulated unprocessed data) happens to
start with a line termination. This covers input files which start with
empty lines, as well as environments with mutli-byte line termination
sequences (CR/LF) and arbitrary distribution of bytes across chunks.

This fixes bug #968.

Accept when there is no line termination in the current input chunk. We
cannot assume that calling applications always provide file content in
large enough chunks to span complete lines. And any arbitrary chunk size
which applications happen to use can get exceeded by input files (e.g.
for generated files with wide data or long comments).
2019-12-21 18:20:04 +01:00
Gerhard Sittig cb3b80512e input/csv: update developer comments and TODO list
Mention the required synchronization of default option values and format
match logic in a prominent location where options are discussed.

Update the TODO list for the CSV input module. Mixed signal handling got
fixed by rearranging channel creation. Samplerate can get determined
from timestamp columns already. The double data type for analog data
remains.
2019-12-21 18:20:04 +01:00
Gerhard Sittig 05719d75aa input/csv: move channel creation to after format parsing
The previous implementation incompletely handled arbitrary data type
oders in mixed signal input files. Rearrange the logic such that all
format specs get parsed first, then all channel creation details get
determined, then all channels get created. It appears to be essential
that all logic channels get created first, resulting in index numbers
starting at 0 and addressing the correct position in bitfields. The
analog channels get created after all logic channels exist. Adjacent
number ranges for channel types also results in more readable logic in
other locations.

This was tested with -I csv:column_formats=t,2a,l,a,x4,a,-,b3 example
data, and works as expected.
2019-12-21 18:20:04 +01:00
Gerhard Sittig cd7c5f9655 input/csv: add automatic format match support
Implement .format_match() support in the CSV input module. Simple
multi-column files will automatically load without an "-I csv" spec.
Non-default option values still do require the module selection before
options can get passed to the module.
2019-12-21 18:20:04 +01:00
Gerhard Sittig 43e1e23a11 input/csv: another stab at option help texts
Try to balance a compact format and completeness/accuracy of content for
builtin help texts for the CSV input module's options. Assume a technical
audience (this is signal analysis software after all).

Rename a few internal identifiers which help organize the list of options
and their help texts. Too short names became obscure.
2019-12-21 18:20:04 +01:00
Gerhard Sittig 7e4e65bf65 input/csv: add support for timestamp columns, auto detect samplerate
Accept 't' format specs for timestamp columns. Automatically derive the
samplerate from input data when timestamps are available and the user
did not provide a rate. Stick with a simple approach for robustness
since automatic detection is easy to override when it fails. This
feature is mostly about convenience.
2019-12-21 18:20:04 +01:00
Gerhard Sittig fc3b42e93a input/csv: robustness nits in column format dispatching
The previous implementation open coded type checks by comparing an enum
value against specific constants. Which was especially ugly since there
are multiple types which all are logic, and future column types neither
get ignored nor have channels associated with them.

Improve readability and robustness by adding helpers which check classes
(ignore, logic, analog) instead of the multitude of -/x/o/b|l/a variants
within the classes.

Also comment on the order of channel creation, and how to improve it.
2019-12-21 18:20:04 +01:00
Gerhard Sittig 08eb955a69 input/csv: update comments/helptext for analog input data
Expand the developer comment that's inline in the source file. There is
enough room to explain things. Try to come up with a "one-line" help text
that is precise yet compact, and does inform the user of available format
choices including modifiers. Chances are that longer descriptions start
reducing the usefulness of the help or the visibility of options when
users are in a hurry. Those who care can access the manual.

Mark more options as obsolete, and mention more default values in the
builtin help text. Also tweak a comment on getting channel names from
header lines.
2019-12-21 18:20:04 +01:00
Gerhard Sittig 3f1f63f007 input/csv: work around undesired logic/analog group "bleeding"
Support for mixed signal CSV input data is desirable and should be
possible. The current implementation just happens to not fully cope with
arbitrary mixes of data types in columns yet. Add a quick workaround,
but also a TODO item to properly address the topic later.
2019-12-21 18:20:04 +01:00
Gerhard Sittig a267bf450c input/csv: accept user provided analog resolution in column formats
Stick with the (arbitrary) default of 3 digits for analog data. Accept
user specified digit counts in the column_formats= option, like "a4".
2019-12-21 18:20:04 +01:00