]>
sigrok.org Git - libsigrok.git/log
Uwe Hermann [Sat, 22 Nov 2014 20:03:39 +0000 (21:03 +0100)]
trigger: Add some more error handling.
All of these error conditions are checked via the unit tests.
Also, add the following missing entries (analog trigger types):
- SR_TRIGGER_RISING
- SR_TRIGGER_EDGE
Uwe Hermann [Sat, 22 Nov 2014 19:13:37 +0000 (20:13 +0100)]
Add a few unit tests for sr_trigger_*().
Uwe Hermann [Sat, 22 Nov 2014 18:32:28 +0000 (19:32 +0100)]
trigger: Add API documentation.
Uwe Hermann [Sat, 22 Nov 2014 15:53:02 +0000 (16:53 +0100)]
Add missing entries to sr_config_info_data[].
Newly added keys:
- SR_CONF_SAMPLE_INTERVAL
- SR_CONF_NUM_TIMEBASE
- SR_CONF_NUM_VDIV
- SR_CONF_CENTER_FREQUENCY
- SR_CONF_DEVICE_MODE
- SR_CONF_SCAN_OPTIONS
- SR_CONF_DEVICE_OPTIONS
- SR_CONF_DEVICE_MODE
- SR_CONF_TEST_MODE
Also, keep the same ordering and grouping as in libsigrok.h.
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.
Uwe Hermann [Fri, 21 Nov 2014 08:07:04 +0000 (09:07 +0100)]
Don't check sr_channel_new() return value (always succeeds).
We now use g_malloc0() for the allocation and assume the allocation
will always succeed, thus sr_channel_new() will always return a
valid new channel.
Uwe Hermann [Fri, 21 Nov 2014 01:26:24 +0000 (02:26 +0100)]
Consistently use g_malloc0() for allocating devc.
We assume the allocation will always succeed, hence no need for
checking the returned value.
Uwe Hermann [Fri, 21 Nov 2014 01:01:36 +0000 (02:01 +0100)]
Eliminate sr_dev_inst_new().
Bert Vermeulen [Thu, 20 Nov 2014 02:08:55 +0000 (03:08 +0100)]
Fix invalid pointer dereference.
Aurelien Jacobs [Wed, 19 Nov 2014 22:54:01 +0000 (23:54 +0100)]
yokogawa-dlm: Publish driver options.
Aurelien Jacobs [Wed, 19 Nov 2014 22:53:35 +0000 (23:53 +0100)]
motech-lps-30x: Publish driver options.
Aurelien Jacobs [Wed, 19 Nov 2014 22:53:10 +0000 (23:53 +0100)]
manson-hcs-3xxx: Publish driver options.
Aurelien Jacobs [Wed, 19 Nov 2014 22:52:51 +0000 (23:52 +0100)]
hameg-hmo: Publish driver options.
Aurelien Jacobs [Wed, 19 Nov 2014 13:12:48 +0000 (14:12 +0100)]
Finish fixing broken sr_config_list() logic.
Martin Ling [Wed, 19 Nov 2014 01:23:48 +0000 (01:23 +0000)]
Make sr_analog_*_to_string() functions allocate the necessary buffers.
Uwe Hermann [Tue, 18 Nov 2014 22:43:38 +0000 (23:43 +0100)]
mic-985xx: Correctly report SR_CONF_THERMOMETER/_HYGROMETER.
Some models only log temperature, others log temperature and humidity
(so they need different drvopts).
Uwe Hermann [Tue, 18 Nov 2014 22:19:48 +0000 (23:19 +0100)]
mic-985xx: Drop unneeded #define.
Uwe Hermann [Tue, 18 Nov 2014 22:19:21 +0000 (23:19 +0100)]
mic-985xx: Publish driver options.
Uwe Hermann [Tue, 18 Nov 2014 18:42:31 +0000 (19:42 +0100)]
center-3xx: Drop unneeded #define.
Uwe Hermann [Tue, 18 Nov 2014 18:16:39 +0000 (19:16 +0100)]
center-3xx: Publish driver options.
Bert Vermeulen [Tue, 18 Nov 2014 17:10:19 +0000 (18:10 +0100)]
Revert "victor-dmm: Set spec digits to 3, matching the display."
This reverts commit
28b424349363a9002e7af7300a7f2941a8469004 .
Bert Vermeulen [Tue, 18 Nov 2014 16:41:36 +0000 (17:41 +0100)]
ols: Publish driver options.
Bert Vermeulen [Tue, 18 Nov 2014 16:31:58 +0000 (17:31 +0100)]
agilent-dmm: Now really fix driver options.
Bert Vermeulen [Tue, 18 Nov 2014 15:50:47 +0000 (16:50 +0100)]
appa-55ii: Publish driver options.
Bert Vermeulen [Tue, 18 Nov 2014 15:46:39 +0000 (16:46 +0100)]
hantek-dso: Fix driver options.
Bert Vermeulen [Tue, 18 Nov 2014 15:32:51 +0000 (16:32 +0100)]
atten-pps3xxx: Fix driver options.
Bert Vermeulen [Tue, 18 Nov 2014 15:42:52 +0000 (16:42 +0100)]
cem-dt-885x: Fix driver options.
Bert Vermeulen [Tue, 18 Nov 2014 15:38:37 +0000 (16:38 +0100)]
scpi-pps: Fix driver options.
Bert Vermeulen [Tue, 18 Nov 2014 15:30:47 +0000 (16:30 +0100)]
asix-sigma: Fix driver options.
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.
Bert Vermeulen [Tue, 18 Nov 2014 14:46:59 +0000 (15:46 +0100)]
Add debug spew to all sr_config_(get|set|list) calls.
Bert Vermeulen [Tue, 18 Nov 2014 14:46:24 +0000 (15:46 +0100)]
Fix broken sr_config_list() logic.
Bert Vermeulen [Tue, 18 Nov 2014 14:39:46 +0000 (15:39 +0100)]
demo: Fix driver options.
Bert Vermeulen [Tue, 18 Nov 2014 14:35:30 +0000 (15:35 +0100)]
fx2lafw: Publish driver options.
Bert Vermeulen [Tue, 18 Nov 2014 14:34:52 +0000 (15:34 +0100)]
agilent-dmm: Publish driver options.
Bert Vermeulen [Tue, 18 Nov 2014 10:19:18 +0000 (11:19 +0100)]
victor-dmm: Publish driver options.
Bert Vermeulen [Tue, 18 Nov 2014 00:16:27 +0000 (01:16 +0100)]
Add analog helper sr_analog_unit_to_string().
Bert Vermeulen [Tue, 18 Nov 2014 00:15:41 +0000 (01:15 +0100)]
Add analog helper sr_analog_float_to_string().
Bert Vermeulen [Mon, 17 Nov 2014 23:24:37 +0000 (00:24 +0100)]
Show SR_DF_ANALOG2 packets in debug output.
Bert Vermeulen [Mon, 17 Nov 2014 23:24:08 +0000 (00:24 +0100)]
victor-dmm: Set spec digits to 3, matching the display.
Bert Vermeulen [Mon, 17 Nov 2014 22:08:49 +0000 (23:08 +0100)]
analog: Fix analog_to_float typos, and cleanup.
This was adding 1 to every measurement being converted.
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.
Aurelien Jacobs [Mon, 17 Nov 2014 10:38:37 +0000 (11:38 +0100)]
demo: Fix analog output at low samplerate.
Aurelien Jacobs [Mon, 17 Nov 2014 10:40:22 +0000 (11:40 +0100)]
demo: Fix square pattern output shorter than other patterns.
Bert Vermeulen [Mon, 17 Nov 2014 12:20:05 +0000 (13:20 +0100)]
Check driver capabilities before sr_config_get/set/list.
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.
Jens Steinhauser [Fri, 14 Nov 2014 00:43:25 +0000 (01:43 +0100)]
Check the version of the AX_CXX_COMPILE_STDCXX_11 macro.
Bert Vermeulen [Fri, 14 Nov 2014 19:24:43 +0000 (20:24 +0100)]
Refactor scan options check.
Uwe Hermann [Fri, 14 Nov 2014 19:01:12 +0000 (20:01 +0100)]
bindings: Fix out-of-tree build.
This closes #473.
Uwe Hermann [Fri, 14 Nov 2014 15:47:46 +0000 (16:47 +0100)]
bindings: Re-enable Java, but ignore create_analog_packet().
This will need some fixing.
Bert Vermeulen [Fri, 14 Nov 2014 11:22:54 +0000 (12:22 +0100)]
sr_driver_scan: Enforce options passed in by client.
Bert Vermeulen [Fri, 14 Nov 2014 10:37:11 +0000 (11:37 +0100)]
demo: Use allocation for model string.
Uwe Hermann [Wed, 12 Nov 2014 22:34:20 +0000 (23:34 +0100)]
mic-985xx: Convert to use SR_DF_ANALOG2.
Uwe Hermann [Wed, 12 Nov 2014 15:31:30 +0000 (16:31 +0100)]
victor-dmm: Convert to use SR_DF_ANALOG2.
Bert Vermeulen [Wed, 12 Nov 2014 16:05:13 +0000 (17:05 +0100)]
output/analog: Add SR_DF_ANALOG2 support.
Bert Vermeulen [Wed, 12 Nov 2014 16:05:13 +0000 (17:05 +0100)]
Add sr_analog_to_float().
Bert Vermeulen [Wed, 12 Nov 2014 13:46:51 +0000 (14:46 +0100)]
Add SR_DF_ANALOG2 and related structs.
New structs:
- sr_rational
- sr_datafeed_analog2
- sr_analog_encoding
- sr_analog_meaning
- sr_analog_spec
Martin Ling [Thu, 13 Nov 2014 20:38:56 +0000 (20:38 +0000)]
bindings: Fix enums.py compatibility with Python 3.
Uwe Hermann [Thu, 13 Nov 2014 18:15:37 +0000 (19:15 +0100)]
bindings: Add Session::context().
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
Martin Ling [Wed, 12 Nov 2014 12:37:22 +0000 (12:37 +0000)]
bindings: Add packet constructors.
Martin Ling [Wed, 12 Nov 2014 11:08:22 +0000 (11:08 +0000)]
bindings: Add QuantityFlag::mask_from_flags() method.
Martin Ling [Wed, 12 Nov 2014 02:23:02 +0000 (02:23 +0000)]
bindings: Add UserDevice wrapping.
Uwe Hermann [Wed, 12 Nov 2014 01:06:15 +0000 (02:06 +0100)]
Change sr_dev_inst_new() to take no parameters.
Change all callers to set the fields manually as needed.
Uwe Hermann [Tue, 11 Nov 2014 23:04:28 +0000 (00:04 +0100)]
HACKING: Document the new malloc related guidelines.
Uwe Hermann [Tue, 11 Nov 2014 22:52:53 +0000 (23:52 +0100)]
HACKING: Minor updates.
Martin Ling [Wed, 12 Nov 2014 01:00:17 +0000 (01:00 +0000)]
python: Wrap Analog::data() as a NumPy array.
Martin Ling [Tue, 11 Nov 2014 23:54:39 +0000 (23:54 +0000)]
bindings: Expose Analog::channels() as an attribute.
Martin Ling [Tue, 11 Nov 2014 23:44:26 +0000 (23:44 +0000)]
python: Return correct PacketPayload subclasses from Packet.payload()
Martin Ling [Tue, 11 Nov 2014 21:04:44 +0000 (21:04 +0000)]
python: Fix error handling for callbacks.
Martin Ling [Tue, 11 Nov 2014 20:11:32 +0000 (20:11 +0000)]
python: Implement equality checks for EnumValue derived classes.
Fixes bug #443.
Martin Ling [Tue, 11 Nov 2014 18:26:50 +0000 (18:26 +0000)]
bindings: Support per-language extensions to EnumValue wrappers.
Martin Ling [Tue, 11 Nov 2014 15:29:35 +0000 (15:29 +0000)]
python: Fix mapping of vector & map attributes to Python types.
Fixes bug #382.
Martin Ling [Tue, 11 Nov 2014 14:50:55 +0000 (14:50 +0000)]
bindings: Use new %attributevector and %attributemap macros.
Martin Ling [Tue, 11 Nov 2014 01:24:19 +0000 (01:24 +0000)]
bindings: Expose ConfigKey::identifier as an attribute.
Martin Ling [Tue, 11 Nov 2014 01:18:58 +0000 (01:18 +0000)]
bindings: Expose EnumValue::id and EnumValue::name as attributes.
Martin Ling [Wed, 29 Oct 2014 14:36:45 +0000 (14:36 +0000)]
bindings: Wrap EnumValue base class.
Martin Ling [Wed, 29 Oct 2014 14:33:46 +0000 (14:33 +0000)]
bindings: Rename ConfigKey::get(string) to get_by_identifier().
The polymorphism with get(int) causes problems here when a char * is passed.
Martin Ling [Wed, 29 Oct 2014 14:31:31 +0000 (14:31 +0000)]
cxx: Implement more of EnumValue in template.
Bert Vermeulen [Tue, 11 Nov 2014 22:23:09 +0000 (23:23 +0100)]
output: Add srzip, the session file format.
The 'filename' option is required: this module creates the zip file
itself, and never actually outputs anything back to the calling frontend.
Uwe Hermann [Tue, 11 Nov 2014 21:45:20 +0000 (22:45 +0100)]
unit tests: Add a test case for sr_dev_inst_channel_add().
Uwe Hermann [Tue, 11 Nov 2014 20:59:23 +0000 (21:59 +0100)]
unit tests: Add a test case for sr_dev_inst_user_new().
Uwe Hermann [Tue, 11 Nov 2014 20:58:49 +0000 (21:58 +0100)]
Add sr_dev_inst_user_new(), sr_dev_inst_channel_add().
Uwe Hermann [Tue, 11 Nov 2014 20:28:16 +0000 (21:28 +0100)]
uni tests: Use sr_dev_inst_channels_get() to fix the build.
Uwe Hermann [Tue, 11 Nov 2014 15:55:37 +0000 (16:55 +0100)]
bindings: Use getters now that 'struct sr_dev_inst' is opaque.
Uwe Hermann [Tue, 11 Nov 2014 11:44:37 +0000 (12:44 +0100)]
Constify the sdi parameter of all sr_dev_inst_*() getters.
Uwe Hermann [Tue, 11 Nov 2014 11:24:08 +0000 (12:24 +0100)]
Make 'struct sr_dev_inst' opaque.
Uwe Hermann [Tue, 11 Nov 2014 10:51:53 +0000 (11:51 +0100)]
Add sr_dev_inst_channels_get() and sr_dev_inst_channel_groups_get().
Uwe Hermann [Sun, 9 Nov 2014 19:04:09 +0000 (20:04 +0100)]
session_driver.c: Allow querying of SR_CONF_CAPTURE_UNITSIZE.
Uwe Hermann [Sun, 2 Nov 2014 15:40:40 +0000 (16:40 +0100)]
Brymen BM25x: Drop unneeded _ser/_SER suffix.
There's only one cable for this DMM, thus there's no need for a
_ser/_SER suffix or for specifying the cable name.
Uffe Jakobsen [Sat, 1 Nov 2014 18:35:30 +0000 (19:35 +0100)]
ols: Fix a serial port related issue on FreeBSD.
Add sp_drain() to ensure bytes have actually been transmitted
over the wire.
This fixes bug #414.
Bert Vermeulen [Sat, 1 Nov 2014 12:18:09 +0000 (13:18 +0100)]
Only sr_dev_inst_free() should free channel groups.
Uwe Hermann [Wed, 29 Oct 2014 21:46:57 +0000 (22:46 +0100)]
fx2lafw: Fix wide (16bit) sampling case.
This fixes bug #373.
Bert Vermeulen [Wed, 29 Oct 2014 12:26:57 +0000 (13:26 +0100)]
zeroplus-logic-cube: Add support for AKIP-9101.
Thanks to Nikita Nazarenko for the patch.
Soeren Apel [Sun, 26 Oct 2014 19:51:21 +0000 (20:51 +0100)]
Make sr_dev_inst_connid_get() available without libusb
Bert Vermeulen [Mon, 27 Oct 2014 16:03:02 +0000 (17:03 +0100)]
hantek-dso: Fix driver/global/channel group config keys.
This was way behind and did not yet support channel groups.
Bert Vermeulen [Mon, 27 Oct 2014 15:59:01 +0000 (16:59 +0100)]
Change SR_CONF_FILTER key to a boolean type.
This was an ill-defined string before, now it's simply something
you turn on or off on a channel.
Bert Vermeulen [Sun, 26 Oct 2014 23:46:19 +0000 (00:46 +0100)]
asix-sigma: Publish driver options.
Bert Vermeulen [Sun, 26 Oct 2014 23:37:04 +0000 (00:37 +0100)]
scpi-pps: Publish driver options.
Bert Vermeulen [Sun, 26 Oct 2014 22:54:55 +0000 (23:54 +0100)]
demo: Rearrange driver and device options.