Janne Huttunen [Sat, 20 Dec 2014 15:33:24 +0000 (17:33 +0200)]
Limit frames instead of samples.
Since every individual measurement is represented by a single frame
and a "sample" isn't all that meaningful concept in this context,
it makes more sense to define possible limit in number of frames.
Make the es51919 driver to support setting a frame limit instead of
a sample limit.
Janne Huttunen [Sat, 20 Dec 2014 15:32:26 +0000 (17:32 +0200)]
Use frames to group a single measurement result together.
In most, but not all, modes the ES51919 reports two separate
analog values for each measurement sample. These values are
mapped to two separate channels and sent in two separate
packets.
A client program needs a way to determine which results are
parts of the same measurement and also know when a complete
measurement is received so it can process the sample. Use
the frame begin and end packets to separate groups that each
represent a single complete measurement.
Jiří Pinkava [Sun, 23 Nov 2014 16:38:28 +0000 (17:38 +0100)]
Do not check for JDK headers if Java bindings are disabled.
This removes an unnecessary build dependency on JDK and fixes
build troubles on systems where javac is present but JDK is not
installed and Java bindings are disabled by ./configure --disable-java.
Vincent Palatin [Mon, 10 Nov 2014 16:17:07 +0000 (08:17 -0800)]
usb_get_port_path(): fix libusb error checking
When libusb cannot access a device, libusb_get_port_numbers() will return
an error. Check the return code rather than doing invalid pointer
operations (out-of-bound read).
Avoid segfaults at sigrok-cli startup on my setup where some USB devices are
not accessible and also make Valgrind happier.
Tim Hatch [Sun, 2 Nov 2014 23:29:38 +0000 (15:29 -0800)]
saleae-logic16: Downgrade error during capture to a message.
Some clone doesn't set this to the exact same value, and both bits in 0x48 are
marked as unknown at
http://sigrok.org/wiki/Saleae_Logic16/Firmware#FPGA_variables
Uwe Hermann [Sat, 22 Nov 2014 21:06:02 +0000 (22:06 +0100)]
python: Silence some warnings via -Wno-uninitialized.
Silence some warnings when building the Python bindings:
sigrok/core/classes_wrap.cpp: In function ‘PyObject* _wrap_new_OutputFormatMap(PyObject*, PyObject*)’:
sigrok/core/classes_wrap.cpp:5232:4: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0);
^
sigrok/core/classes_wrap.cpp:14383:13: note: ‘argv[0]’ was declared here
PyObject *argv[2];
^
sigrok/core/classes_wrap.cpp: In function ‘PyObject* _wrap_new_ChannelGroupMap(PyObject*, PyObject*)’:
sigrok/core/classes_wrap.cpp:5232:4: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0);
^
sigrok/core/classes_wrap.cpp:23356:13: note: ‘argv[0]’ was declared here
PyObject *argv[2];
^
We add -Wno-uninitialized since the warnings are harmless and we really
don't care about them in the generated classes_wrap.cpp.
Uwe Hermann [Fri, 21 Nov 2014 18:02:10 +0000 (19:02 +0100)]
Use g_malloc0() consistently, simplify error handling.
Use g_malloc0() for small allocations and assume they always
succeed. Simplify error handling in a few places accordingly.
Don't always sanity-check parameters for non-public (SR_PRIV)
functions, we require the developers to invoke them correctly.
This allows further error handling simplifications.
Bert Vermeulen [Tue, 18 Nov 2014 14:51:38 +0000 (15:51 +0100)]
output/analog: Add option to restrict number of decimal digits printed.
This is a feature restricted to the new analog struct.
By default all the digits available in the encoding struct are printed.
The option "digits", when set to "spec", changes this to print the
number given in the spec struct.
Aurelien Jacobs [Thu, 13 Nov 2014 23:50:46 +0000 (00:50 +0100)]
Add a sr_analog_init() API to initialize sr_datafeed_analog2 struct.
It fills the fields with reasonable default values that should suit
most of the drivers. Drivers are obviously free to override the fields
they want after initializing.
Uwe Hermann [Fri, 14 Nov 2014 23:41:10 +0000 (00:41 +0100)]
autogen.sh: Also warn if AX_CXX_COMPILE_STDCXX_11 is not available.
This fixes an error message when the file is not installed at all:
./autogen.sh: 67: [: Illegal number:
Turn the AX_CXX_COMPILE_STDCXX_11 errors into warnings though, since
it is (and should be) possible to build libsigrok (just the C library)
just fine, even without that macro or with an older version of it.
Uwe Hermann [Thu, 13 Nov 2014 17:40:44 +0000 (18:40 +0100)]
configure.ac: Temporarily disable Java bindings.
Those need a bugfix to make them build again:
bindings/java/org/sigrok/core/classes/Context.java:92: error: method Context_create_analog_packet in class classesJNI cannot be applied to given types;
long cPtr = classesJNI.Context_create_analog_packet(swigCPtr, this, ChannelVector.getCPtr(tempchannels), SWIGTYPE_p_float.getCPtr(data_pointer), num_samples, Quantity.getCPtr(mq), mq, Unit.getCPtr(unit), unit, QuantityFlagVector.getCPtr(mqflags), mqflags);
^
required: long,Context,Vector<Channel>,long,long,long,Quantity,long,Unit,long,QuantityFlagVector
found: long,Context,long,long,long,long,Quantity,long,Unit,long,QuantityFlagVector
reason: actual argument long cannot be converted to Vector<Channel> by method invocation conversion
1 error
Makefile:3352: recipe for target 'bindings/java/sigrok-core.jar' failed