]> sigrok.org Git - libsigrok.git/log
libsigrok.git
8 years agohameg-hmo: Add Rohde&Schwarz HMO 1002
Stefan Brüns [Sun, 10 Apr 2016 16:41:47 +0000 (18:41 +0200)]
hameg-hmo: Add Rohde&Schwarz HMO 1002

Hameg is a R&S measurement instruments subsidiary. The HMO 1002 is an
entry level scope, compatible with the SCPI commands of the larger models.

8 years agosanity_check_all_drivers(): Add some code comments.
Uwe Hermann [Sun, 17 Apr 2016 12:50:18 +0000 (14:50 +0200)]
sanity_check_all_drivers(): Add some code comments.

8 years agogmc-mh-1x-2x: Make two functions static.
Uwe Hermann [Sun, 17 Apr 2016 12:24:05 +0000 (14:24 +0200)]
gmc-mh-1x-2x: Make two functions static.

8 years agoscpi-pps: Drop unused function prototype.
Uwe Hermann [Sun, 17 Apr 2016 12:22:37 +0000 (14:22 +0200)]
scpi-pps: Drop unused function prototype.

8 years agoFix #786 by checking for opts in the bindings
EJ [Sun, 17 Apr 2016 07:30:54 +0000 (09:30 +0200)]
Fix #786 by checking for opts in the bindings

8 years agoinput: vcd: skip BOM at beginning of file
Wolfram Sang [Sun, 10 Apr 2016 19:02:52 +0000 (21:02 +0200)]
input: vcd: skip BOM at beginning of file

According to the infos I have, VCD files should be plain ASCII, but we
got report of a version adding a UTF8 BOM at the beginning of the file,
so we need to skip it.

This fixes bug #755.

Signed-off-by: Wolfram Sang <redacted>
8 years agoSet DSLogic in logic analyzer mode.
Diego F. Asanza [Thu, 31 Mar 2016 20:16:12 +0000 (22:16 +0200)]
Set DSLogic in logic analyzer mode.

It was being initialized in DSO mode.

Signed-off-by: Diego F. Asanza <redacted>
8 years agoFix DSLogic FPGA binary image upload and signal acquisition.
Diego Asanza [Wed, 30 Mar 2016 17:04:54 +0000 (19:04 +0200)]
Fix DSLogic FPGA binary image upload and signal acquisition.

For some reason, uploading the FPGA binary into DSLogic in small chunks
does not work. In this commit, the whole binary image is loaded into memory
and transfer is done in one chunk.

Furthermore, the FPGA configuration structure was not initialized
properly. This was changed with the initialization values taken from the
original DSLogic software.

Signed-off-by: Diego Asanza <redacted>
8 years agoDemo: Use 20Vpp as amplitude instead of 50Vpp
Soeren Apel [Wed, 6 Apr 2016 19:10:22 +0000 (21:10 +0200)]
Demo: Use 20Vpp as amplitude instead of 50Vpp

8 years agoftdi-la: Move ftdi_la_set_samplerate() to protocol.c.
Uwe Hermann [Sun, 3 Apr 2016 15:22:05 +0000 (17:22 +0200)]
ftdi-la: Move ftdi_la_set_samplerate() to protocol.c.

8 years agoRename 'ft2232h' driver to 'ftdi-la'.
Uwe Hermann [Sat, 2 Apr 2016 16:36:52 +0000 (18:36 +0200)]
Rename 'ft2232h' driver to 'ftdi-la'.

The driver already supports more than just the FT2232H chip.

8 years agoconfigure.ac: The ft2232h driver also depends on libusb.
Uwe Hermann [Wed, 30 Mar 2016 11:38:55 +0000 (13:38 +0200)]
configure.ac: The ft2232h driver also depends on libusb.

8 years agoft2232h: Add support for FTDI FT2232H/FT232R chip as LA.
Sergey Alirzaev [Thu, 30 Jul 2015 04:27:43 +0000 (07:27 +0300)]
ft2232h: Add support for FTDI FT2232H/FT232R chip as LA.

This closes bug #780.

8 years agohp-3457a: Implement workaround for double-precision data
Alexandru Gagniuc [Wed, 30 Mar 2016 02:21:55 +0000 (19:21 -0700)]
hp-3457a: Implement workaround for double-precision data

Certain output modules do not understand double-precision data.
Although we need double precision to represent the full resolution
of 7.5 digit readings, temporarily convert data to single precision
so that the output modules understand it. While the reasing might be
off by a few counts, we ensure the output modules do not display
completely bogus data.

For details, see bug #779.

8 years agohp-3457a: Implement basic configuration and sampling
Alexandru Gagniuc [Sun, 28 Feb 2016 18:55:18 +0000 (10:55 -0800)]
hp-3457a: Implement basic configuration and sampling

KNOWN ISSUES:
- When sampling with 100 NPLC, the poll function will timeout a few
times before the first sample is acquired. Increasing the timeout
passed to sr_scpi_source_add() will cause all the other commands to
be processed slowly, producing a sampling rate of about one sample
every ten seconds.
- Support for plug-in cards (44491A and 44492A) is not implemented.
- Support for AC, AC+DC and four-wire resistance measurements is not
implemented.
- Support for configuring the frequency measurement source is not
implemented.

8 years agohwdriver: Add configuration key for number of powerline cycles
Alexandru Gagniuc [Sat, 5 Mar 2016 07:25:15 +0000 (23:25 -0800)]
hwdriver: Add configuration key for number of powerline cycles

High precision multimeters have a special setting, called "number of
powerline cycles" (NPLC) which determines the integration time of the
ADC in terms of the power line period. Some devices need their NPLC
adjusted from the default value before they can measure at their full
rated precision.

8 years agoscpi/libgpib: Place device in local mode before closing handle
Alexandru Gagniuc [Sun, 28 Feb 2016 18:32:19 +0000 (10:32 -0800)]
scpi/libgpib: Place device in local mode before closing handle

Devices connected on a real GPIB bus are placed in remote mode when
opening them. libgpib does not automatically place devices back in
local mode when closing the handle. It is thus possible to lock out a
GPIB device by probing it with libsigrok.

This happens on the HP 3457A meter, which does not have a "LOCAL"
command, and must be put back in local mode via GPIB handshake.
ibloc() takes care of this, and it does it on a per-device basis,
such that other devices on the GPIB bus are not affected.

8 years agoscpi/libgpib: Print error string instead of number on errors
Alexandru Gagniuc [Sat, 5 Mar 2016 19:33:56 +0000 (11:33 -0800)]
scpi/libgpib: Print error string instead of number on errors

libgpib has an error_string which formats a numeric error code into a
human-readable description. Use that instead of printing the numeric
code, as it makes debugging easier.

8 years agohp-3457a: Initial driver skeleton.
Alexandru Gagniuc [Sun, 28 Feb 2016 06:05:27 +0000 (22:05 -0800)]
hp-3457a: Initial driver skeleton.

8 years agosrzip: Optimize analog output saving
Soeren Apel [Sun, 27 Mar 2016 21:25:30 +0000 (23:25 +0200)]
srzip: Optimize analog output saving

 - Don't set capturefile if no logic channels are saved
 - Don't set total probes if no logic channels are saved
 - Save analog channels without index gaps (e.g. probe1/probe4)

8 years agoEnable loading of session files without total probes defined
Soeren Apel [Sun, 27 Mar 2016 21:09:05 +0000 (23:09 +0200)]
Enable loading of session files without total probes defined

8 years agoEnable loading of session files without the unit size defined
Soeren Apel [Sun, 27 Mar 2016 20:55:19 +0000 (22:55 +0200)]
Enable loading of session files without the unit size defined

8 years agoEnable loading of session files without the capture file defined
Soeren Apel [Thu, 24 Mar 2016 07:56:14 +0000 (08:56 +0100)]
Enable loading of session files without the capture file defined

8 years agoanalog save: Avoid index duplication between analog & logic channels.
Soeren Apel [Thu, 24 Mar 2016 07:55:42 +0000 (08:55 +0100)]
analog save: Avoid index duplication between analog & logic channels.

8 years agoinput/raw_analog: Prevent "duplicate const decl specifier" warning
Soeren Apel [Tue, 22 Mar 2016 07:29:25 +0000 (08:29 +0100)]
input/raw_analog: Prevent "duplicate const decl specifier" warning

Warnings emitted by gcc before this patch:
src/input/raw_analog.c:51:13: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
        const char const *fmt_name;
                   ^
src/input/raw_analog.c:55:35: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
static const struct sample_format const sample_formats[] =
                                  ^

8 years agoBindings: Update create_analog_packet() to the new analog format
Soeren Apel [Tue, 22 Mar 2016 07:25:08 +0000 (08:25 +0100)]
Bindings: Update create_analog_packet() to the new analog format

8 years agooutput/srzip: Minor whitespace fixes.
Uwe Hermann [Tue, 15 Mar 2016 17:40:50 +0000 (18:40 +0100)]
output/srzip: Minor whitespace fixes.

8 years agosession_driver: Process analog chunks into analog packets.
Martin Ling [Mon, 28 Dec 2015 22:29:25 +0000 (22:29 +0000)]
session_driver: Process analog chunks into analog packets.

8 years agosession_driver: Read analog chunks from file.
Martin Ling [Mon, 28 Dec 2015 21:47:25 +0000 (21:47 +0000)]
session_driver: Read analog chunks from file.

8 years agosr_session_load(): Create analog channels from loaded file.
Martin Ling [Mon, 28 Dec 2015 19:47:54 +0000 (19:47 +0000)]
sr_session_load(): Create analog channels from loaded file.

8 years agosrzip: Renumber analog channels from zero in output file.
Martin Ling [Mon, 28 Dec 2015 21:20:07 +0000 (21:20 +0000)]
srzip: Renumber analog channels from zero in output file.

8 years agosrzip: Save analog data.
Martin Ling [Mon, 28 Dec 2015 19:36:06 +0000 (19:36 +0000)]
srzip: Save analog data.

8 years agosrzip: Store total number of analog channels.
Martin Ling [Mon, 28 Dec 2015 19:04:28 +0000 (19:04 +0000)]
srzip: Store total number of analog channels.

8 years agosrzip: Count only logic channels in "total probes".
Martin Ling [Mon, 28 Dec 2015 19:01:57 +0000 (19:01 +0000)]
srzip: Count only logic channels in "total probes".

8 years agoudev rules file: Add entry for Hantek 6022BE.
Uwe Hermann [Thu, 10 Mar 2016 22:50:24 +0000 (23:50 +0100)]
udev rules file: Add entry for Hantek 6022BE.

8 years agohantek-6xxx: libusb_get_device_descriptor() cannot fail.
Uwe Hermann [Wed, 9 Mar 2016 21:41:58 +0000 (22:41 +0100)]
hantek-6xxx: libusb_get_device_descriptor() cannot fail.

8 years agohantek-6xxx: Initial driver implementation.
Chriter [Wed, 16 Sep 2015 19:18:07 +0000 (22:18 +0300)]
hantek-6xxx: Initial driver implementation.

Note: This commit is based on the initial implementation by
Christer Ekholm (but stashed into one commit), with some adaptations
(forward porting, coding style and consistency fixes) by Uwe Hermann.

8 years agohantek-6xxx: Initial driver skeleton.
Chriter [Wed, 16 Sep 2015 17:41:22 +0000 (20:41 +0300)]
hantek-6xxx: Initial driver skeleton.

8 years agomaynuo-m97: Fix a typo in an error message.
Uwe Hermann [Sat, 5 Mar 2016 17:51:39 +0000 (18:51 +0100)]
maynuo-m97: Fix a typo in an error message.

8 years agoscpi-pps: Add profile for Agilent N5763A 12.5V 120A supply
Alexandru Gagniuc [Sat, 5 Mar 2016 17:16:26 +0000 (09:16 -0800)]
scpi-pps: Add profile for Agilent N5763A 12.5V 120A supply

8 years agofluke-dmm: Add support for the Fluke 289.
Uwe Hermann [Fri, 4 Mar 2016 08:37:16 +0000 (09:37 +0100)]
fluke-dmm: Add support for the Fluke 289.

Thanks to Julien Bresciani <redacted> for providing
the information about the required changes!

8 years agosession: allocate correct amount of memory in sr_packet_copy
Wolfram Sang [Sun, 21 Feb 2016 09:06:10 +0000 (10:06 +0100)]
session: allocate correct amount of memory in sr_packet_copy

We want the size of the struct, not of a pointer to the struct. And to
be absolutely future proof, dereference the pointer we are assigning the
memory to (not the one we are copying the data from). Found by Coverity,
CID 50858.

Signed-off-by: Wolfram Sang <redacted>
8 years agoarachnid-labs-re-load-pro: Handle undervoltage condition.
Uwe Hermann [Tue, 9 Feb 2016 00:09:39 +0000 (01:09 +0100)]
arachnid-labs-re-load-pro: Handle undervoltage condition.

Support the SR_CONF_UNDER_VOLTAGE_CONDITION* keys.

Undervoltage (and overtemperature) conditions now emit a
warning-level message as well.

8 years agoAdd SR_CONF_UNDER_VOLTAGE_CONDITION* config keys.
Uwe Hermann [Tue, 9 Feb 2016 00:28:38 +0000 (01:28 +0100)]
Add SR_CONF_UNDER_VOLTAGE_CONDITION* config keys.

Add two new config keys:

 - SR_CONF_UNDER_VOLTAGE_CONDITION

 - SR_CONF_UNDER_VOLTAGE_CONDITION_ACTIVE

8 years agoarachnid-labs-re-load-pro: Only support firmware >= 1.10.
Uwe Hermann [Mon, 8 Feb 2016 20:03:40 +0000 (21:03 +0100)]
arachnid-labs-re-load-pro: Only support firmware >= 1.10.

The "on\n" and "off\n" commands require this.

8 years agoarachnid-labs-re-load-pro: Add support for setting SR_CONF_ENABLED.
Uwe Hermann [Mon, 8 Feb 2016 07:52:23 +0000 (08:52 +0100)]
arachnid-labs-re-load-pro: Add support for setting SR_CONF_ENABLED.

The firmware has "on\n" and "off\n" commands since 1.10, so use them.

Apparently you can only set the state (on/off) of the load, but it's
not possible to query the current state.

8 years agoarachnid-labs-re-load-pro: Convert to SR_DF_ANALOG.
Uwe Hermann [Mon, 8 Feb 2016 07:24:48 +0000 (08:24 +0100)]
arachnid-labs-re-load-pro: Convert to SR_DF_ANALOG.

8 years agoarachnid-labs-re-load-pro: Add initial driver.
Uwe Hermann [Wed, 30 Dec 2015 17:44:40 +0000 (18:44 +0100)]
arachnid-labs-re-load-pro: Add initial driver.

8 years agoarachnid-labs-re-load-pro: Initial driver skeleton.
Uwe Hermann [Tue, 29 Dec 2015 00:58:05 +0000 (01:58 +0100)]
arachnid-labs-re-load-pro: Initial driver skeleton.

8 years agobeaglelogic: use standard # operator instead of ugly __STRING macro
Aurelien Jacobs [Mon, 1 Feb 2016 21:37:36 +0000 (22:37 +0100)]
beaglelogic: use standard # operator instead of ugly __STRING macro

Also note that the __ namespace is reserved by POSIX for its private
usage, so user land software should never rely on any kind of API
with a __ prefix.

8 years agoconfigure.ac: Bump package version to 0.5.0.
Uwe Hermann [Sat, 6 Feb 2016 14:19:06 +0000 (15:19 +0100)]
configure.ac: Bump package version to 0.5.0.

0.5.0 will be the next major, API-changing release. Bump now, so that
there is no confusion of tarball 0.4.0 and 0.5.0-git snapshots.

8 years agoBump libtool version (not package version) to 3:0:0.
Uwe Hermann [Fri, 29 Jan 2016 21:57:48 +0000 (22:57 +0100)]
Bump libtool version (not package version) to 3:0:0.

The last release (0.3.0) had the libtool version (current:revision:age)
set to 2:0:0. Since this release adds, removes, and changes interfaces,
the new version is 3:0:0.

http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info

This changes the library filename (e.g. on Linux) from libsigrok.so.2.0.0
to libsigrok.so.3.0.0, the SONAME (+symlink) becomes libsigrok.so.3.

8 years agoNEWS: Update for upcoming 0.4.0 release.
Uwe Hermann [Sun, 16 Aug 2015 22:48:13 +0000 (00:48 +0200)]
NEWS: Update for upcoming 0.4.0 release.

8 years agohameg-hmo/yokogawa-dlm: Fix warning about pointer typecast
Soeren Apel [Fri, 29 Jan 2016 22:13:32 +0000 (23:13 +0100)]
hameg-hmo/yokogawa-dlm: Fix warning about pointer typecast

8 years agoSCPI: Do not use RL1 lockout for Yokogawa devices
Soeren Apel [Fri, 29 Jan 2016 20:59:06 +0000 (21:59 +0100)]
SCPI: Do not use RL1 lockout for Yokogawa devices

8 years agoyokogawa-dlm: Fix array_float_get()
Soeren Apel [Fri, 29 Jan 2016 20:39:20 +0000 (21:39 +0100)]
yokogawa-dlm: Fix array_float_get()

8 years agohameg-hmo: Fix array_float_get() and also use it for the time base
Soeren Apel [Fri, 29 Jan 2016 20:35:16 +0000 (21:35 +0100)]
hameg-hmo: Fix array_float_get() and also use it for the time base

8 years agohameg-hmo: Add missing 20/50V vdiv entries
Soeren Apel [Fri, 29 Jan 2016 20:13:07 +0000 (21:13 +0100)]
hameg-hmo: Add missing 20/50V vdiv entries

8 years agohameg-hmo: Add more supported scope models
Soeren Apel [Fri, 29 Jan 2016 20:08:49 +0000 (21:08 +0100)]
hameg-hmo: Add more supported scope models

8 years agoREADME: Bump bindings requirements to the upcoming 0.4.0 release.
Uwe Hermann [Fri, 29 Jan 2016 17:31:00 +0000 (18:31 +0100)]
README: Bump bindings requirements to the upcoming 0.4.0 release.

8 years agoREADME: Mention the missing libieee1284 requirement.
Uwe Hermann [Fri, 29 Jan 2016 17:30:32 +0000 (18:30 +0100)]
README: Mention the missing libieee1284 requirement.

8 years agohung-chang-dso-2100: Fix session source fd
Lars-Peter Clausen [Sat, 23 Jan 2016 13:21:15 +0000 (14:21 +0100)]
hung-chang-dso-2100: Fix session source fd

For session sources without a file descriptor to poll a negative number
should be passed for the fd parameter. The hung-chang-dso-2100 driver
currently passes 0 instead, which is the stdin stream. Fix the issue by
passing -1 for the fd parameter.

Signed-off-by: Lars-Peter Clausen <redacted>
8 years agoUse libusb_error_name() more often for better diagnostics.
Uwe Hermann [Fri, 29 Jan 2016 17:00:11 +0000 (18:00 +0100)]
Use libusb_error_name() more often for better diagnostics.

8 years agodemo: fix infinite loop with 0 channels of one type
Aurelien Jacobs [Thu, 28 Jan 2016 22:17:50 +0000 (23:17 +0100)]
demo: fix infinite loop with 0 channels of one type

The following command line exhibits the inifinit loop:
  sigrok-cli -d demo:analog_channels=0 --samples=8

8 years agoconfigure: replace buggy AX_RUBY_EXT by a proper implementation
Aurelien Jacobs [Thu, 28 Jan 2016 21:48:44 +0000 (22:48 +0100)]
configure: replace buggy AX_RUBY_EXT by a proper implementation

This actually allows to get the proper DLEXT expected by Ruby on
the target system.

8 years agoconfigure: check for swig version >= 3.0.8 for Ruby bindings
Aurelien Jacobs [Thu, 28 Jan 2016 21:45:28 +0000 (22:45 +0100)]
configure: check for swig version >= 3.0.8 for Ruby bindings

8 years agoinput: vcd: by default do not limit number of channels
Wolfram Sang [Sun, 10 Jan 2016 11:10:10 +0000 (12:10 +0100)]
input: vcd: by default do not limit number of channels

Accept (and set to default) 0 for numchannels which means 'unlimited'.
I think it is convenient to read all channels of a vcd file by default.

Signed-off-by: Wolfram Sang <redacted>
8 years agoinput: vcd: register channels when parsing header not when initializing
Wolfram Sang [Sun, 10 Jan 2016 11:08:54 +0000 (12:08 +0100)]
input: vcd: register channels when parsing header not when initializing

Benefits:

* only channels really used in vcd will be added
* we can give them the proper name found in the vcd file
* less code :)

Signed-off-by: Wolfram Sang <redacted>
8 years agoinput: vcd: support 1 bit vectors
Wolfram Sang [Sat, 9 Jan 2016 22:17:02 +0000 (23:17 +0100)]
input: vcd: support 1 bit vectors

Use the new process_bit() function to parse 1 bit vectors, too.

This is the first step to fix bug #723. Minimal testcase vcd:

$timescale 1 ns $end
$var wire 1 n0 addr_0 $end
$var wire 1 n1 addr_1 $end
$enddefinitions $end
#0
0n0
b1 n1
#1
1n0
b0 n1
#2
0n0
b1 n1
#3
1n0
b0 n1

Signed-off-by: Wolfram Sang <redacted>
8 years agoinput: vcd: refactor parsing a bit
Wolfram Sang [Sat, 9 Jan 2016 22:05:58 +0000 (23:05 +0100)]
input: vcd: refactor parsing a bit

Move to a separate function which we want to reuse later.

Signed-off-by: Wolfram Sang <redacted>
8 years agoinput: vcd: avoid needless copying
Wolfram Sang [Sat, 9 Jan 2016 07:17:57 +0000 (08:17 +0100)]
input: vcd: avoid needless copying

Current code moves the identifier string one byte to the front to
overwrite the bit value, so 'tokens[i]' is a string to compare against
the desired value. This copying is unnecessary, just pass a properly
setup pointer.

Signed-off-by: Wolfram Sang <redacted>
8 years agoinput: vcd: try to continue when a vector was found
Wolfram Sang [Sat, 9 Jan 2016 17:27:14 +0000 (18:27 +0100)]
input: vcd: try to continue when a vector was found

No need to bail out on vectors. As long as there are tokens left, we can
try to parse the rest. Also, print a message so the user knows what's
going on. Here is a testcase vcd:

$timescale 1 ns $end
$var wire 1 n0 addr_0 $end
$var wire 1 n1 addr_1 $end
$enddefinitions $end
#0
0n0
b1 n1
#1
1n0
b0 n1
#2
0n0
b1 n1

Signed-off-by: Wolfram Sang <redacted>
8 years agoinput: vcd: properly bail out on missing identifiers
Wolfram Sang [Sat, 9 Jan 2016 16:40:10 +0000 (17:40 +0100)]
input: vcd: properly bail out on missing identifiers

If we hit the missing identifier case, then we reached the end of the
token list. So, we should break out of the loop, and not continue.
Otherwise we will go past the end of the array as this minimal testcase
shows:

$timescale 1 ns $end
$var wire 1 n0 addr_0 $end
$enddefinitions $end
1

gives:

$ ./sigrok-cli -I vcd -i no_mod.vcd -O vcd -o /tmp/o.vcd
Segmentation fault

Signed-off-by: Wolfram Sang <redacted>
8 years agoinput: vcd: allow optional index item
Wolfram Sang [Wed, 30 Dec 2015 21:04:38 +0000 (22:04 +0100)]
input: vcd: allow optional index item

A $var block can have an optional index item which looks like '[<sth>]'.
Parse it, too, and append it to the channel name.

This fixes bug #322. A first version was posted by Simon Richter. This
version is rebased and simplified.

Signed-off-by: Wolfram Sang <redacted>
8 years agohameg-hmo: Fix some compiler warnings.
Uwe Hermann [Thu, 28 Jan 2016 17:46:55 +0000 (18:46 +0100)]
hameg-hmo: Fix some compiler warnings.

8 years agohameg-hmo: Replace floating point comparison for vdiv
Soeren Apel [Fri, 8 Jan 2016 22:02:20 +0000 (23:02 +0100)]
hameg-hmo: Replace floating point comparison for vdiv

This should fix bug #731.

8 years agoTrace32 import module: Send trigger only once
Soeren Apel [Fri, 8 Jan 2016 22:00:55 +0000 (23:00 +0100)]
Trace32 import module: Send trigger only once

As we're downsampling, several record time stamps can match the specified
trigger time. For this reason, it's possible that several trigger packets
are sent when a file is loaded. This prevents the issue and sends a
trigger packet only on the first matching record.

8 years agoImplement Ruby bindings on top of SWIG/C++ bindings.
Aurelien Jacobs [Mon, 11 Jan 2016 13:31:47 +0000 (14:31 +0100)]
Implement Ruby bindings on top of SWIG/C++ bindings.

8 years agoMakefile: use PYSIGROK_FLAGS only for building python bindings
Aurelien Jacobs [Mon, 11 Jan 2016 13:32:22 +0000 (14:32 +0100)]
Makefile: use PYSIGROK_FLAGS only for building python bindings

8 years agoUse ALL_ZERO in a few more places.
Uwe Hermann [Thu, 7 Jan 2016 22:46:36 +0000 (23:46 +0100)]
Use ALL_ZERO in a few more places.

8 years agolecroy-logicstudio: Fix some compiler warnings on MinGW.
Uwe Hermann [Thu, 7 Jan 2016 22:22:42 +0000 (23:22 +0100)]
lecroy-logicstudio: Fix some compiler warnings on MinGW.

src/hardware/lecroy-logicstudio/protocol.c: In function 'handle_fetch_samples_done':
src/hardware/lecroy-logicstudio/protocol.c:261:3: warning: passing argument 6 of 'libusb_fill_bulk_transfer' from incompatible pointer type
   recv_bulk_transfer, (void *)sdi, USB_TIMEOUT_MS);
   ^
In file included from ./src/libsigrok-internal.h:31:0,
                 from src/hardware/lecroy-logicstudio/protocol.h:26,
                 from src/hardware/lecroy-logicstudio/protocol.c:23:
/home/uwe/sr_mingw/include/libusb-1.0/libusb.h:1546:20: note: expected 'libusb_transfer_cb_fn' but argument is of type 'void (*)(struct libusb_transfer *)'
 static inline void libusb_fill_bulk_transfer(struct libusb_transfer *transfer,
                    ^
src/hardware/lecroy-logicstudio/protocol.c: In function 'fetch_samples_async':
src/hardware/lecroy-logicstudio/protocol.c:314:4: warning: passing argument 6 of 'write_registers_async' from incompatible pointer type
    handle_fetch_samples_done);
    ^
src/hardware/lecroy-logicstudio/protocol.c:200:12: note: expected 'libusb_transfer_cb_fn' but argument is of type 'void (*)(struct libusb_transfer *)'
 static int write_registers_async(const struct sr_dev_inst *sdi,
            ^
src/hardware/lecroy-logicstudio/protocol.c: In function 'lls_start_acquisition':
src/hardware/lecroy-logicstudio/protocol.c:1122:3: warning: passing argument 6 of 'libusb_fill_interrupt_transfer' from incompatible pointer type
   recv_intr_transfer, (void *) sdi, USB_TIMEOUT_MS);
   ^
In file included from ./src/libsigrok-internal.h:31:0,
                 from src/hardware/lecroy-logicstudio/protocol.h:26,
                 from src/hardware/lecroy-logicstudio/protocol.c:23:
/home/uwe/sr_mingw/include/libusb-1.0/libusb.h:1602:20: note: expected 'libusb_transfer_cb_fn' but argument is of type 'void (*)(struct libusb_transfer *)'
 static inline void libusb_fill_interrupt_transfer(
                    ^

8 years agosysclk-lwla: Minor whitespace and consistency fixes.
Uwe Hermann [Wed, 23 Dec 2015 14:25:18 +0000 (15:25 +0100)]
sysclk-lwla: Minor whitespace and consistency fixes.

8 years agoMinor whitespace and cosmetic fixes.
Uwe Hermann [Tue, 22 Dec 2015 18:36:19 +0000 (19:36 +0100)]
Minor whitespace and cosmetic fixes.

8 years agodmm: vc870: drop unused variable
Wolfram Sang [Sun, 3 Jan 2016 21:27:45 +0000 (22:27 +0100)]
dmm: vc870: drop unused variable

There is no status bit for RMS. We know about RMS if certain modes are
active. So, drop this superfluous variable.

Signed-off-by: Wolfram Sang <redacted>
8 years agodmm: vc870: support effective voltage & current
Wolfram Sang [Sun, 3 Jan 2016 21:27:44 +0000 (22:27 +0100)]
dmm: vc870: support effective voltage & current

And rename the status variable because in sigrok the term RMS is used
instead of "effective value".

Signed-off-by: Wolfram Sang <redacted>
8 years agodmm: vc870: render POWER_FACTOR as such and not as frequency
Wolfram Sang [Sun, 3 Jan 2016 21:27:43 +0000 (22:27 +0100)]
dmm: vc870: render POWER_FACTOR as such and not as frequency

The primary display is the power factor, the secondary is the frequency.
This got mixed up, so change the order. We also need to fix the
conversion factor.

Signed-off-by: Wolfram Sang <redacted>
8 years agodmm: vc870: keep the order when processing modes
Wolfram Sang [Sun, 3 Jan 2016 21:27:42 +0000 (22:27 +0100)]
dmm: vc870: keep the order when processing modes

is_power_apparent_power is index 0 of function 0x39, so it is better to
process it first and the later indices after that (we need to add
another one with a different patch later).

Signed-off-by: Wolfram Sang <redacted>
8 years agodmm: vc870: fix AC conversion factors
Wolfram Sang [Sun, 3 Jan 2016 21:27:41 +0000 (22:27 +0100)]
dmm: vc870: fix AC conversion factors

Testing showed that AC current needs to be handled different from DC.
Note that ACA is still untested because of limited testing equipment.

Signed-off-by: Wolfram Sang <redacted>
8 years agodmm: vc870: show display value properly in debug output
Wolfram Sang [Sun, 3 Jan 2016 21:27:40 +0000 (22:27 +0100)]
dmm: vc870: show display value properly in debug output

It was confusing to see the display value (5 digits) printed in debug
output as a float. Print it the same way as shown on the real device,
without comma, of course.
This also allows to simplify the code a little.

Signed-off-by: Wolfram Sang <redacted>
8 years agoresource: Replace ssize_t with gssize to avoid unistd.h
Daniel Elstner [Mon, 4 Jan 2016 17:53:30 +0000 (18:53 +0100)]
resource: Replace ssize_t with gssize to avoid unistd.h

8 years agopython: Provide sensible __str__ and __repr__ functions for enum values.
Martin Ling [Sun, 3 Jan 2016 22:22:57 +0000 (22:22 +0000)]
python: Provide sensible __str__ and __repr__ functions for enum values.

This fixes bug #668.

8 years agoproto.h: Add missing unistd.h #include.
Uwe Hermann [Sun, 3 Jan 2016 02:00:45 +0000 (03:00 +0100)]
proto.h: Add missing unistd.h #include.

The ssize_t and size_t usage requires the unistd.h #include.

Thanks to Daniel Glöckner for the bug report.

This fixes bug #721.

8 years agobaylibre-acme: Replace g_close() with close() for now.
Uwe Hermann [Sun, 3 Jan 2016 01:51:01 +0000 (02:51 +0100)]
baylibre-acme: Replace g_close() with close() for now.

This g_close(), the only one in the whole code-base, would unnecessarily
raise the minimum glib version to 2.36.

Thanks to Daniel Glöckner for the report.

This fixes bug #724.

8 years agoC++: Avoid std::map::emplace() for GCC 4.7 compatibility
Daniel Elstner [Wed, 30 Dec 2015 17:39:48 +0000 (18:39 +0100)]
C++: Avoid std::map::emplace() for GCC 4.7 compatibility

This fixes bug #720.

8 years agosrc/backend.c: Add missing winsock2.h #include.
Uwe Hermann [Sat, 2 Jan 2016 23:39:44 +0000 (00:39 +0100)]
src/backend.c: Add missing winsock2.h #include.

8 years agowin32: Call WSAStartup() at sr_init() time.
Martin Ling [Tue, 29 Dec 2015 23:49:15 +0000 (23:49 +0000)]
win32: Call WSAStartup() at sr_init() time.

Should fix bug #692.

8 years agoRename sr_driver_scan_options() to sr_driver_scan_options_list().
Uwe Hermann [Thu, 31 Dec 2015 17:47:55 +0000 (18:47 +0100)]
Rename sr_driver_scan_options() to sr_driver_scan_options_list().

8 years agoRename sr_dev_config_capabilities() to sr_dev_config_capabilities_list().
Uwe Hermann [Thu, 31 Dec 2015 17:45:17 +0000 (18:45 +0100)]
Rename sr_dev_config_capabilities() to sr_dev_config_capabilities_list().

8 years agoRestore number "categories" in sr_configkey.
Uwe Hermann [Thu, 31 Dec 2015 17:43:18 +0000 (18:43 +0100)]
Restore number "categories" in sr_configkey.

8 years agoMake SR_CONF_MASK an internal constant.
Martin Ling [Tue, 3 Nov 2015 01:59:42 +0000 (01:59 +0000)]
Make SR_CONF_MASK an internal constant.