Commit Graph

3906 Commits

Author SHA1 Message Date
EJ 116670b15d Fix #786 by checking for opts in the bindings 2016-04-17 09:30:54 +02:00
Wolfram Sang 1f706c21a2 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 <wsa@the-dreams.de>
2016-04-13 09:35:03 +02:00
Diego F. Asanza 62974b235a Set DSLogic in logic analyzer mode.
It was being initialized in DSO mode.

Signed-off-by: Diego F. Asanza <f.asanza@gmail.com>
2016-04-13 09:35:03 +02:00
Diego Asanza 3f0ff41284 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 <f.asanza@gmail.com>
2016-04-13 09:35:02 +02:00
Soeren Apel 600cc1a8a5 Demo: Use 20Vpp as amplitude instead of 50Vpp 2016-04-06 21:11:37 +02:00
Uwe Hermann f9197887e4 ftdi-la: Move ftdi_la_set_samplerate() to protocol.c. 2016-04-03 17:22:05 +02:00
Uwe Hermann f227338297 Rename 'ft2232h' driver to 'ftdi-la'.
The driver already supports more than just the FT2232H chip.
2016-04-02 18:36:52 +02:00
Uwe Hermann dba986ab0a configure.ac: The ft2232h driver also depends on libusb. 2016-03-30 13:38:55 +02:00
Sergey Alirzaev 4f7fdcdd74 ft2232h: Add support for FTDI FT2232H/FT232R chip as LA.
This closes bug #780.
2016-03-30 13:36:02 +02:00
Alexandru Gagniuc 625430bf88 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.
2016-03-30 12:50:59 +02:00
Alexandru Gagniuc db23af7fc2 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.
2016-03-30 12:50:27 +02:00
Alexandru Gagniuc fadb19ac96 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.
2016-03-30 12:39:25 +02:00
Alexandru Gagniuc 8b0ad3a559 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.
2016-03-30 12:39:20 +02:00
Alexandru Gagniuc daf13c570f 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.
2016-03-30 12:32:55 +02:00
Alexandru Gagniuc 00b2a092c3 hp-3457a: Initial driver skeleton. 2016-03-30 12:32:55 +02:00
Soeren Apel 0586a0ef59 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)
2016-03-28 01:06:29 +02:00
Soeren Apel f476dd2d2b Enable loading of session files without total probes defined 2016-03-28 01:06:29 +02:00
Soeren Apel 9cfc695ffe Enable loading of session files without the unit size defined 2016-03-28 01:06:29 +02:00
Soeren Apel 7c69b528e4 Enable loading of session files without the capture file defined 2016-03-28 01:06:28 +02:00
Soeren Apel e5b280e4c7 analog save: Avoid index duplication between analog & logic channels. 2016-03-24 08:55:42 +01:00
Soeren Apel 1393bccfcb 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[] =
                                  ^
2016-03-22 08:29:25 +01:00
Soeren Apel d9d57ceb28 Bindings: Update create_analog_packet() to the new analog format 2016-03-22 08:25:08 +01:00
Uwe Hermann 74a9c0adc0 output/srzip: Minor whitespace fixes. 2016-03-15 18:40:50 +01:00
Martin Ling 2dc4081540 session_driver: Process analog chunks into analog packets. 2016-03-14 00:34:09 +01:00
Martin Ling 906921bad2 session_driver: Read analog chunks from file. 2016-03-14 00:34:09 +01:00
Martin Ling b317d1bbfb sr_session_load(): Create analog channels from loaded file. 2016-03-14 00:34:09 +01:00
Martin Ling 26918dced0 srzip: Renumber analog channels from zero in output file. 2016-03-14 00:34:09 +01:00
Martin Ling 7163dcbe18 srzip: Save analog data. 2016-03-14 00:34:09 +01:00
Martin Ling eab052996c srzip: Store total number of analog channels. 2016-03-14 00:34:09 +01:00
Martin Ling 828832194f srzip: Count only logic channels in "total probes". 2016-03-14 00:34:09 +01:00
Uwe Hermann 8ccf5ceb17 udev rules file: Add entry for Hantek 6022BE. 2016-03-13 23:33:56 +01:00
Uwe Hermann c940b7a32f hantek-6xxx: libusb_get_device_descriptor() cannot fail. 2016-03-13 23:33:56 +01:00
Chriter f2a66a8ee6 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.
2016-03-13 23:33:56 +01:00
Chriter 6c6bc80a99 hantek-6xxx: Initial driver skeleton. 2016-03-09 19:20:13 +01:00
Uwe Hermann 5af975b587 maynuo-m97: Fix a typo in an error message. 2016-03-05 18:51:39 +01:00
Alexandru Gagniuc 6cc931283d scpi-pps: Add profile for Agilent N5763A 12.5V 120A supply 2016-03-05 18:49:30 +01:00
Uwe Hermann ba4dfbde11 fluke-dmm: Add support for the Fluke 289.
Thanks to Julien Bresciani <julien.bresciani@free.fr> for providing
the information about the required changes!
2016-03-04 17:38:35 +01:00
Wolfram Sang b84f91ff2e 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 <wsa@the-dreams.de>
2016-02-28 18:21:18 +01:00
Uwe Hermann 2217be1dd4 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.
2016-02-11 14:42:50 +01:00
Uwe Hermann 2fe1011f1d Add SR_CONF_UNDER_VOLTAGE_CONDITION* config keys.
Add two new config keys:

 - SR_CONF_UNDER_VOLTAGE_CONDITION

 - SR_CONF_UNDER_VOLTAGE_CONDITION_ACTIVE
2016-02-11 14:42:50 +01:00
Uwe Hermann 8084e0fa81 arachnid-labs-re-load-pro: Only support firmware >= 1.10.
The "on\n" and "off\n" commands require this.
2016-02-11 14:42:50 +01:00
Uwe Hermann 8501448cfe 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.
2016-02-11 14:42:50 +01:00
Uwe Hermann 6e68da5140 arachnid-labs-re-load-pro: Convert to SR_DF_ANALOG. 2016-02-11 14:42:50 +01:00
Uwe Hermann 803db07a1a arachnid-labs-re-load-pro: Add initial driver. 2016-02-08 15:02:29 +01:00
Uwe Hermann 6e8d31d468 arachnid-labs-re-load-pro: Initial driver skeleton. 2016-02-08 15:02:29 +01:00
Aurelien Jacobs 83bf4762e4 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.
2016-02-06 17:24:34 +01:00
Uwe Hermann 29d3876a0b 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.
2016-02-06 15:19:06 +01:00
Uwe Hermann 89c82260b0 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.
2016-01-29 23:23:06 +01:00
Uwe Hermann 18b9bbb39c NEWS: Update for upcoming 0.4.0 release. 2016-01-29 23:23:06 +01:00
Soeren Apel 10c4ca9c5b hameg-hmo/yokogawa-dlm: Fix warning about pointer typecast 2016-01-29 23:13:32 +01:00