]> sigrok.org Git - libsigrok.git/log
libsigrok.git
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.

7 years agofluke-dmm: File naming consistency changes.
Uwe Hermann [Sun, 18 Sep 2016 16:52:53 +0000 (18:52 +0200)]
fluke-dmm: File naming consistency changes.

7 years agoagilent-dmm: File naming consistency changes.
Uwe Hermann [Sun, 18 Sep 2016 16:50:11 +0000 (18:50 +0200)]
agilent-dmm: File naming consistency changes.

7 years agoresource: Improve logging output.
Uwe Hermann [Sat, 24 Sep 2016 09:41:47 +0000 (11:41 +0200)]
resource: Improve logging output.

Don't show duplicate lines (per default) such as

  sr: resource: Failed to locate 'saleae-logic16-fx2.fw'.
  sr: resource: Failed to open resource 'saleae-logic16-fx2.fw'.

The first one is now an sr_dbg() instead of sr_err().

Also, mention that a higher loglevel will give more information as to
where the backend is looking for resources / firmware files.

This fixes bug #806.

7 years agooutput/csv: Add an option to output units for column labels.
Mike Meyer [Thu, 8 Sep 2016 16:06:33 +0000 (11:06 -0500)]
output/csv: Add an option to output units for column labels.

This change tweaks the CSV output module to change the label
setting from on/off to units/channels/off, where channels is the old
on behavior, and units uses the meaning field to generate the column
label - except for the generated Time column, which uses the label from
the X axis when it's generating gnuplot output.

7 years agorigol-ds: Add DS1074Z Plus and DS1104Z Plus.
Karsten König [Sat, 24 Sep 2016 09:02:14 +0000 (11:02 +0200)]
rigol-ds: Add DS1074Z Plus and DS1104Z Plus.

This was successfully tested on a DS1074Z Plus.

7 years agocontrib: Drop all example gnuplot scripts.
Uwe Hermann [Sun, 4 Sep 2016 16:16:40 +0000 (18:16 +0200)]
contrib: Drop all example gnuplot scripts.

These files (or at least similar ones) can now be generated by the
CSV output module.

7 years agooutput/gnuplot: Remove, obsoleted by improved CSV module.
Mike Meyer [Sat, 6 Aug 2016 21:33:28 +0000 (16:33 -0500)]
output/gnuplot: Remove, obsoleted by improved CSV module.

We no longer need a gnuplot output module, the CSV module can output
gnuplot-compatible data now (and it can also generate .gpi files).

7 years agocsv: Fix a segfault due to a g_malloc() allocating too few bytes.
Uwe Hermann [Fri, 2 Sep 2016 18:06:07 +0000 (20:06 +0200)]
csv: Fix a segfault due to a g_malloc() allocating too few bytes.

7 years agocsv: Fix a segfault when using non-hardware input.
Uwe Hermann [Fri, 2 Sep 2016 18:05:52 +0000 (20:05 +0200)]
csv: Fix a segfault when using non-hardware input.

7 years agoNew all-singing, almost all dancing, csv output module.
Mike Meyer [Fri, 5 Aug 2016 09:52:08 +0000 (04:52 -0500)]
New all-singing, almost all dancing, csv output module.

 - It now handles more than one analog value correctly - at least from the
   demo driver.
 - Add column headers from channel names.
 - Add a row dedup capability.
 - Add a sample time column.
 - Add a frame end formatting (for gnuplot).
 - Made almost all formatting controllable or at least optional.
 - Fix it so we can mix analog and digital values.
 - Add outputting a gnuplot script for the data.
 - Count actual channels, not just mine, to find end of sample.
 - Add trigger option (untested).

7 years agofluke-dmm: Fix two compiler warnings.
Uwe Hermann [Mon, 29 Aug 2016 19:29:40 +0000 (21:29 +0200)]
fluke-dmm: Fix two compiler warnings.

  src/hardware/fluke-dmm/fluke.c:312:24: warning: implicit conversion from \
  enumeration type 'enum sr_unit' to different enumeration type 'enum sr_mq' \
   [-Wenum-conversion]
          devc->mq = devc->unit = devc->mqflags = 0;
                   ~ ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~

  src/hardware/fluke-dmm/fluke.c:312:40: warning: implicit conversion from \
  enumeration type 'enum sr_mqflag' to different enumeration type 'enum \
  sr_unit' [-Wenum-conversion]
          devc->mq = devc->unit = devc->mqflags = 0;
                                ~ ~~~~~~~~~~~~~~^~~

7 years agoes51919: Fix a compiler warning.
Uwe Hermann [Mon, 29 Aug 2016 19:10:13 +0000 (21:10 +0200)]
es51919: Fix a compiler warning.

  src/lcr/es51919.c:538:73: warning: comparison of unsigned enum expression \
< 0 is always false [-Wtautological-compare]
    if ((analog->meaning->mq = parse_mq(pkt, is_secondary, pkt[2] & 0x80)) < 0)

7 years agostrutil.c: Fix a Doxygen warning.
Uwe Hermann [Mon, 29 Aug 2016 16:44:43 +0000 (18:44 +0200)]
strutil.c: Fix a Doxygen warning.

7 years agoFix various sample/time limit regressions.
Uwe Hermann [Mon, 29 Aug 2016 16:39:12 +0000 (18:39 +0200)]
Fix various sample/time limit regressions.

These were accidentally introduced when the sw_limits helpers were added.

7 years agogmc-mh-1x-2x: Shorten some code by using the ternary operator.
Uwe Hermann [Mon, 29 Aug 2016 16:01:08 +0000 (18:01 +0200)]
gmc-mh-1x-2x: Shorten some code by using the ternary operator.

7 years agoRemove some unneeded double-spaces.
Uwe Hermann [Mon, 29 Aug 2016 15:48:18 +0000 (17:48 +0200)]
Remove some unneeded double-spaces.

(also perform some other minor whitespace fixes while at it)

7 years agodevice.c: Whitespace/cosmetics and typo fixes.
Uwe Hermann [Mon, 29 Aug 2016 14:43:49 +0000 (16:43 +0200)]
device.c: Whitespace/cosmetics and typo fixes.

7 years agoanalog.c: Whitespace/cosmetics and typo fixes.
Uwe Hermann [Mon, 29 Aug 2016 14:15:00 +0000 (16:15 +0200)]
analog.c: Whitespace/cosmetics and typo fixes.

7 years agoHACKING: Prefer git pull requests over mailing list patches.
Uwe Hermann [Sun, 28 Aug 2016 18:16:31 +0000 (20:16 +0200)]
HACKING: Prefer git pull requests over mailing list patches.

Also, drop the reference to gitorious.org (no longer available).

7 years agoHave remaining drivers default to digits=2 for analog values.
Uwe Hermann [Sun, 28 Aug 2016 21:52:48 +0000 (23:52 +0200)]
Have remaining drivers default to digits=2 for analog values.

The default so far was 0, which meant there would be no significant
digits at all, yielding results that looked strange/wrong to the user.

Long-term all remaining drivers should be fixed to use the actual,
correct digits and spec_digits values according to the device's
capabilities and/or datasheet/manual. Until that is done, a default
of digits=2 is used as a temporary workaround.

This fixes the remaining parts of bug #815.

7 years agoDocument if or why sometimes digits/spec_digits is 0.
Uwe Hermann [Sun, 28 Aug 2016 21:50:33 +0000 (23:50 +0200)]
Document if or why sometimes digits/spec_digits is 0.

7 years agoappa-55ii: properly set encoding digits also for log memory reception
Aurelien Jacobs [Sun, 28 Aug 2016 20:53:04 +0000 (22:53 +0200)]
appa-55ii: properly set encoding digits also for log memory reception

7 years agoanalog: improve output readability by using SI prefix
Aurelien Jacobs [Sun, 28 Aug 2016 20:11:20 +0000 (22:11 +0200)]
analog: improve output readability by using SI prefix

7 years agogwinstek-gds-800: properly set encoding digits
Aurelien Jacobs [Wed, 24 Aug 2016 23:08:29 +0000 (01:08 +0200)]
gwinstek-gds-800: properly set encoding digits

7 years agohantek-dso: properly set encoding digits
Aurelien Jacobs [Wed, 24 Aug 2016 00:11:24 +0000 (02:11 +0200)]
hantek-dso: properly set encoding digits

7 years agohantek-6xxx: properly set encoding digits
Aurelien Jacobs [Tue, 23 Aug 2016 22:55:12 +0000 (00:55 +0200)]
hantek-6xxx: properly set encoding digits

7 years agohung-chang-dso-2100: properly set encoding digits
Aurelien Jacobs [Tue, 23 Aug 2016 23:18:58 +0000 (01:18 +0200)]
hung-chang-dso-2100: properly set encoding digits

7 years agobaylibre-acme: properly set encoding digits
Aurelien Jacobs [Wed, 24 Aug 2016 00:38:58 +0000 (02:38 +0200)]
baylibre-acme: properly set encoding digits

7 years agotondaj-sl-814: properly set encoding digits
Aurelien Jacobs [Tue, 23 Aug 2016 22:51:46 +0000 (00:51 +0200)]
tondaj-sl-814: properly set encoding digits

7 years agokecheng-kc-330b: properly set encoding digits
Aurelien Jacobs [Tue, 23 Aug 2016 22:51:22 +0000 (00:51 +0200)]
kecheng-kc-330b: properly set encoding digits

7 years agocolead-slm: properly set encoding digits
Aurelien Jacobs [Tue, 23 Aug 2016 22:51:08 +0000 (00:51 +0200)]
colead-slm: properly set encoding digits

7 years agocem-dt-885x: properly set encoding digits
Aurelien Jacobs [Tue, 23 Aug 2016 22:50:48 +0000 (00:50 +0200)]
cem-dt-885x: properly set encoding digits

7 years agogmc-mh-1x-2x: properly set encoding digits
Aurelien Jacobs [Tue, 23 Aug 2016 22:50:23 +0000 (00:50 +0200)]
gmc-mh-1x-2x: properly set encoding digits

7 years agoREADME.devices: Update firmware related information.
Uwe Hermann [Sun, 21 Aug 2016 20:19:57 +0000 (22:19 +0200)]
README.devices: Update firmware related information.

7 years agodocument encoding.digits and spec.spec_digits
Aurelien Jacobs [Sun, 21 Aug 2016 16:32:38 +0000 (18:32 +0200)]
document encoding.digits and spec.spec_digits

7 years agomic-985xx: fix encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 15:01:19 +0000 (17:01 +0200)]
mic-985xx: fix encoding digits

7 years agouni-t-ut32x: properly set encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 15:00:59 +0000 (17:00 +0200)]
uni-t-ut32x: properly set encoding digits

7 years agolascar-el-usb: properly set encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 15:00:14 +0000 (17:00 +0200)]
lascar-el-usb: properly set encoding digits

7 years agocenter-3xx: properly set encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 14:59:02 +0000 (16:59 +0200)]
center-3xx: properly set encoding digits

7 years agokern-scale: properly set encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 14:58:10 +0000 (16:58 +0200)]
kern-scale: properly set encoding digits

7 years agodemo: properly set encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 14:57:58 +0000 (16:57 +0200)]
demo: properly set encoding digits

7 years agomotech-lps-30x: properly set encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 14:57:28 +0000 (16:57 +0200)]
motech-lps-30x: properly set encoding digits

7 years agomanson-hcs-3xxx: properly set encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 14:56:56 +0000 (16:56 +0200)]
manson-hcs-3xxx: properly set encoding digits

7 years agokorad-kaxxxxp: properly set encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 14:56:14 +0000 (16:56 +0200)]
korad-kaxxxxp: properly set encoding digits

7 years agoatten-pps3xxx: properly set encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 14:55:50 +0000 (16:55 +0200)]
atten-pps3xxx: properly set encoding digits

7 years agoderee-de5000: properly set encoding digits
Aurelien Jacobs [Sun, 21 Aug 2016 14:55:06 +0000 (16:55 +0200)]
deree-de5000: properly set encoding digits

7 years agorigol-ds: properly set encoding digits
Aurelien Jacobs [Fri, 19 Aug 2016 22:56:23 +0000 (00:56 +0200)]
rigol-ds: properly set encoding digits

7 years agoscpi-pps: properly set encoding digits
Aurelien Jacobs [Thu, 18 Aug 2016 13:21:01 +0000 (15:21 +0200)]
scpi-pps: properly set encoding digits

7 years agomaynuo-m97: properly set encoding digits
Aurelien Jacobs [Wed, 17 Aug 2016 20:01:04 +0000 (22:01 +0200)]
maynuo-m97: properly set encoding digits

7 years agovc870: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:40:11 +0000 (01:40 +0200)]
vc870: properly set encoding digits

7 years agout71x: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:37:44 +0000 (01:37 +0200)]
ut71x: properly set encoding digits

7 years agout372: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:35:17 +0000 (01:35 +0200)]
ut372: properly set encoding digits

7 years agors9lcd: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:33:35 +0000 (01:33 +0200)]
rs9lcd: properly set encoding digits

7 years agometex14: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:28:50 +0000 (01:28 +0200)]
metex14: properly set encoding digits

This closes bug #815.

7 years agom2110: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:27:22 +0000 (01:27 +0200)]
m2110: properly set encoding digits

7 years agofs9922: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:19:40 +0000 (01:19 +0200)]
fs9922: properly set encoding digits

7 years agofs9721: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:16:40 +0000 (01:16 +0200)]
fs9721: properly set encoding digits

7 years agoes519xx: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:09:13 +0000 (01:09 +0200)]
es519xx: properly set encoding digits

7 years agodtm0660: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 23:03:21 +0000 (01:03 +0200)]
dtm0660: properly set encoding digits

7 years agobrymen-bm25x: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 16:08:03 +0000 (18:08 +0200)]
brymen-bm25x: properly set encoding digits

7 years agobrymen-bm86x: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 22:14:53 +0000 (00:14 +0200)]
brymen-bm86x: properly set encoding digits

7 years agobrymen-bm86x: remove redundant initilialization
Aurelien Jacobs [Tue, 16 Aug 2016 16:16:28 +0000 (18:16 +0200)]
brymen-bm86x: remove redundant initilialization

7 years agoappa-55ii: properly set encoding digits
Aurelien Jacobs [Tue, 16 Aug 2016 22:52:05 +0000 (00:52 +0200)]
appa-55ii: properly set encoding digits

7 years agohantek-6xxx: Ignore requests to set Hantek 6022BE coupling.
Erik Montnemery [Thu, 18 Aug 2016 21:05:11 +0000 (23:05 +0200)]
hantek-6xxx: Ignore requests to set Hantek 6022BE coupling.

Here's a patch to "Ignore requests to set coupling for the Hantek 6022BE",
this clears the LIBUSB errors for me.

Also in the patch:

 - There is a crash because config_list() can be called with sdi == NULL.

   This can be reproduced by doing:
     "sigrok-cli.exe --driver hantek-6xxx --show"

 - There seems to be a very unsafe loop in config_set() when setting COUPLING;
   the coupling vector is assumed to be zero terminated, but is not declared
   as such.

   Note: The same issue is present also for other hardware, at least for
   hantek-dso/api.c. The patch is only for hantek-6xxx though.

7 years agohantek-6xxx: sdi might be NULL - don't assign devc until !sdi is checked.
Sebastian Zagrodzki [Fri, 19 Aug 2016 13:22:35 +0000 (15:22 +0200)]
hantek-6xxx: sdi might be NULL - don't assign devc until !sdi is checked.

7 years agohantek-6xxx: Fix the device scan to not scan the NULL entry.
Mike Meyer [Mon, 11 Jul 2016 16:09:04 +0000 (11:09 -0500)]
hantek-6xxx: Fix the device scan to not scan the NULL entry.

7 years agodrivers: don't try to access the sr_driver_list section with no driver compiled.
Aurelien Jacobs [Sun, 14 Aug 2016 23:28:55 +0000 (01:28 +0200)]
drivers: don't try to access the sr_driver_list section with no driver compiled.

This closes bug #820.

7 years agohantek-6xxx: only show DC coupling for the Hantek device
Benjamin Larsson [Sat, 23 Apr 2016 19:48:05 +0000 (21:48 +0200)]
hantek-6xxx: only show DC coupling for the Hantek device

7 years agohantek-6xxx: Fix some issues by using power-of-two data sizes.
Uwe Hermann [Sun, 14 Aug 2016 21:51:49 +0000 (23:51 +0200)]
hantek-6xxx: Fix some issues by using power-of-two data sizes.

There were issues when using non-power-of-two data sizes with e.g.
the Hantek 6022BE device. For example, on Windows the acquisition would
simply hang and never complete:

  hantek-6xxx: receive_transfer(): status LIBUSB_TRANSFER_ERROR received 0 bytes

The issue was reported by Erik Montnemery on the mailing list, the
original patch was posted by "mmark" here (thanks!):

  http://www.eevblog.com/forum/testgear/sainsmart-dds120-usb-oscilloscope-(buudai-bm102)/msg911729/#msg911729

The issue has been verified by me on Windows and Linux, and also that
this change does indeed fix it (tested Hantek 6022BE and Sainsmart DDS120).

Neither PulseView nor sigrok-cli hang anymore on Windows, and on Linux
the log messages suggest improvements as well:

  -hantek-6xxx: data_amount 712
  +hantek-6xxx: data_amount: 200 (rounded to power of 2: 512)

  -hantek-6xxx: receive_transfer(): calculated samplerate == 2327ks/s
  -hantek-6xxx: receive_transfer(): status LIBUSB_TRANSFER_OVERFLOW received 512 bytes.
  +hantek-6xxx: receive_transfer(): calculated samplerate == 1969ks/s
  +hantek-6xxx: receive_transfer(): status LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED received 512 bytes.

This fixes bug #821.

7 years agoFix a segfault with input/output modules.
Uwe Hermann [Sun, 17 Jul 2016 17:39:04 +0000 (19:39 +0200)]
Fix a segfault with input/output modules.

Some functions in std.c were using

  const char *prefix = sdi->driver->name;

but were called from input/output modules as well (which don't have
a "driver" field).

As a temporary workaround, use "unknown" as prefix in such cases until
a more permanent solution is implemented.

This fixes bug #813.

7 years agoensure the only entry point of libdrivers doesn't have visibility=hidden
Aurelien Jacobs [Sat, 18 Jun 2016 19:52:31 +0000 (21:52 +0200)]
ensure the only entry point of libdrivers doesn't have visibility=hidden

This fixes the following build issue on OSX:
Undefined symbols for architecture x86_64:
  "_sr_drivers_init", referenced from:
      _sr_init in backend.o

This closes bug #802.

7 years agoAdd VID/PID for the CWAV USBee ZX.
Thomas [Mon, 29 Feb 2016 02:59:57 +0000 (18:59 -0800)]
Add VID/PID for the CWAV USBee ZX.

The hardware is identical to the SX.

This fixes bug #764.

7 years agofx2lafw: Set sr_analog_encoding.digits to 2 for now.
Uwe Hermann [Sun, 3 Jul 2016 21:38:29 +0000 (23:38 +0200)]
fx2lafw: Set sr_analog_encoding.digits to 2 for now.

7 years agofx2lafw: Fix analog scaling.
Uwe Hermann [Sun, 3 Jul 2016 21:03:52 +0000 (23:03 +0200)]
fx2lafw: Fix analog scaling.

Thanks to Patrick Remy <redacted> for the fix.

7 years agosession.c: Drop unneeded check.
Uwe Hermann [Sun, 3 Jul 2016 14:41:16 +0000 (16:41 +0200)]
session.c: Drop unneeded check.

The dev_acquisition_stop() callback is not optional and always present.

7 years agouni-t-dmm: Drop unused UNI_T_UT_D04_NEW #define.
Uwe Hermann [Sun, 3 Jul 2016 14:40:44 +0000 (16:40 +0200)]
uni-t-dmm: Drop unused UNI_T_UT_D04_NEW #define.

7 years agoagilent-dmm: add support for U128x
Aurelien Jacobs [Fri, 17 Jun 2016 20:49:46 +0000 (22:49 +0200)]
agilent-dmm: add support for U128x

7 years agoagilent-dmm: add support for Keysight branded meters
Aurelien Jacobs [Sat, 11 Jun 2016 23:48:15 +0000 (01:48 +0200)]
agilent-dmm: add support for Keysight branded meters

7 years agoagilent-dmm: add support for AC/DC flags in current mode
Aurelien Jacobs [Sat, 11 Jun 2016 23:46:52 +0000 (01:46 +0200)]
agilent-dmm: add support for AC/DC flags in current mode

7 years agoagilent-dmm: fix handling of AC/DC flags in volts mode
Aurelien Jacobs [Sat, 11 Jun 2016 23:41:26 +0000 (01:41 +0200)]
agilent-dmm: fix handling of AC/DC flags in volts mode

7 years agoagilent-dmm: output correct number of digits in analog packets
Aurelien Jacobs [Wed, 22 Jun 2016 22:35:58 +0000 (00:35 +0200)]
agilent-dmm: output correct number of digits in analog packets

7 years agoagilent-dmm: split DIOD recv_conf into model specific functions
Aurelien Jacobs [Wed, 22 Jun 2016 23:11:35 +0000 (01:11 +0200)]
agilent-dmm: split DIOD recv_conf into model specific functions

This reduce overall number of lines and facilitate computation
of significant digits.

7 years agoagilent-dmm: replace divider by exponent to ease computing of significant digits
Aurelien Jacobs [Wed, 22 Jun 2016 22:30:09 +0000 (00:30 +0200)]
agilent-dmm: replace divider by exponent to ease computing of significant digits

7 years agoanalog: add support for negative number of digits
Aurelien Jacobs [Mon, 20 Jun 2016 20:58:12 +0000 (22:58 +0200)]
analog: add support for negative number of digits

When a meter display 105.2 kΩ, libsigrok will return 105200 Ω
but it is really valuable to know that the last 2 digits are not
significant, so encoding.digits should be set to -2.
This would allow a sigrok client to display 105200 as 105.2 k
instead of 105.200 k.

7 years agoLogging: Filter out unwanted newlines
Soeren Apel [Thu, 9 Jun 2016 02:36:35 +0000 (04:36 +0200)]
Logging: Filter out unwanted newlines

055804e89ea0f6b4145040a0eeb2f4e6951692fe changed the outgoing
SCPI message termination by always adding a newline. This results
in the following log output:

sr: [00:00.003102] scpi: Opening VXI device vxi/192.168.178.43.
sr: [00:00.005648] scpi_vxi: Successfully sent SCPI command: '*IDN?
'.
sr: [00:00.005931] scpi: Got response: 'YOKOGAWA,710130,91HC30402,F3.73', length 31.

This patch restores the previous unterminated SCPI message logging:

sr: [00:00.005462] scpi: Opening VXI device vxi/192.168.178.43.
sr: [00:00.007515] scpi_vxi: Successfully sent SCPI command: '*IDN?'.
sr: [00:00.007860] scpi: Got response: 'YOKOGAWA,710130,91HC30402,F3.73', length 31.

As it's located in the general logging mechanism, we deal with any
additional (and unwanted) newlines this way.

7 years agorigol-ds: properly report which channel is enabled.
Aurelien Jacobs [Sat, 25 Jun 2016 19:37:53 +0000 (21:37 +0200)]
rigol-ds: properly report which channel is enabled.