]> sigrok.org Git - libsigrok.git/log
libsigrok.git
6 years agoscpi-pps: Rigol DP71x: Make OVP/OCP threshold listable.
Uwe Hermann [Fri, 1 Jun 2018 13:09:40 +0000 (15:09 +0200)]
scpi-pps: Rigol DP71x: Make OVP/OCP threshold listable.

6 years agoscpi: Use locale independent sr_vsnprintf_ascii() and sr_vsprintf_ascii() functions.
Frank Stettner [Sun, 11 Feb 2018 15:01:51 +0000 (16:01 +0100)]
scpi: Use locale independent sr_vsnprintf_ascii() and sr_vsprintf_ascii() functions.

6 years agotests: Tests for the locale independent sr_vsprintf_ascii() function.
Frank Stettner [Sun, 11 Feb 2018 15:00:19 +0000 (16:00 +0100)]
tests: Tests for the locale independent sr_vsprintf_ascii() function.

6 years agostrutil: Locale independent sprintf() and vsprintf() functions
Frank Stettner [Sun, 11 Feb 2018 14:59:26 +0000 (15:59 +0100)]
strutil: Locale independent sprintf() and vsprintf() functions

6 years agoscpi-pps: Add listable OVP/OCP threshold for HP 66xxx and prepared all other
Frank Stettner [Thu, 7 Dec 2017 11:59:24 +0000 (12:59 +0100)]
scpi-pps: Add listable OVP/OCP threshold for HP 66xxx and prepared all other

6 years agoscpi-pps: Add HP 6631B, HP 66332A, HP 6633B and HP 6634B power supplies
Frank Stettner [Thu, 7 Dec 2017 11:36:53 +0000 (12:36 +0100)]
scpi-pps: Add HP 6631B, HP 66332A, HP 6633B and HP 6634B power supplies

6 years agoscpi-pps: Add missing functionality for the HP 6632B power supply.
Frank Stettner [Thu, 7 Dec 2017 11:17:58 +0000 (12:17 +0100)]
scpi-pps: Add missing functionality for the HP 6632B power supply.

6 years agoscpi-pps: Reimplemention of switching channel groups (PSU channels)
Frank Stettner [Sat, 9 Dec 2017 18:45:02 +0000 (19:45 +0100)]
scpi-pps: Reimplemention of switching channel groups (PSU channels)

Acquisition won't work correctly in a multi-threaded environment, when
config_set() and config_get() are called with a channel group.
The channel switching itself has moved to scpi/scpi.c, to be able to
handle switching in a thread safe way.

6 years agoscpi-pps: Use thread safe SCPI functions, return float not double.
Frank Stettner [Sat, 11 Nov 2017 17:20:07 +0000 (18:20 +0100)]
scpi-pps: Use thread safe SCPI functions, return float not double.

Use of the thread safe SCPI functions, so no write+read operation is
interruped.

Also return float values instead of double value in acquisition mode.
This is related to bug #779.

6 years agoscpi: Synchronize read, write and write+read operations.
Frank Stettner [Sat, 11 Nov 2017 15:29:55 +0000 (16:29 +0100)]
scpi: Synchronize read, write and write+read operations.

This ensures that SCPI read/write/write+read operations are thread safe.
F.e.: If a write operation expects a return value (in other words: a
read operation), it is not allowed to be interrupted by another write
operation.

To simplify things, the SCPI helper functions are moved from
scpi/helpers.c to scpi/scpi.c and also are renamed to fit the naming
scheme.

libgpib in particular will abort the program execution in case of
concurrent operations.

6 years agoscpi.c: Drop an unneeded log message.
Uwe Hermann [Thu, 31 May 2018 18:53:31 +0000 (20:53 +0200)]
scpi.c: Drop an unneeded log message.

The IDN string is already logged by sr_scpi_get_string().

6 years agoscpi_serial.c: Improve an error message.
Uwe Hermann [Thu, 31 May 2018 18:44:33 +0000 (20:44 +0200)]
scpi_serial.c: Improve an error message.

6 years agoscpi_serial.c: Drop an unneeded log message.
Uwe Hermann [Thu, 31 May 2018 18:26:50 +0000 (20:26 +0200)]
scpi_serial.c: Drop an unneeded log message.

The number of bytes read is already logged by the serial backend:

  sr: [00:00.072857] scpi_serial: Read 1 bytes into buffer.
  sr: [00:00.073884] serial: Read 1/2008 bytes.
  sr: [00:00.073900] scpi_serial: Read 1 bytes into buffer.
  sr: [00:00.074896] serial: Read 1/2007 bytes.
  sr: [00:00.074905] scpi_serial: Read 1 bytes into buffer.
  sr: [00:00.075949] serial: Read 1/2006 bytes.

6 years agoscpi-pps: Add support for the Rigol DP711/DP712.
Uwe Hermann [Thu, 31 May 2018 17:26:50 +0000 (19:26 +0200)]
scpi-pps: Add support for the Rigol DP711/DP712.

6 years agoinput/chronovu_la8: claim responsibility for LA16 files, devel comments
Gerhard Sittig [Fri, 25 May 2018 17:13:11 +0000 (19:13 +0200)]
input/chronovu_la8: claim responsibility for LA16 files, devel comments

The chronovu_la8 input module is capable of handling either file type,
generated by LA8 or LA16 vendor software. Automatic detection is not
available, but user provided channel counts work fine.

Adjust the input module's name and description, and claim support for
.kdt as well as .kd1 files.

Add developer notes on implementation details, the file content's
constraints, and potential future adjustment.

6 years agoinput/chronovu_la8: only send data to the session, don't send the header
Gerhard Sittig [Sun, 13 May 2018 10:28:07 +0000 (12:28 +0200)]
input/chronovu_la8: only send data to the session, don't send the header

The file format is funny, a data part is leading (fixed size) and a
"header" part follows. The previous implementation sent the header part
to the session, too, pretending it was part of the data. This change
limits the number of samples that get sent to the session.

Comment on the file layout and header fields while we are here. This
information got lost in commit 02e24c0ce0d8 when the input module got
converted from do-it-yourself file operations to having intrinsic
handler routines invoked from common logic which handles the file.

6 years agoinput/logicport: unobfuscate 64-bit-clean bit mask literals
Gerhard Sittig [Mon, 21 May 2018 18:08:14 +0000 (20:08 +0200)]
input/logicport: unobfuscate 64-bit-clean bit mask literals

Prefer the more portable UINT64_C() macro over the UL suffix when a
literal needs to span "more than 31 bit positions". Adjust other
locations for consistency across the source file.

6 years agoinput/trace32_ad: fix potential buffer overflow for unexpected input data
Gerhard Sittig [Mon, 21 May 2018 17:55:58 +0000 (19:55 +0200)]
input/trace32_ad: fix potential buffer overflow for unexpected input data

Commit 8c4bff1d25e1 introduced a routine which prints what mostly should
be text, and avoids non-printable characters. This implementation used an
incorrect format string, which could result in data getting written past
the end of a buffer. Fix the format string.

6 years agohwdriver.c: Fix two scan-build warnings.
Uwe Hermann [Sat, 19 May 2018 20:04:22 +0000 (22:04 +0200)]
hwdriver.c: Fix two scan-build warnings.

  src/hwdriver.c: In function ‘log_key’:
  src/hwdriver.c:648:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    opstr = op == SR_CONF_GET ? "get" : op == SR_CONF_SET ? "set" : "list";
               ^~
  src/hwdriver.c: In function ‘check_key’:
  src/hwdriver.c:681:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    opstr = op == SR_CONF_GET ? "get" : op == SR_CONF_SET ? "set" : "list";
               ^~

6 years agosiglent-sds: Fix multiple scan-build warnings.
Uwe Hermann [Sat, 19 May 2018 19:58:10 +0000 (21:58 +0200)]
siglent-sds: Fix multiple scan-build warnings.

  src/hardware/siglent-sds/api.c:596:3: warning: Argument to g_free() is the address of a global variable, which is not memory allocated by malloc()
                  g_free(cmd);
                  ^~~~~~~~~~~
  src/hardware/siglent-sds/api.c:641:3: warning: Argument to g_free() is the address of a global variable, which is not memory allocated by malloc()
                  g_free(cmd);
                  ^~~~~~~~~~~

6 years agolecroy-xstream: Fix a potential memory leak.
Uwe Hermann [Sat, 19 May 2018 19:56:07 +0000 (21:56 +0200)]
lecroy-xstream: Fix a potential memory leak.

Reported by scan-build:

  src/hardware/lecroy-xstream/protocol.c:680:12: warning: Potential leak of memory pointed to by 'analog.data'
                                  return SR_ERR;
                                         ^~~~~~

6 years agohameg-hmo: Fix two potential memory leaks.
Uwe Hermann [Sat, 19 May 2018 19:54:15 +0000 (21:54 +0200)]
hameg-hmo: Fix two potential memory leaks.

Reported by scan-build:

  src/hardware/hameg-hmo/api.c:533:12: warning: Potential leak of memory pointed to by 'pod_enabled'
                                  return SR_ERR;
                                         ^~~~~~

6 years agoinput/logicport: Fix outdated format_match().
Uwe Hermann [Sat, 19 May 2018 19:51:12 +0000 (21:51 +0200)]
input/logicport: Fix outdated format_match().

Reported by scan-build:

  src/input/logicport.c:1186:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
    .format_match = format_match,
                    ^~~~~~~~~~~~

6 years agobindings: wrap sr_input_scan_file() in the C++ language binding
Gerhard Sittig [Sun, 13 May 2018 06:56:09 +0000 (08:56 +0200)]
bindings: wrap sr_input_scan_file() in the C++ language binding

Allow C++ applications to have the input format automatically detected,
and get a corresponding InputFormat instance. This makes the format match
logic available to PulseView.

6 years agoinput: provide accessor routine for (struct sr_input *)->module
Gerhard Sittig [Sun, 13 May 2018 06:54:48 +0000 (08:54 +0200)]
input: provide accessor routine for (struct sr_input *)->module

Add a public API routine which allows applications to query the
sr_input_module from an sr_input.

6 years agoinput/trace32_ad: data type nits, log verbosity in header parsing
Gerhard Sittig [Sat, 12 May 2018 16:09:31 +0000 (18:09 +0200)]
input/trace32_ad: data type nits, log verbosity in header parsing

Log determined header format when parsing trace32 file headers. Keep
another log message during regular processing, but silence it during
format match.

Use more appropriate data types for local and instance variables. Adjust
format strings accordingly.

6 years agoinput/trace32_ad: rephrase the header parse logic
Gerhard Sittig [Sat, 12 May 2018 15:53:42 +0000 (17:53 +0200)]
input/trace32_ad: rephrase the header parse logic

There were several issues with the previous implementation of the logic
which parses trace32 input files: A string comparison was inverted, and
compared a seven character literal to a five character copy of the input.
One more character was trimmed before CTRL-Z (the CP/M EOF), which often
is SPACE in input files, but might be excessive on other input files.

Replace a DIY character search while we are here. Use symbolic names for
special characters. Factor out a test and memory release, to simplify
error code paths in the remaining logic. Extend comments.

6 years agoinput/trace32_ad: silence format match logging, improve robustness
Gerhard Sittig [Sat, 12 May 2018 15:38:33 +0000 (17:38 +0200)]
input/trace32_ad: silence format match logging, improve robustness

There is not much point in log messages about format mismatch in the
auto detect phase, where each module gets queried in turn and most are
supposed to not match.

Do not print non-printable characters in log messages. Those could occur
in the format detection phase, or in the regular processing of input
files that either are unexpected or invalid (or is there a binary header
format variant even?).

6 years agoinput/chronovu_la8: address file size data type nits
Gerhard Sittig [Sat, 12 May 2018 12:20:44 +0000 (14:20 +0200)]
input/chronovu_la8: address file size data type nits

Although the file format handled by this input module appears to be of
fixed size (8MiB plus 5 more bytes), it's more reliable to use a data
type for the file size that is larger than "an int". Although off_t
would be most portable, use uint64_t to match the code which passes the
parameter to the input module.

6 years agoinput: pass larger buffer to auto format detection
Gerhard Sittig [Sat, 12 May 2018 09:39:38 +0000 (11:39 +0200)]
input: pass larger buffer to auto format detection

The previous implementation already was inconsistent (used to allocate
255 bytes and claimed that 128 bytes were sufficient). While existing
formats already required more than a few bytes of input (regular VCD
files' header sections exceed 255 bytes length).

Increase the buffer size that gets passed to input modules' match
method. Use 4MiB for consistency with other locations. Do not enforce a
minimum size, as there are valid input files which are shorter than 128
bytes. Auto-detection failed on those.

This addresses part of bug #1200.

6 years agoinput: add confidence (detection strength) to format_match()
Gerhard Sittig [Sat, 12 May 2018 09:25:36 +0000 (11:25 +0200)]
input: add confidence (detection strength) to format_match()

When users don't specify the input format, applications can try to have
the format auto-detected. Some of the tests were weak and could result
in false positives.

Add a 'confidence' parameter to the input modules' format_match()
method. Claim high confidence (1) for those formats which can check
magic strings or the presence of essential keywords (vcd, wav). Claim
medium confidence (10) for those formats which happened to mis-detect
inputs in the past (trace32_ad). Claim weak confidence (100) for those
formats which totally lack reliable conditions and rather guess than
detect (chronovu_la8).

Prefer the best match in public scan routines. Return at most one module
to callers even if multiple modules matched, to keep the current API.

This addresses part of bug #1200.

6 years agoinput/logicport: Drop some unneeded allocation checks.
Uwe Hermann [Thu, 17 May 2018 19:09:48 +0000 (21:09 +0200)]
input/logicport: Drop some unneeded allocation checks.

6 years agoinput/logicport: introduce input module for LogicPort File (*.lpf)
Gerhard Sittig [Tue, 24 Apr 2018 21:25:25 +0000 (23:25 +0200)]
input/logicport: introduce input module for LogicPort File (*.lpf)

Implement an input module for .lpf files, the "LogicPort File" format of
the Intronix LA1034 vendor software. This version supports wires with
enabled and inverted state, compressed samples, signal names, signal
groups (but not multiple assignment), and automatic format detection.

The logic which determines whether "the file header" was completely
received, and sample data can get sent to the session, implements an
assumption in the absence of a better and more reliable condition.

Invalid input gets rejected, but diagnostics is rather limited. Since
all channels get to be the member of a channel group, either specified
by the user in the input file, or arranged for in the input module, the
"missing separator" part of bug 1186 has become obsolete.

6 years agolibsigrok.h: Fix multiple compiler warnings (-Wshift-overflow=2).
Uwe Hermann [Wed, 16 May 2018 21:20:40 +0000 (23:20 +0200)]
libsigrok.h: Fix multiple compiler warnings (-Wshift-overflow=2).

  ../include/libsigrok/libsigrok.h:653:19: warning: result of ‘1 << 31’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    SR_CONF_GET = (1 << 31),
                     ^~

[...]

6 years agosr_analog_to_float(): Fix multiple compiler warnings (-Wshadow).
Uwe Hermann [Wed, 16 May 2018 20:49:22 +0000 (22:49 +0200)]
sr_analog_to_float(): Fix multiple compiler warnings (-Wshadow).

  src/analog.c:205:23: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
       for (unsigned int i = 0; i < count; i++) {
                         ^
  src/analog.c:178:18: note: shadowed declaration is here
    unsigned int b, i, count;
                    ^
[...]

6 years agosr_analog_to_float(): Fix a compiler warning (-Wshadow).
Uwe Hermann [Wed, 16 May 2018 20:46:34 +0000 (22:46 +0200)]
sr_analog_to_float(): Fix a compiler warning (-Wshadow).

  src/analog.c: In function ‘sr_analog_to_float’:
  src/analog.c:194:9: warning: declaration of ‘offset’ shadows a previous local [-Wshadow]
   float offset = analog->encoding->offset.p / (float)analog->encoding->offset.q;
         ^~~~~~
  src/analog.c:177:8: note: shadowed declaration is here
  float offset;
        ^~~~~~

6 years agodemo: optionally accept frame limit spec at scan time
Gerhard Sittig [Thu, 3 May 2018 19:51:46 +0000 (21:51 +0200)]
demo: optionally accept frame limit spec at scan time

Allow developers to specify the (default) number of frames at compile
time (default to "off" as before). Accept the frame limit spec at scan()
time as well. This is useful when applications don't run config_set() at
runtime.

Tested with:
$ pulseview -d demo:logic_channels=0:analog_channels=1:limit_frames=4

6 years agodemo: make frame generation (and maximum frame count) a runtime option
Gerhard Sittig [Thu, 3 May 2018 19:26:07 +0000 (21:26 +0200)]
demo: make frame generation (and maximum frame count) a runtime option

The previous implementation supported the generation of frames as a
compile time option. This change lets users adjust the feature at
runtime.

In the absence of a frame count limit no frame begin/end markers get
sent (the default behaviour of the previous implementation). When a
frame count limit is specified, the respective number of frames gets
sent and acquisition stops.

The fixed amount of 1000 samples per frame is an arbitrary choice. This
compile time option is easily adjusted in the source code.

6 years agodemo: introduce graycode generator mode
Gerhard Sittig [Sun, 13 May 2018 17:45:46 +0000 (19:45 +0200)]
demo: introduce graycode generator mode

Introduce support for the "graycode" logic pattern. Generate up to
64 bits of graycode output (all logic lines, no repetition, not limited
by the generator's internal pattern buffer). The implementation was
tested with 16 channels.

6 years agodemo: add convenient bit mask for "all logic channels"
Gerhard Sittig [Sun, 13 May 2018 17:40:00 +0000 (19:40 +0200)]
demo: add convenient bit mask for "all logic channels"

Keep a context variable around with a bit mask for all logic channels.
This is convenient in setup and generation routines, to avoid garbage
in unassigned bit positions of session feed packets.

6 years agodemo: data type nits in the device context (enum, unsigned int)
Gerhard Sittig [Sun, 13 May 2018 17:27:51 +0000 (19:27 +0200)]
demo: data type nits in the device context (enum, unsigned int)

Move the declaration of codes for pattern types before the declaration
of the context container such that the latter can reference the former.
Add 'int' to an unsigned variable that omitted the base type.

6 years agoinput/trace32_ad: silence format errors during input format match
Gerhard Sittig [Tue, 24 Apr 2018 21:28:41 +0000 (23:28 +0200)]
input/trace32_ad: silence format errors during input format match

When auto-detection tries to find the input module that can handle a
file, unexpected input format should be considered non-fatal. Only emit
error messages when process_header() got invoked from process_buffer()
after initialization. Emit debug messages in early stages where no input
module context exists yet.

6 years agodreamsourcelab-dslogic: Properly set initial voltage threshold.
Uwe Hermann [Sat, 28 Apr 2018 21:39:59 +0000 (23:39 +0200)]
dreamsourcelab-dslogic: Properly set initial voltage threshold.

The initial voltage threshold in dev_open() was being set to a
default value in the devc->cur_threshold variable but not actually set
in the device itself.

Patch by Jörg Alpers <redacted>, thanks a lot!

6 years agodmm/ms8250d: Fix two log messages.
Uwe Hermann [Thu, 26 Apr 2018 22:06:58 +0000 (00:06 +0200)]
dmm/ms8250d: Fix two log messages.

6 years agoAdd support for the MASTECH MS8250D multimeter
Mandl [Thu, 12 Apr 2018 19:09:20 +0000 (21:09 +0200)]
Add support for the MASTECH MS8250D multimeter

6 years agohantek-4032l: Emit FPGA version log message.
Uwe Hermann [Tue, 24 Apr 2018 19:06:16 +0000 (21:06 +0200)]
hantek-4032l: Emit FPGA version log message.

6 years agosoft-trigger: Fix an issue causing triggers to not work.
Uwe Hermann [Tue, 24 Apr 2018 06:55:36 +0000 (08:55 +0200)]
soft-trigger: Fix an issue causing triggers to not work.

6 years agorigol-ds: Fix an issue causing only one channel to be acquired.
Uwe Hermann [Sun, 22 Apr 2018 16:36:12 +0000 (18:36 +0200)]
rigol-ds: Fix an issue causing only one channel to be acquired.

This fixes bug #1018.

6 years agorigol-ds: Make two log messages more specific.
Uwe Hermann [Sun, 22 Apr 2018 14:49:33 +0000 (16:49 +0200)]
rigol-ds: Make two log messages more specific.

Slightly modified version of a suggested change by Aleksander Alsekseev.

6 years agohantek-4032l: Add option to abort acquisition.
Andrej Valek [Wed, 4 Apr 2018 20:59:52 +0000 (22:59 +0200)]
hantek-4032l: Add option to abort acquisition.

Signed-off-by: Andrej Valek <redacted>
6 years agohantek-4032l: Fix mismatch in magic number.
Andrej Valek [Mon, 2 Apr 2018 18:08:01 +0000 (20:08 +0200)]
hantek-4032l: Fix mismatch in magic number.

- fix LIBUSB_TIMEOUT errors
- fix same data receiving
- send reset vendor request before new data getting
- decrease USB polling timeout

This fixes bug #1190.

Signed-off-by: Andrej Valek <redacted>
6 years agohantek-4032l: Fix structure packing.
Andrej Valek [Mon, 2 Apr 2018 18:01:19 +0000 (20:01 +0200)]
hantek-4032l: Fix structure packing.

- use pragma to handle different behavior between gcc and minGW bit-field packing
- bit-field integer variables needs to be align to 2-byte boundary
Compiler does not produce an error when accessing into non-__packed pointer.
However, the field might not be properly aligned for this type.
More information could be found on:
 - https://sourceforge.net/p/mingw-w64/bugs/275/
 - http://www.keil.com/support/man/docs/ARMCC/armcc_chr1359124990875.htm

Signed-off-by: Andrej Valek <redacted>
6 years agohantek-4032l: Fix typo from device porting to new lib version.
Andrej Valek [Fri, 16 Feb 2018 19:54:09 +0000 (20:54 +0100)]
hantek-4032l: Fix typo from device porting to new lib version.

Signed-off-by: Andrej Valek <redacted>
6 years agolog: Move log level check so that it affects all handlers.
Uwe Hermann [Sat, 21 Apr 2018 22:23:10 +0000 (00:23 +0200)]
log: Move log level check so that it affects all handlers.

Before this change, the loglevel check would only be performed for the
default log handler in libsigrok, but not for other handlers set
via sr_log_callback_set().

This fixes bug #698.

6 years agooutput/csv: Make the label values option a list.
Uwe Hermann [Sat, 21 Apr 2018 21:30:44 +0000 (23:30 +0200)]
output/csv: Make the label values option a list.

This allows UIs to display a drop-down with all possible choices,
instead of forcing the user to look up / remember all of them.

6 years agoinput/csv: Make the data format option a list.
Uwe Hermann [Sat, 21 Apr 2018 21:28:58 +0000 (23:28 +0200)]
input/csv: Make the data format option a list.

This allows UIs to display a drop-down with all possible choices,
instead of forcing the user to look up / remember all of them.

6 years agosoft-trigger: Use g_try_malloc() for potentially large allocation.
Uwe Hermann [Sat, 21 Apr 2018 21:27:00 +0000 (23:27 +0200)]
soft-trigger: Use g_try_malloc() for potentially large allocation.

This fixes bug #1000.

6 years agosession_driver: Quickfix to prevent looped analog data reads.
Uwe Hermann [Thu, 19 Apr 2018 21:23:35 +0000 (23:23 +0200)]
session_driver: Quickfix to prevent looped analog data reads.

A local buffer was too small, snprintf() was used to write the
name of the analog-1-1-xxx ZIP archive names in that buffer.

Due to the limited size, only 3 characters were usable for the last
number component, i.e. the code would loop around from analog-1-1-999
to analog-1-1-100 (instead of analog-1-1-1000).

As a quickfix, increase the buffer size by a large margin, a nicer
fix should be used later on.

6 years agoinput/null: Add a null module that discards all data.
Uwe Hermann [Thu, 19 Apr 2018 20:15:54 +0000 (22:15 +0200)]
input/null: Add a null module that discards all data.

This is useful for testing purposes.

6 years agooutput/null: Add a null module that discards all data.
Uwe Hermann [Thu, 19 Apr 2018 18:10:50 +0000 (20:10 +0200)]
output/null: Add a null module that discards all data.

This is useful for testing purposes.

6 years agoinput/output: Slightly improved module descriptions.
Uwe Hermann [Thu, 19 Apr 2018 16:19:44 +0000 (18:19 +0200)]
input/output: Slightly improved module descriptions.

6 years agoinput modules: Increase chunk size to 4MB for all modules.
Uwe Hermann [Wed, 18 Apr 2018 21:22:38 +0000 (23:22 +0200)]
input modules: Increase chunk size to 4MB for all modules.

This reduces overhead and can slightly increase performance, depending
on the module.

6 years agoinput modules: Name chunk size #defines CHUNK_SIZE consistently.
Uwe Hermann [Wed, 18 Apr 2018 21:29:28 +0000 (23:29 +0200)]
input modules: Name chunk size #defines CHUNK_SIZE consistently.

6 years agoinput/trace32_ad: Drop unused #define.
Uwe Hermann [Wed, 18 Apr 2018 21:28:45 +0000 (23:28 +0200)]
input/trace32_ad: Drop unused #define.

6 years agoinput/wav: Put internal buffer on the heap instead of the stack.
Uwe Hermann [Wed, 18 Apr 2018 21:25:25 +0000 (23:25 +0200)]
input/wav: Put internal buffer on the heap instead of the stack.

Increasing the buffer/chunk size could cause issues when trying to put
large arrays on the stack.

6 years agoinput/binary: Increase chunk size from 4KB to 4MB.
Uwe Hermann [Sat, 14 Apr 2018 19:38:07 +0000 (21:38 +0200)]
input/binary: Increase chunk size from 4KB to 4MB.

This can slightly increase performance when loading larger files.

6 years agoinput/binary: Only calculate unitsize once.
Uwe Hermann [Sat, 14 Apr 2018 17:46:43 +0000 (19:46 +0200)]
input/binary: Only calculate unitsize once.

6 years agoinput modules: Improve option names and descriptions.
Uwe Hermann [Sat, 14 Apr 2018 16:47:49 +0000 (18:47 +0200)]
input modules: Improve option names and descriptions.

These should be slightly more useful and contain more information
(should also work reasonably well for 'sigrok-cli --show' and as
tooltips in UIs).

6 years agozketech-ebd-usb: Drop unneeded log message.
Uwe Hermann [Sun, 8 Apr 2018 18:56:34 +0000 (20:56 +0200)]
zketech-ebd-usb: Drop unneeded log message.

The number of bytes sent is already logged by the libsigrok serial code.

6 years agoconfigure.ac: zketech-ebd-usb driver needs libserialport.
Uwe Hermann [Tue, 3 Apr 2018 16:05:37 +0000 (18:05 +0200)]
configure.ac: zketech-ebd-usb driver needs libserialport.

6 years agozketech-ebd-usb: Shorten function name prefix for better readability.
Uwe Hermann [Tue, 3 Apr 2018 14:55:14 +0000 (16:55 +0200)]
zketech-ebd-usb: Shorten function name prefix for better readability.

6 years agozketech-ebd-usb: Make a few functions static.
Uwe Hermann [Tue, 3 Apr 2018 10:52:38 +0000 (12:52 +0200)]
zketech-ebd-usb: Make a few functions static.

6 years agozketech-ebd-usb: Add some underscores to #defines.
Uwe Hermann [Tue, 3 Apr 2018 10:23:02 +0000 (12:23 +0200)]
zketech-ebd-usb: Add some underscores to #defines.

6 years agozketech-ebd-usb: First version of the driver.
Sven Bursch-Osewold [Sun, 1 Apr 2018 13:12:46 +0000 (15:12 +0200)]
zketech-ebd-usb: First version of the driver.

6 years agozketech-ebd-usb: Initial driver skeleton.
Sven Bursch-Osewold [Thu, 8 Feb 2018 17:01:23 +0000 (18:01 +0100)]
zketech-ebd-usb: Initial driver skeleton.

6 years agousbtmc: Silence some overly verbose log messages.
Uwe Hermann [Sun, 8 Apr 2018 17:47:00 +0000 (19:47 +0200)]
usbtmc: Silence some overly verbose log messages.

These trigger quite often with unrelated devices and confuse people.

  scpi_usbtmc: Failed to get configuration descriptor: LIBUSB_ERROR_NOT_FOUND, ignoring device.

6 years agordtech-dps: User ternary operator.
Uwe Hermann [Thu, 29 Mar 2018 06:45:25 +0000 (08:45 +0200)]
rdtech-dps: User ternary operator.

6 years agordtech-dps: New driver for RDTech DPS/DPH series PSUs.
James Churchill [Tue, 20 Feb 2018 01:42:56 +0000 (11:42 +1000)]
rdtech-dps: New driver for RDTech DPS/DPH series PSUs.

6 years agordtech-dps: Initial driver skeleton.
James Churchill [Tue, 20 Feb 2018 01:28:38 +0000 (11:28 +1000)]
rdtech-dps: Initial driver skeleton.

6 years agomodbus: Return explicit SR_ERR values as required by modbus.c
James Churchill [Sun, 18 Feb 2018 06:54:01 +0000 (16:54 +1000)]
modbus: Return explicit SR_ERR values as required by modbus.c

The Modbus RTU implementation was inappropriately returning lengths
from the serial functions when the calling functions expect only an
sr_error_code value.

6 years agomodbus: Increase modbus reply timeout to 500ms.
James Churchill [Sun, 18 Feb 2018 06:29:01 +0000 (16:29 +1000)]
modbus: Increase modbus reply timeout to 500ms.

Needed by rdtech-dps driver, 100ms is too short.

6 years agoresource.c: Fix firmware loading bug (#1140)
Soeren Apel [Tue, 20 Mar 2018 08:41:51 +0000 (09:41 +0100)]
resource.c: Fix firmware loading bug (#1140)

6 years agobackend: Emit firmware search paths in a log message.
Uwe Hermann [Sun, 18 Mar 2018 17:16:26 +0000 (18:16 +0100)]
backend: Emit firmware search paths in a log message.

6 years agoIntroduce sr_resourcepaths_get()
Soeren Apel [Sat, 17 Mar 2018 20:21:32 +0000 (21:21 +0100)]
Introduce sr_resourcepaths_get()

This provides an interface to fix #1128.

6 years agokorad-kaxxxxp: Korad OEM: RND KA3005P
Axel Hinrichs [Fri, 9 Mar 2018 21:23:35 +0000 (22:23 +0100)]
korad-kaxxxxp: Korad OEM: RND KA3005P

6 years agooutput/csv: fix out-of-bounds array access in process_analog()
Gerhard Sittig [Sun, 4 Mar 2018 18:12:29 +0000 (19:12 +0100)]
output/csv: fix out-of-bounds array access in process_analog()

Make sure to not exceed the ctx->analog_samples[] array bounds. Don't
use the (huge) channel's index in the device's(!) channel list, instead
use the zero-based and dense index into the array of analog samples in
the accumulation buffer, before writing to the external file.

This fixes the segfault reported in bug #1124.

6 years agooutput/csv: use longer names for iteration variables
Gerhard Sittig [Sun, 4 Mar 2018 17:19:38 +0000 (18:19 +0100)]
output/csv: use longer names for iteration variables

The process_analog() logic is rather complex, dealing with the total
list of channels in the device (which can be of different types), and a
number of submitted samples for a specified list of channels. Replace
the rather short variable names for i, j, c (and num_channels) with
something longer that hopefully increases readability of the complex
loop bodies.

Note that this change merely renames identifiers, and does not change
behaviour.

6 years agooutput/csv: reduce indentation in process_analog()
Gerhard Sittig [Sun, 4 Mar 2018 16:51:29 +0000 (17:51 +0100)]
output/csv: reduce indentation in process_analog()

Instead of nesting indentation levels upon equality of a value, skip
iterations upon inequality. This reduces indentation, and might improve
readability.

[ Indentation changes, see 'diff -w -b' for the essence. ]

6 years agohp-3478a: Remove unnecessary curly brackets.
Frank Stettner [Tue, 6 Mar 2018 16:44:28 +0000 (17:44 +0100)]
hp-3478a: Remove unnecessary curly brackets.

6 years agohp-3478a: Set correct number of digits
Frank Stettner [Tue, 6 Mar 2018 14:10:13 +0000 (15:10 +0100)]
hp-3478a: Set correct number of digits

6 years agohp-3478a: spec_digits must be parsed before range parsing.
Frank Stettner [Tue, 6 Mar 2018 13:11:29 +0000 (14:11 +0100)]
hp-3478a: spec_digits must be parsed before range parsing.

6 years agoarachnid-labs-re-load-pro: Replace C++-style comments with C-style comments.
Frank Stettner [Tue, 6 Mar 2018 15:56:42 +0000 (16:56 +0100)]
arachnid-labs-re-load-pro: Replace C++-style comments with C-style comments.

6 years agometex14: Fix wrong measurement modes
Frank Stettner [Thu, 22 Feb 2018 14:30:43 +0000 (15:30 +0100)]
metex14: Fix wrong measurement modes

6 years agometex14: Add power factor measurement mode
Frank Stettner [Thu, 22 Feb 2018 14:16:15 +0000 (15:16 +0100)]
metex14: Add power factor measurement mode

6 years agolibsigrok.h: Fix SR_CONF_UNDER_VOLTAGE_CONDITION_THRESHOLD order.
Uwe Hermann [Sat, 3 Mar 2018 18:25:57 +0000 (19:25 +0100)]
libsigrok.h: Fix SR_CONF_UNDER_VOLTAGE_CONDITION_THRESHOLD order.

This has to be the last entry in its "category", otherwise it'll mean an
ABI breakage.

6 years agoarachnid-labs-re-load-pro: Simplify a code chunk.
Uwe Hermann [Sat, 3 Mar 2018 18:24:35 +0000 (19:24 +0100)]
arachnid-labs-re-load-pro: Simplify a code chunk.

6 years agoarachnid-labs-re-load-pro: Add encoding.digits to analog packet
Frank Stettner [Thu, 18 Jan 2018 17:41:26 +0000 (18:41 +0100)]
arachnid-labs-re-load-pro: Add encoding.digits to analog packet

6 years agoarachnid-labs-re-load-pro: Index for channel "I"
Frank Stettner [Fri, 5 Jan 2018 19:07:20 +0000 (20:07 +0100)]
arachnid-labs-re-load-pro: Index for channel "I"

6 years agoarachnid-labs-re-load-pro: Get a response when in acquision mode.
Frank Stettner [Mon, 11 Dec 2017 15:06:16 +0000 (16:06 +0100)]
arachnid-labs-re-load-pro: Get a response when in acquision mode.

6 years agoarachnid-labs-re-load-pro: Make SR_CONF_REGULATION listable
Frank Stettner [Thu, 7 Dec 2017 09:41:32 +0000 (10:41 +0100)]
arachnid-labs-re-load-pro: Make SR_CONF_REGULATION listable