Commit Graph

3596 Commits

Author SHA1 Message Date
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
Martin Ling ae2cdde4d2 python: Fix string conversions for Python 3.
Fixes bug #478.
2015-11-02 18:35:18 +01:00
Daniel Elstner 5dd538ded0 build: Set CXXFLAGS when building Python module
Set both CFLAGS and CXXFLAGS when executing setup.py to build
the Python bindings. Newer versions of distutils/setuptools have
apparently started to pick up the latter when compiling C++.
2015-11-02 14:30:24 +01:00
Daniel Elstner 3d86913266 build: Match up Python headers with interpreter version
Check for either Python 2 or Python 3 header files depending on
the version of the Python interpreter. Also require the module
version to exactly match the interpreter version.

This may fix bug #645.
2015-11-01 22:01:40 +01:00
Daniel Elstner 8105e82913 openbench-logic-sniffer: Avoid recreating event source
With the current driver API and the corresponding session event
handling, it is not possible to destroy and then re-create an
event source with the same key within the same main loop iteration.

The next generation driver API will fix this problem. But for now,
just change the driver to make do without that sort of thing. Also
increase the I/O timeout to 100 ms to be safer in the event of all
kind of delays the OS environment may induce.

This fixes bug #678.
2015-11-01 19:38:40 +01:00
Bert Vermeulen d09a82a8fe Remove obsolete SR_INPUT_META_MIMETYPE metadata key.
This was never really implemented, since getting the mimetype of a
file or stream in a cross-platform way is a gigantic tangle.
2015-10-31 18:56:34 +01:00
Bert Vermeulen c958ab59d6 input/csv: Remove obsolete mimetype format match.
Mimetypes never worked, and in any case this caused a segfault due to a
missing SR_INPUT_META_REQUIRED flag.

This fixes bug #681.
2015-10-31 18:54:50 +01:00
Daniel Elstner b04a532fa3 build: Also look for python-2.7 pkg-config module
Apparently Gentoo names the module python-2.7 instead of python27.
2015-10-31 16:02:30 +01:00
Daniel Elstner 58cc125b0f sysclk-lwla: Read full 64 bit of capture duration field
Evaluate all 64 bit of the duration field in the capture status
record. Although unlikely in practical use, due to compression
it is possible for the duration in ms to exceed 32 bit.
2015-10-31 10:19:51 +01:00
Daniel Elstner 30f34dbdf0 sysclk-lwla: Define constants for long registers 2015-10-31 01:39:03 +01:00
Daniel Elstner 586ff70a21 sysclk-lwla: Clarify use of SRAM control registers
Assign more meaningful names to things and introduce new constants.
2015-10-31 01:11:31 +01:00
Daniel Elstner a6dc3dacab zip: Provide fallback if zip_discard() is unavailable
zip_discard() was introduced in libzip 0.11, which some systems
do not have yet. Provide a fallback replacement for zip_discard(),
and reduce the requirement to libzip 0.10 again.

This fixes bug #674.
2015-10-30 15:09:46 +01:00
Daniel Elstner 014512254a C++: Declare std::default_delete friend as struct
std::default_delete<> is originally defined as struct, not class.
This does not really make much of a difference, but some compilers
complain when the struct/class tag is not consistent across all
declarations of the type.
2015-10-30 15:09:40 +01:00
Daniel Elstner cea8c3124f C++: Suppress deprecation warnings from glibmm
Ignore warnings due to use of std::auto_ptr<> in the glibmm headers.
This should be reverted once glibmm is fixed.
2015-10-30 12:51:16 +01:00
Daniel Elstner 8ebf1469a9 build: Use common SWIG defines for Python and Java
Make the Python and Java bindings use the same set of preprocessor
macros for the SWIG parsing stage, taken from a make variable. Add
G_GNUC_{BEGIN,END}_IGNORE_DEPRECATIONS to that set.
2015-10-30 12:51:16 +01:00
Daniel Elstner e1172cf847 sysclk-lwla: Read test word twice during initialization
During initialization of the LWLA1034, read the 64-bit test word
twice and verify the result of the second read only. This better
matches what the original vendor software does.
2015-10-30 12:51:16 +01:00
Daniel Elstner 3a322bbc3b sysclk-lwla: Clarify function of registers 10B0 to 10BC
Apparently, these four registers form an interface for indirect
access to another internal 64 bit wide memory. This is likely the
same memory as that accessed by the bulk transfer commands 7 and 8.
2015-10-30 12:51:16 +01:00
Uwe Hermann 8e0f9bf782 Makefile.am: Avoid non-portable -t option for $(INSTALL).
The 'install' tool doesn't have a -t option on all platforms
(e.g. Mac OS X or FreeBSD).
2015-10-29 23:59:12 +01:00
Uwe Hermann 9e5366df4f korad-kdxxxxp: Minor cosmetics and consistency changes. 2015-10-29 18:51:09 +01:00
Hannu Vuolasaho c40ed60f27 Over voltage and current protection support
Developed against Velleman LABPS3005D and seems to work.
2015-10-29 18:43:09 +01:00
Hannu Vuolasaho b16d975a5c Support for regulation status and fix for mysterious M
Added support for SR_CONF_REGULATION which returns value for CH1
Also VELLEMAN LABPS3005D (only device currently supported) sends single
'M' character in beginning of return value, which is specially discarded.
2015-10-29 18:43:09 +01:00
Daniel Elstner 865de99391 Java: Avoid dangerous writes via casted pointers
Writing to an object through a pointer of incompatible type is
really evil. Even when the data size matches, it is still a
violation of strict aliasing rules.

Replace all instances by direct casts of the value, without the
unnecessary and dangerous indirection.
2015-10-26 07:29:50 +01:00
Daniel Elstner b0b0e2009c SWIG: Avoid unseparated template closing brackets
SWIG 2.0.12 fails with a syntax error on ">>".
2015-10-26 07:18:55 +01:00
Martin Ling 4aa9a1e569 C++: Catch exceptions from stoi() and stod().
Fixes bug #483.
2015-10-26 07:17:50 +01:00
Martin Ling 90bd8829b1 java: Add doxygen output directory to .gitignore. 2015-10-26 07:17:50 +01:00
Martin Ling f2831ab35b java: Usable wrapping of Configurable.config_keys(). 2015-10-26 07:17:01 +01:00
Martin Ling 36e3f6a9ce Makefile.am: Make SWIG wrappers also depend on new templates.i file. 2015-10-26 07:17:01 +01:00
Martin Ling df979d6dc6 python: Give all enum values __doc__ strings. 2015-10-26 07:17:01 +01:00
Martin Ling ef9643a2bb python: Add docstrings for enum constants. 2015-10-26 07:17:01 +01:00
Martin Ling 8fb7efe203 java: Add docstrings for enum constants. 2015-10-26 07:17:01 +01:00
Martin Ling 0bcdeb90c4 C++: Include enum classes when generating documentation. 2015-10-26 07:17:01 +01:00
Martin Ling ace872d529 C++: Declare namespace in enums.hpp so it can be used independently. 2015-10-26 07:17:01 +01:00
Martin Ling e5c22906e8 java: Make enum values available as normal constants. 2015-10-26 07:17:01 +01:00