Commit Graph

3628 Commits

Author SHA1 Message Date
Tilman Sauerbeck 17b93fd7c0 Add the RB64 macro.
Reads an unsigned 64 bit integer from memory.
2015-12-04 01:04:33 +01:00
Marcus Comstedt 8eb4299c5b bindings: Fix doc extraction for enums
The source file enum.hpp was not found when not building in the source
tree.  Also, extraction of the brief description did not work correctly
when there was additional XML markup inside the <para> element.
2015-12-03 22:01:21 +01:00
Hannu Vuolasaho 8abdf0066e korad-kaxxxxp: Workaround for Korad device bug
The sixth character from ISET? is read and discarded. If the device is
turned off and on again, this won't be there and causes 10 ms delay in
every ISET? Luckily, this value isn't queried that often. To get the
sixth byte, the *IDN? command has to be issued before ISET?.
2015-12-01 10:46:51 +01:00
Hannu Vuolasaho bcf9384d3d korad-kaxxxxp: Fix typo in Korad driver device enum 2015-12-01 10:46:40 +01:00
Stefan Brüns 17124cf9ad output/wav: use the right buffer for SR_DF_ANALOG 2015-11-29 02:30:38 +01:00
Stefan Brüns 8b5aefc681 input/wav: fix and simplify conversion of integer samples
Size of individual samples is specified by unitsize, not samplesize.
The sample immediate is not necessary.
2015-11-29 02:30:37 +01:00
Stefan Brüns b944e336d6 input/wav: increase search range for data chunk, report errors 2015-11-29 02:30:37 +01:00
Stefan Brüns 288f8ce23c input/wav: fix error in offset calculation 2015-11-29 02:30:37 +01:00
Stefan Brüns c7224164a0 output/wav: track and free memory for float conversion buffer 2015-11-29 01:14:54 +01:00
Stefan Brüns c01378c95f input: fix leak of config data in several input modules 2015-11-29 01:13:58 +01:00
Stefan Brüns da3d141f04 output: fix options memory leak 2015-11-29 01:13:58 +01:00
Stefan Brüns 2dbe445d55 output/analog: track and free memory for float conversion buffer
==18779== 800,000 bytes in 196 blocks are definitely lost in loss record 29 of 29
==18779==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18779==    by 0x4E635C3: receive (analog.c:319)
==18779==    by 0x40870B: datafeed_in (session.c:316)
==18779==    by 0x4E59D4E: sr_session_send (session.c:1201)
==18779==    by 0x4E59F8B: sr_session_send (session.c:1159)
==18779==    by 0x4E62595: send_chunk (wav.c:234)
==18779==    by 0x4E62A06: process_buffer (wav.c:290)
==18779==    by 0x40954A: load_input_file_module (input.c:123)
==18779==    by 0x4097AB: load_input_file (input.c:157)
==18779==    by 0x40531E: main (main.c:288)
2015-11-29 01:13:58 +01:00
Stefan Brüns 877a6d09d5 session: free memory for datafeed callbacks, reported by valgrind
==17549== 32 (16 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 22 of 39
==17549==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==17549==    by 0x5359200: g_malloc (in /usr/lib64/libglib-2.0.so.0.4200.2)
==17549==    by 0x536EE2D: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.4200.2)
==17549==    by 0x5370165: g_slist_append (in /usr/lib64/libglib-2.0.so.0.4200.2)
==17549==    by 0x4E595C3: sr_session_datafeed_callback_add (session.c:512)
==17549==    by 0x409527: load_input_file_module (input.c:111)
==17549==    by 0x4097AB: load_input_file (input.c:157)
==17549==    by 0x40531E: main (main.c:288)
2015-11-29 01:13:58 +01:00
Stefan Brüns fe7b8efc6b session: fix use after free of session->devs as reported by valgrind
==7478== Invalid write of size 8
==7478==    at 0x4E59182: sr_session_dev_remove_all (session.c:302)
==7478==    by 0x4E591CD: sr_session_destroy (session.c:265)
==7478==    by 0x4095D9: load_input_file_module (input.c:143)
==7478==    by 0x4097AB: load_input_file (input.c:157)
==7478==    by 0x40531E: main (main.c:288)
==7478==  Address 0x7877eb8 is 88 bytes inside a block of size 96 free'd
==7478==    at 0x4C2A37C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7478==    by 0x4E5F454: sr_input_free (input.c:573)
==7478==    by 0x4095C3: load_input_file_module (input.c:140)
==7478==    by 0x4097AB: load_input_file (input.c:157)
==7478==    by 0x40531E: main (main.c:288)
2015-11-29 01:13:58 +01:00
Uwe Hermann b3cfc6e98e Make all sizeof() consistently use parenthesis. 2015-11-29 00:23:53 +01:00
Daniel Elstner 09ffac33b7 sysclk-lwla: Simplify trigger mask generation 2015-11-28 23:27:45 +01:00
Daniel Elstner 93ed0241aa sysclk-lwla: Drain pending replies on initialization
When opening the device, drain any pending data from the USB
buffers so that the device won't get stuck on crashes etc.
2015-11-28 23:27:45 +01:00
Daniel Elstner 567674b4f8 sysclk-lwla: Remove double USB set configuration
This was a pointless attempt to make the reset hiccups go away.
It didn't help, the problem must be something else.
2015-11-27 21:26:13 +01:00
Daniel Elstner 7ed808179f sysclk-lwla: Cut down on size_t overuse
Do not use size_t for values whose width is defined by the device,
not the host. Also don't use size_t for simple indices with known
small range, unless type compatibility considerations apply.
2015-11-27 15:07:56 +01:00
Daniel Elstner 43af7604d0 sysclk-lwla: Fix copy'n'paste mistake in comment 2015-11-27 03:19:43 +01:00
Uwe Hermann 9e9dba7b41 Use the ALLZERO macro in more places. 2015-11-27 00:55:09 +01:00
Hannu Vuolasaho 2c5bdf1bbd Support for Korad KA3005P 2015-11-27 00:54:07 +01:00
Uwe Hermann 16fc7ee29f korad-kdxxxxp: Rename driver to korad-kaxxxxp.
This matches the supported / supportable devices better.
2015-11-27 00:54:07 +01:00
Uwe Hermann 89b3a0d8d1 doxygen: Only use @since on public API functions. 2015-11-27 00:17:31 +01:00
Uwe Hermann 2cdd40205e z60_libsigrok.rules: Add sigrok fx2lafw VID/PID pairs. 2015-11-27 00:12:57 +01:00
Petteri Aimonen db0e5c999d VCD input: Chunk up the samples in 1MB blocks.
This gives about 100x speed improvement when converting VCD->SR.

Also should allow practically unlimited number of channels.

This fixes bug #551.
2015-11-26 21:44:31 +01:00
Daniel Elstner 3393f185a5 session: Remove debug spew on I/O events
This really is a bit much with some drivers that do lots of small
I/O transfers.
2015-11-26 21:44:31 +01:00
Daniel Elstner e8cd7d602c contrib: Add SysClk LWLA1016 to udev rules 2015-11-26 21:44:31 +01:00
Daniel Elstner be64f90b53 sysclk-lwla: Implement support for LWLA1016
Refactor the sysclk-lwla driver to separate the generic logic from
the model-specific implementation. Based on this, implement support
for the SysClk LWLA1016 device.
2015-11-26 21:44:31 +01:00
Daniel Elstner ce19d4c615 sysclk-lwla: Remove global driver instance pointer
Obtain the sr_dev_driver pointer from the device instance so that
the remaining references to the global di pointer can be removed.
2015-11-26 21:44:31 +01:00
Uwe Hermann e4ce146fef sr_usb_find(): Increase the 'bus' limit to 255.
On some systems it can happen that the USB 'bus' number is a lot larger
than 64, but sr_usb_find() currently errors out if it is > 64.

Example:
Bus 250 Device 006: ID 1ab1:04ce 1ab1 DS1000Z Series[...]

Increase that limit so that the code will work everywhere. This bus number
is queried via libusb_get_bus_number() which returns an uint8_t, so we're
limiting to 255 here.

Thanks to 'ssi' on IRC for reporting the issue.
2015-11-21 20:27:25 +01:00
Matthieu Gaillet d79244dc34 serial-dmm: Add support for Velleman DVM4100 & PeakTech 3415.
(both are using the new dtm0660 DMM parser)
2015-11-15 23:54:37 +01:00
Matthieu Gaillet eed3dec849 Add dtm0660 15-byte DMM protocol parser. 2015-11-15 23:54:37 +01:00
Uwe Hermann b98b70222f usb.c: Fix usb_get_port_path() issue on Mac OS X.
Apparently (some versions of) Mac OS X have the same problem with
usb_get_port_path() as FreeBSD does. Work around this in the same way.

Thanks to hanyazou@gmail.com for the patch!

This fixes bug #673.
2015-11-15 19:11:54 +01:00
Uwe Hermann 382bea8250 chronovu-la: Add missing libusb dependencies.
The chronovu-la driver now uses libusb (in addition to libftdi), so add
a missing <libusb.h> #include and libusb dependency in configure.ac.
2015-11-15 16:20:07 +01:00
Uwe Hermann 67f890d5bb chronovu-la: Properly handle multiple devices.
The driver should now be able to cope with e.g. multiple ChronoVu LA8
and/or ChronoVu LA16 devices being connected to the same PC.

It now also provides the serial number and connection ID, which can be
used by frontends to differentiate multiple devices.

Also improve the scanopts / drvopts / devopts lists handling.

This fixes bug #504.
2015-11-09 01:54:41 +01:00
Uwe Hermann d0f1fa0758 asix-sigma: Drop unneeded asix_sigma_driver_info.
This is not needed, but also causes linker issues on some platforms.
2015-11-08 19:11:25 +01:00
Uwe Hermann 2c24077466 Constify a lot more items.
This fixes various compiler warnings when -Wdiscarded-qualifiers is used.
2015-11-08 19:11:25 +01:00
Daniel Elstner 45ec8f7756 build: Delete generated files on make clean 2015-11-08 11:51:17 +01:00
Daniel Elstner 7252a09e8f build: Enable uninstall of Java bindings
This is needed for make distcheck to work.
2015-11-07 22:20:19 +01:00
Daniel Elstner 9448951db5 build: Skip Python bindings during distcheck
setup.py attempts to relink the bindings at installation time,
which breaks distcheck. Thus, disable the Python bindings during
distcheck for now.
2015-11-07 22:13:14 +01:00
Daniel Elstner 0a9d05dc7c build: Distribute missing files 2015-11-07 22:00:25 +01:00
Daniel Elstner 37829c15b5 build: Make ChangeLog generation distcheck-safe 2015-11-07 21:51:40 +01:00
Tilman Sauerbeck e5ef649be3 Constify sr_dev_driver::name and sr_dev_driver::long_name.
This fixes a bunch of warnings when compiling with -Wwrite-strings.
2015-11-06 17:55:55 +01:00
jry 3ba56876b4 asix-sigma: Split into api.c and protocol.[ch] modules. 2015-11-05 21:26:39 +01:00
Marcus Comstedt ee95d6bd8b Java: Remove explicit constructor deletes since SWIG 2 doesn't like them
bindings/java/org/sigrok/core/classes/classes.i:247: Error: \
    Syntax error in input(3).
2015-11-02 18:46:05 +01:00
Marcus Comstedt e13648d041 Java: Fix leaking global refs
This fixes issue #690.
2015-11-02 18:37:10 +01:00
Marcus Comstedt c470ae86da Java: Don't use JNIEnv* captured by lambdas, it may be invalid for the context 2015-11-02 18:37:10 +01:00
Marcus Comstedt 908aad3816 Java: Fill jlongs with 0 when doing SWIG style pointer marshalling
This prevents valgrind complaints and also makes pointer comparison
from the Java side work.
2015-11-02 18:37:10 +01:00
Marcus Comstedt 32fd1edc23 Revert "Java: Avoid dangerous writes via casted pointers"
This reverts commit 865de99391.

This fixes bug #688.
2015-11-02 18:37:10 +01:00