Commit Graph

4933 Commits

Author SHA1 Message Date
Gerhard Sittig 9e11197246 uni-t-ut32x: use common code for sw limits, minor data type fixup (data source) 2019-01-13 19:34:10 +01:00
Gerhard Sittig bf700f679a uni-t-ut32x: pre-set to default conn= spec
The previous implementation of the UT32x driver expected to see a conn=
spec, without it no device is found. Default to the USB identification
of the CH9325 chip, to make the driver work out of the box. Users still
can provide conn= specs and override the default for other cables.
2019-01-13 19:34:10 +01:00
Gerhard Sittig de805ae50d doc: update README.devices (USB detection, enable serial comm)
Slightly rephrase README.devices since there is no strict distinction
into "fully automatic" and "always manual". Some drivers _accept_ conn=
specs when provided, _and_ support automatic detection of enumerable
devices, _and_ might implement defaults but also support overrides.

Nit, numerically sort the list of Uni-T cables (which is about to grow
in the future) for improved readability.

Add two more devices which require users to manually enable the serial
communication (Brymen BM257s, EEVBlog 121GW).
2019-01-13 19:34:10 +01:00
Martin Ling ea7a83a437 bindings: Add Output::format() 2018-12-30 14:10:13 +01:00
Martin Ling 47b821dc7d rigol-ds: Fix memory buffer readout on DS4000 series. 2018-12-29 03:24:23 +01:00
majekw e150d55046 Add support for YiXingDianZi MDSO in hantek-6xxx driver. 2018-12-28 13:49:33 +01:00
Mike Williams c3bfb95959 scpi-pps: add support for BK Precision 9130 2018-12-28 13:10:05 +01:00
Mike Williams 08e8c0e5bf scpi-dmm: add experimental Keysight 34465A support
Tested DC current, DC voltage, and resistance. Instrument gives an error
only on first measurement but the output of the measurements is correct.
2018-12-28 13:10:05 +01:00
Uwe Hermann 0bad836f95 contrib/60-libsigrok.rules: Mention FT232H/ftdi-la item. 2018-12-28 13:01:45 +01:00
Paul c7a51272a5 ftdi-la: added FT232H device ID 2018-12-28 13:01:03 +01:00
Martin Ling a9ed2eb069 bindings: Add new Context::create_end_packet() method. 2018-12-28 12:47:59 +01:00
Martin Ling 62bd644f55 python: Add override for Context.create_logic_packet() 2018-12-28 12:47:59 +01:00
Gerhard Sittig 6f7e15090e dmm/eev121gw: fix a typo in a comment 2018-12-27 11:26:19 +01:00
Gerhard Sittig fbbf21dcf5 pickit2: avoid NULL dereference in close code path 2018-12-27 11:26:19 +01:00
Daniel Anselmi f3549a1ccf ipdbg-la: Check if limit samples is valid (leq size of ringuffer) 2018-12-27 11:26:02 +01:00
Martin Ling 942719b46c Don't reference SR_PACKAGE_VERSION_STRING directly in backend.c.
Reporting build versus runtime versions makes sense for a client,
but not inside the library itself.
2018-12-20 19:12:34 +01:00
Martin Ling 2868bca35b Don't reference SR_PACKAGE_VERSION_STRING directly in output modules. 2018-12-20 19:12:34 +01:00
Uwe Hermann 3f34a40268 drivers: Make per-driver sr_dev_driver structs static. 2018-12-20 17:29:36 +01:00
Uwe Hermann 3aadf5c479 microchip-pickit2: Drop unneeded prefix. 2018-12-20 16:36:09 +01:00
Uwe Hermann e760f2cdaf microchip-pickit2: Minor cosmetics. 2018-12-20 16:36:09 +01:00
Gerhard Sittig bde6a99b33 microchip-pickit2: first driver implementation (acquisition works, triggers don't)
Fill in the scan, open/close, get/set/list, acquisition start/stop logic
such that data acquisition with a PICkit2 works.

Trigger support needs more attention. User specified triggers either
seem to not take effect, or the trigger position is not in the expected
location. It's yet to get determined what's the issue.

This implementation is based on protocol information gathered from the
pk2-la project.
2018-12-20 16:19:42 +01:00
Gerhard Sittig a5c0259c4a microchip-pickit2: Initial driver skeleton. 2018-12-20 16:19:42 +01:00
Gerhard Sittig d9a3c0b749 brymen-bm86x: drop redundant free call, fixup channel index
Remove a free() call in an error path for a list which immediately
before the call was determined to be NULL. Use index 0 and 1 for
channels P1 and P2 respectively (the previous implementation used 0
for both channels).
2018-12-20 16:19:42 +01:00
Gerhard Sittig 2887799404 scpi-dmm: run OPC queries immediately before essential commands
The current implementation of the SCPI DMM driver is conservative about
checking the device's being operational, but the *OPC? queries are found
in unfortunate locations. Run the OPC query right before running the
next "actual" command, not afterwards. And certainly not between sending
requests and potentially gathering responses in subsequent calls.

This commit does not change current behaviour, but improves maintenance
before pending commits.
2018-11-17 20:19:13 +01:00
Gerhard Sittig 08f3b427b6 scpi-dmm: return MQ table entry to "get MQ" routine callers
The "get MQ" helper routine communicates SCPI responses and translates
them to internal "MQ and flag" values. Optionally return the MQ table
entry reference to callers, so they don't have to repeat the table
lookup when the function's default precision is required, or should
future "start acquisition" requests need to refer to the meter's current
function.
2018-11-17 20:19:13 +01:00
Gerhard Sittig 64d03de1c2 scpi-dmm: adjust MQ table for Agilent 34405A
Rename the table to reflect that it's model specific. Remove the 4-wire
resistance function which this device does not support.
2018-11-17 20:17:48 +01:00
Gerhard Sittig 1d2f9963ab scpi-dmm: add support for model specific device options
Supported SCPI DMM devices will differ in the set of options and whether
parameters can get queried or configured. Use a "generic" set of devopts
during scan and for simpler models, prepare support for other sets of
devopts for more complex models.
2018-11-17 20:08:59 +01:00
Gerhard Sittig 31e65c62ec scpi-dmm: accept serialcomm= scan options 2018-11-17 20:08:59 +01:00
Gerhard Sittig 21bc4353f0 scpi: alpha-sort the vendor alias list 2018-11-17 20:07:21 +01:00
Gerhard Sittig 49b6732ec5 scpi: add Keysight vendor alias 2018-11-17 20:07:21 +01:00
Gerhard Sittig 0617bb5a4e scpi-dmm: move declaration of local variable out of header file 2018-11-17 20:07:21 +01:00
Michał Janiszewski 3e33089b72 Remove always-false condition 2018-11-10 23:20:29 +01:00
Sven Bursch-Osewold 4905215909 Python-Binding: Added data array for logic packet payload 2018-11-10 23:20:16 +01:00
Gerhard Sittig 3cdad416e4 scpi-dmm: Implement support for Agilent 34405A, prepare others
Implement the scpi-dmm driver in such a generic way that it could work
with several protocol variants and with differing models which happen to
use any of these protocol variants. Prepare a list of supported models
with their respective SCPI command set, set of DMM functions and their
precision.

Add support for Agilent 34405A. The ten functions of this device got
tested and are operational, in continuous mode as well as with sample
count or capture time limits. The driver can query the current meter's
function, can change the function, and can run acquisitions in either
the current mode or with a user specified function selection. There is
some potential for improvement: AUTO/MIN/MAX/HOLD indicators are not
supported by this implementation.
2018-11-10 23:14:49 +01:00
Gerhard Sittig 7a396ff5c5 scpi-dmm: Initial driver skeleton. 2018-11-10 20:11:35 +01:00
Gerhard Sittig a1ce15d4a1 scpi: nit, use glib to determine string vector length
Replace a DIY length calculation with a glib call.
2018-11-10 20:11:35 +01:00
Gerhard Sittig a019bc48fd scpi: introduce string un-quote helper routine
The SCPI protocol may communicate strings in quoted form, enclosed by a
matching pair of single or double quote characters, and occurances of
this very quote character within the string get doubled (escaped). Add a
common routine to undo the quotes.
2018-11-10 18:26:30 +01:00
Gerhard Sittig c10b0276da fluke-45: fix minor memory leaks in the probe routine
Free the SCPI hardware info after successful model detection, too. Only
allocate the device instance when a supported model was found. Link the
device context earlier right after allocation, for easier verification.
2018-11-10 18:26:30 +01:00
Gerhard Sittig 71db2d4d06 fluke-45: disable ECHO test, it confuses other SCPI devices
Disable the ECHO test in the Fluke 45 probe routine which violates the
SCPI protocol and makes other devices unavailable. This fixes bug #1272.
2018-11-10 18:26:30 +01:00
Gerhard Sittig 712f7d5e40 fluke-45: avoid NULL dereference in the probe routine
The Fluke 45 probe routine tries to detect whether the serial port is
"in echo mode" (which already is questionable before the IDN query).
In the absence of a response, the library segfaults. Fix it.
2018-11-10 18:26:30 +01:00
Gerhard Sittig 88c03eae85 README.devices: add example for -d driver:conn=usbtmc/bus.addr 2018-11-10 18:26:30 +01:00
Jon Burgess 3940abcb47 Free list returned by sr_session_dev_list()
==214948== 16 bytes in 1 blocks are definitely lost in loss record 161 of 6,440
==214948==    at 0x4C2EE0B: malloc (vg_replace_malloc.c:299)
==214948==    by 0x650F435: g_malloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==214948==    by 0x6527056: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==214948==    by 0x65284B0: g_slist_copy_deep (in /usr/lib64/libglib-2.0.so.0.5600.3)
==214948==    by 0x592BBA6: sr_session_dev_list (session.c:402)
==214948==    by 0x56EF7B5: sigrok::Session::Session(std::shared_ptr<sigrok::Context>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) (classes.cpp:932)

==214948== 16 bytes in 1 blocks are definitely lost in loss record 162 of 6,440
==214948==    at 0x4C2EE0B: malloc (vg_replace_malloc.c:299)
==214948==    by 0x650F435: g_malloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==214948==    by 0x6527056: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==214948==    by 0x65284B0: g_slist_copy_deep (in /usr/lib64/libglib-2.0.so.0.5600.3)
==214948==    by 0x592BBA6: sr_session_dev_list (session.c:402)
==214948==    by 0x56F1EB1: sigrok::Session::devices() (classes.cpp:967)
2018-10-22 00:02:40 +02:00
Uwe Hermann 827139ef49 siglent-sds: Consistently use gboolean/TRUE/FALSE. 2018-10-21 23:33:15 +02:00
Guido Trentalancia fa3d104f17 Additional USB PID for Rohde&Schwarz HMO series mixed-signal oscilloscopes
Add another possible USB PID for Rohde&Schwarz HMO series mixed-signal
oscilloscopes (previously branded Hameg).
2018-10-21 23:32:07 +02:00
Gerhard Sittig 0be955d23d dmm/eev121gw: drop an obsolete TODO comment (power measurement) 2018-10-18 19:18:46 +02:00
Gerhard Sittig 72b6f1c082 dmm/eev121gw: cosmetics, align ranges' scaling table entries
Align the scaling items such that all numbers are aligned. Drop unneeded
"prefixes" for the 2nd display's tables, the main and sub displays already
have their individual tables which reside in their respective groups.
2018-10-18 19:11:38 +02:00
Gerhard Sittig 39ea7b7d39 dmm/eev121gw: add missing scale items for sub display in power modes
Complete the voltage and current scale items for the sub display which
were incomplete for VA, mVA, and uVA power measurement modes before.
2018-10-18 19:08:50 +02:00
Uwe Hermann 59cae77e28 serial_stream_detect(): Make a code comment more generic. 2018-10-14 22:05:57 +02:00
Soeren Apel d10781808d demo: Fixup soft-trigger 2018-10-14 22:05:57 +02:00
luftek 6fc51fb1ee demo: Implement logic triggering.
Analog triggers and other items still need more work.
2018-10-14 21:37:40 +02:00