]> sigrok.org Git - libsigrok.git/log
libsigrok.git
9 years agolibsigrok.h: Add SR_MQ_POWER_FACTOR and SR_MQ_APPARENT_POWER.
Uwe Hermann [Fri, 20 Mar 2015 19:35:07 +0000 (20:35 +0100)]
libsigrok.h: Add SR_MQ_POWER_FACTOR and SR_MQ_APPARENT_POWER.

9 years agobaylibre-acme: Fix a double free in bl_acme_set_shunt().
Bartosz Golaszewski [Wed, 18 Mar 2015 13:26:43 +0000 (14:26 +0100)]
baylibre-acme: Fix a double free in bl_acme_set_shunt().

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agoscpi-pps: Add profile for Rigol DP821A.
Martin Ling [Wed, 18 Mar 2015 18:10:56 +0000 (18:10 +0000)]
scpi-pps: Add profile for Rigol DP821A.

9 years agoscpi-pps: Initialise sdi with status SR_ST_INACTIVE.
Martin Ling [Wed, 18 Mar 2015 18:02:06 +0000 (18:02 +0000)]
scpi-pps: Initialise sdi with status SR_ST_INACTIVE.

Without this change a segfault occurs at exit after scan, because
dev_close() is called and the device is believed to be open.

9 years agorigol-ds: Fix broken channel group check in config_list().
Martin Ling [Thu, 19 Mar 2015 19:22:04 +0000 (19:22 +0000)]
rigol-ds: Fix broken channel group check in config_list().

9 years agorigol-ds: Data source is a device option, not per channel group.
Martin Ling [Thu, 19 Mar 2015 17:50:24 +0000 (17:50 +0000)]
rigol-ds: Data source is a device option, not per channel group.

9 years agorigol-ds: Use sr_scpi_get_bool().
Martin Ling [Wed, 18 Mar 2015 15:14:29 +0000 (15:14 +0000)]
rigol-ds: Use sr_scpi_get_bool().

9 years agorigol-ds: Fix double free.
Martin Ling [Wed, 18 Mar 2015 16:35:39 +0000 (16:35 +0000)]
rigol-ds: Fix double free.

std_dev_clear() frees all channel groups, so this one is not required.

9 years agorigol-ds: Fix wrong channel group malloc size.
Martin Ling [Wed, 18 Mar 2015 16:35:08 +0000 (16:35 +0000)]
rigol-ds: Fix wrong channel group malloc size.

9 years agoChange API of channel accessor functions to take struct sr_channel *.
Martin Ling [Thu, 19 Mar 2015 21:55:48 +0000 (21:55 +0000)]
Change API of channel accessor functions to take struct sr_channel *.

9 years agoAdd sdi pointer to struct sr_channel.
Martin Ling [Thu, 19 Mar 2015 21:41:51 +0000 (21:41 +0000)]
Add sdi pointer to struct sr_channel.

9 years agoSimplify channel creation.
Martin Ling [Thu, 19 Mar 2015 21:37:33 +0000 (21:37 +0000)]
Simplify channel creation.

We always follow sr_channel_new() with a call to add the channel to the sdi.
Tidy up a bit by adding this functionality to sr_channel_new() instead.

9 years agofx2lafw: Replace obsoleted strncmp() calls.
Uwe Hermann [Wed, 18 Mar 2015 22:08:26 +0000 (23:08 +0100)]
fx2lafw: Replace obsoleted strncmp() calls.

The fixed lengths for strncmp() can no longer be used since strings of
various lengths can be passed to match_manuf_prod(). Use strcmp() instead.

9 years agoVarious fixes/updates to make the driver compile.
eightdot [Mon, 16 Mar 2015 09:34:08 +0000 (10:34 +0100)]
Various fixes/updates to make the driver compile.

This patchset was originally done by eightdot <redacted> by
manually forward-porting parts of the changes done by Bert Vermeulen (see
previous commits), but then heavily modified by Uwe Hermann to be based on
top off the (git-)rebased patches from Bert Vermeulen instead.

Note: This initial DSLogic code is *not* yet in a working or usable
state. It should be considered as a basis for further work only, for now.

9 years agofx2lafw: Basic acquisition support for DSLogic.
Bert Vermeulen [Fri, 16 May 2014 21:04:14 +0000 (23:04 +0200)]
fx2lafw: Basic acquisition support for DSLogic.

9 years agoAdd udev rule for DSLogic.
Bert Vermeulen [Thu, 15 May 2014 20:01:34 +0000 (22:01 +0200)]
Add udev rule for DSLogic.

9 years agofx2lafw: scan/firmware support for DSLogic.
Bert Vermeulen [Sat, 3 May 2014 16:37:00 +0000 (09:37 -0700)]
fx2lafw: scan/firmware support for DSLogic.

9 years agooutput: Accept analog packets in csv output module.
Bartosz Golaszewski [Thu, 5 Mar 2015 17:28:10 +0000 (18:28 +0100)]
output: Accept analog packets in csv output module.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agools: Fix a compiler warning (unused variable).
Uwe Hermann [Fri, 13 Mar 2015 18:12:47 +0000 (19:12 +0100)]
ols: Fix a compiler warning (unused variable).

    CC       src/hardware/openbench-logic-sniffer/api.lo
  ../src/hardware/openbench-logic-sniffer/api.c: In function 'scan':
  ../src/hardware/openbench-logic-sniffer/api.c:103:10: warning: unused
  variable 'probefd' [-Wunused-variable]
    GPollFD probefd;
            ^

9 years agools: Fix detection and acquisition on Windows.
Uwe Hermann [Fri, 13 Mar 2015 07:33:22 +0000 (08:33 +0100)]
ols: Fix detection and acquisition on Windows.

Use the more portable sp_input_waiting() instead of g_poll() with FDs.
Thanks to Martin Ling for the hints. This is tested on Linux and Win7
using an OLS; scanning for the device and starting an acquisition works.

Also, add some more debug output.

This fixes bug #562.

9 years agobaylibre-acme: correctly handle channel group options
Bartosz Golaszewski [Fri, 27 Feb 2015 15:48:17 +0000 (16:48 +0100)]
baylibre-acme: correctly handle channel group options

Split device options into general and channel group settings, and
adjust config_list() callback appropriately.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agoRename SR_CONF_NUM_TIMEBASE to SR_CONF_NUM_HDIV.
Martin Ling [Sun, 1 Mar 2015 14:26:54 +0000 (14:26 +0000)]
Rename SR_CONF_NUM_TIMEBASE to SR_CONF_NUM_HDIV.

9 years agout372: Minor cosmetics.
Uwe Hermann [Mon, 2 Mar 2015 11:23:32 +0000 (12:23 +0100)]
ut372: Minor cosmetics.

9 years agout372: Support count mode.
Martin Ling [Sun, 1 Mar 2015 23:20:21 +0000 (23:20 +0000)]
ut372: Support count mode.

9 years agoAdd SR_MQ_COUNT for event count measurements.
Martin Ling [Sun, 1 Mar 2015 23:14:58 +0000 (23:14 +0000)]
Add SR_MQ_COUNT for event count measurements.

9 years agout372: Handle flags correctly.
Martin Ling [Sun, 1 Mar 2015 23:07:11 +0000 (23:07 +0000)]
ut372: Handle flags correctly.

Packets will now be rejected if the device is not displaying RPM.

9 years agout372: Break out character-pair decoding to a separate function.
Martin Ling [Sun, 1 Mar 2015 22:52:52 +0000 (22:52 +0000)]
ut372: Break out character-pair decoding to a separate function.

9 years agout372: Implement initial protocol parser.
Martin Ling [Sun, 1 Mar 2015 22:26:21 +0000 (22:26 +0000)]
ut372: Implement initial protocol parser.

For now this only works correctly if the device is in the default
state showing current RPM. The flags are not checked.

9 years agout372: Initial sub-driver skeleton.
Martin Ling [Sun, 1 Mar 2015 21:13:30 +0000 (21:13 +0000)]
ut372: Initial sub-driver skeleton.

9 years agoserial-dmm: Add MASTECH MS8250B as a supported DMM.
Baruch Even [Fri, 27 Feb 2015 13:15:26 +0000 (15:15 +0200)]
serial-dmm: Add MASTECH MS8250B as a supported DMM.

It is an alias and uses the FS9721 driver.

9 years agoconfigure.ac: Two more fixes for the baylibre-acme detection.
Uwe Hermann [Thu, 26 Feb 2015 17:55:17 +0000 (18:55 +0100)]
configure.ac: Two more fixes for the baylibre-acme detection.

9 years agoasix-sigma: Use the more portable g_usleep().
Uwe Hermann [Sat, 21 Feb 2015 19:57:27 +0000 (20:57 +0100)]
asix-sigma: Use the more portable g_usleep().

9 years agoconfigure.ac: Fix baylibre-acme OS check.
Vladislav Ivanov [Thu, 26 Feb 2015 07:32:59 +0000 (08:32 +0100)]
configure.ac: Fix baylibre-acme OS check.

9 years agobaylibre-acme: don't report ACME as detected if no probes are present
Bartosz Golaszewski [Tue, 17 Feb 2015 17:27:04 +0000 (18:27 +0100)]
baylibre-acme: don't report ACME as detected if no probes are present

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agoDoxyfile: Make exclude patterns more specific.
Bartosz Golaszewski [Wed, 18 Feb 2015 12:21:18 +0000 (13:21 +0100)]
Doxyfile: Make exclude patterns more specific.

Current exclude patterns lead to unwanted exclusion of all paths
containing common directory names like output, bindings etc. even
if those names occur higher in the directory structure.

Make exclude patterns more specific by prefixing them with src/.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agobaylibre-acme: Fix vendor/device name.
Uwe Hermann [Tue, 17 Feb 2015 15:10:33 +0000 (16:10 +0100)]
baylibre-acme: Fix vendor/device name.

9 years agoVarious Doxygen updates.
Uwe Hermann [Tue, 17 Feb 2015 14:55:37 +0000 (15:55 +0100)]
Various Doxygen updates.

9 years agounit tests: Drop unneeded check_ filename prefix.
Uwe Hermann [Mon, 16 Feb 2015 21:39:19 +0000 (22:39 +0100)]
unit tests: Drop unneeded check_ filename prefix.

9 years agobaylibre-acme: Drop unneeded comment.
Uwe Hermann [Mon, 16 Feb 2015 00:53:15 +0000 (01:53 +0100)]
baylibre-acme: Drop unneeded comment.

There's indeed no g_fclose() unfortunately. The g_*() wrappers for file
handling are mainly there to deal with portability issues in file names
(encoding, character sets, etc) on different platforms.

9 years agobaylibre-acme: Fix a compiler warning.
Uwe Hermann [Mon, 16 Feb 2015 00:51:53 +0000 (01:51 +0100)]
baylibre-acme: Fix a compiler warning.

Use PRIu64 to avoid the following compiler warning:

    CC       src/hardware/baylibre-acme/gpio.lo
  protocol.c: In function 'bl_acme_set_shunt':
  protocol.c:341:2: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' [-Wformat=]
    g_fprintf(fd, "%llu\n", MOHM_TO_UOHM(shunt));
    ^

9 years agobaylibre-acme: Minor coding-style, cosmetics.
Uwe Hermann [Mon, 16 Feb 2015 00:49:47 +0000 (01:49 +0100)]
baylibre-acme: Minor coding-style, cosmetics.

9 years agobaylibre-acme: Add support for SR_CONF_POWER_OFF.
Bartosz Golaszewski [Thu, 12 Feb 2015 13:53:55 +0000 (14:53 +0100)]
baylibre-acme: Add support for SR_CONF_POWER_OFF.

Allow to remotely cut the power at ACME probe level.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agobaylibre-acme: Add Linux-specific GPIO helpers.
Bartosz Golaszewski [Thu, 12 Feb 2015 13:53:54 +0000 (14:53 +0100)]
baylibre-acme: Add Linux-specific GPIO helpers.

These functions allow to export, read and set GPIOs using Linux
sysfs interface.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agobaylibre-acme: Add support for probe factor setting.
Bartosz Golaszewski [Thu, 12 Feb 2015 13:53:53 +0000 (14:53 +0100)]
baylibre-acme: Add support for probe factor setting.

Implement support for SR_CONF_PROBE_FACTOR setting in BayLibre ACME
driver. Given the channel-group parameter this allows to set the
shunt resistance for each probe.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agoSR_CONF_PROBE_FACTOR: New option.
Bartosz Golaszewski [Thu, 12 Feb 2015 13:53:52 +0000 (14:53 +0100)]
SR_CONF_PROBE_FACTOR: New option.

Add new configuration option allowing to modify the probe factor
for oscilloscopes and power-monitors.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agoconfigure.ac: Compile baylibre-acme driver for Linux only.
Bartosz Golaszewski [Thu, 12 Feb 2015 13:53:51 +0000 (14:53 +0100)]
configure.ac: Compile baylibre-acme driver for Linux only.

The driver for BayLibre ACME depends on Linux-specific sysfs
interfaces to ina226 and tmp435 devices. Exclude it for different
targets.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agobaylibre-acme: Driver implementation.
Bartosz Golaszewski [Thu, 12 Feb 2015 13:53:50 +0000 (14:53 +0100)]
baylibre-acme: Driver implementation.

Implement basic functionalities for baylibre-acme. Add support
for common config options, device detection and sample reading.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agobaylibre-acme: Initial driver skeleton.
Bartosz Golaszewski [Thu, 12 Feb 2015 13:53:49 +0000 (14:53 +0100)]
baylibre-acme: Initial driver skeleton.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agorigol-ds: fix the smallest supported vdiv for the DS2000 series.
Aurelien Jacobs [Sat, 14 Feb 2015 22:54:13 +0000 (23:54 +0100)]
rigol-ds: fix the smallest supported vdiv for the DS2000 series.

9 years agorigol-ds: return the actual hardware num_vdiv and vdiv list.
Aurelien Jacobs [Sat, 14 Feb 2015 22:52:33 +0000 (23:52 +0100)]
rigol-ds: return the actual hardware num_vdiv and vdiv list.

9 years agorigol-ds: fix search for the closest vdiv.
Aurelien Jacobs [Sat, 14 Feb 2015 22:48:36 +0000 (23:48 +0100)]
rigol-ds: fix search for the closest vdiv.

We try to find the smallest diff by comparing each diff with
the previously known smallest diff, so initially, this smallest diff
should be INFINITY so that we are sure to find a smaller one.

This fixes the following exception:
sr: rigol-ds: Negative vdiv index: -1.
Caught exception: not applicable

9 years agorigol-ds: Add missing "break" statements.
Uwe Hermann [Sat, 14 Feb 2015 18:23:34 +0000 (19:23 +0100)]
rigol-ds: Add missing "break" statements.

9 years agorigol-ds: Add missing 20/50/100V vdiv entries.
Uwe Hermann [Sat, 14 Feb 2015 18:08:39 +0000 (19:08 +0100)]
rigol-ds: Add missing 20/50/100V vdiv entries.

These are available on e.g. Rigol DS1102E (or "upgraded" DS1052E).

Without this, if one of the channels happens to have been set to
one of the missing vdiv settings frontends (e.g. PulseView) will
have some trouble using the scope:

  sr: hwdriver: sr_config_get(): key 30012 (vdiv) sdi 0x11bcb70 cg CH1
  sr: rigol-ds: Negative vdiv index: -1.
  std::exception

9 years agorigol-ds: Add more debug output.
Uwe Hermann [Sat, 14 Feb 2015 17:34:04 +0000 (18:34 +0100)]
rigol-ds: Add more debug output.

9 years agorigol-ds: handle full word trigger slope in config_get().
Aurelien Jacobs [Fri, 13 Feb 2015 15:37:24 +0000 (16:37 +0100)]
rigol-ds: handle full word trigger slope in config_get().

Some scope can return POSITIVE/NEGATIVE instead of POS/NEG,
so accept this as well.

This closes bug #558.

9 years agorigol-ds: SR_CONF_TRIGGER_SLOPE is actually listable.
Aurelien Jacobs [Thu, 12 Feb 2015 14:56:58 +0000 (15:56 +0100)]
rigol-ds: SR_CONF_TRIGGER_SLOPE is actually listable.

9 years agoinput/vcd: fix parse_header() return value check.
Aurelien Jacobs [Thu, 12 Feb 2015 10:30:52 +0000 (11:30 +0100)]
input/vcd: fix parse_header() return value check.

Mixing tests for both a boolean and an SR_ERR at the same time is not
really a good idea.
parse_header() actually returns a boolean so only check if it returns FALSE.

This fixes the following gcc-5 warning:

src/input/vcd.c: In function 'receive':
src/input/vcd.c:506:34: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
   if (!parse_header(in, in->buf) != SR_OK)
                                  ^

9 years agoRemove the inline qualification from sr_rational_set().
Aurelien Jacobs [Thu, 12 Feb 2015 10:24:11 +0000 (11:24 +0100)]
Remove the inline qualification from sr_rational_set().

Inlining can only happen in the same compilation unit where the
function was defined, so there is no sense declaring an inline
function in a header if this function is not defined in this
same header.

This fixes the following gcc-5 warning:

In file included from include/libsigrok/libsigrok.h:1066:0,
                 from src/version.c:21:
include/libsigrok/proto.h:36:20: warning: inline function 'sr_rational_set' declared but never defined
 SR_API inline void sr_rational_set(struct sr_rational *r, uint64_t p, uint64_t q);
                    ^

9 years agoCorrectly copy sr_datafeed_meta in sr_packet_copy().
Aurelien Jacobs [Thu, 12 Feb 2015 10:14:37 +0000 (11:14 +0100)]
Correctly copy sr_datafeed_meta in sr_packet_copy().

Commit 5801d558 replaced g_slist_copy_deep() by some incorrect code
that actually leaks the newly allocated memory, instead of doing
a deep copy.

This new version should be more correct, more concise, and it fixes
the following warning:

src/session.c: In function 'sr_packet_copy':
src/session.c:1025:38: warning: passing argument 2 of 'g_slist_foreach' from incompatible pointer type [-Wincompatible-pointer-types]
   g_slist_foreach(meta_copy->config, (GCopyFunc)copy_src, NULL);
                                         ^
In file included from /usr/include/glib-2.0/glib/gmain.h:26:0,
                 from /usr/include/glib-2.0/glib/giochannel.h:33,
                 from /usr/include/glib-2.0/glib.h:54,
                 from src/session.c:24:
/usr/include/glib-2.0/glib/gslist.h:125:10: note: expected 'GFunc {aka void (*)(void *, void *)}' but argument is of type 'void * (*)(const void *, void *)'
void     g_slist_foreach                 (GSList           *list,
         ^

9 years agosr_strerror_name(): Add missing SR_ERR_IO entry.
Uwe Hermann [Wed, 11 Feb 2015 15:26:12 +0000 (16:26 +0100)]
sr_strerror_name(): Add missing SR_ERR_IO entry.

9 years agoSR_ERR_IO: new error code
Bartosz Golaszewski [Mon, 9 Feb 2015 17:31:14 +0000 (18:31 +0100)]
SR_ERR_IO: new error code

Add new error code which can be used to notify the user about
general input/output errors.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agoconfigure.ac: Add AC_CANONICAL_SYSTEM macro.
Bartosz Golaszewski [Mon, 9 Feb 2015 17:31:09 +0000 (18:31 +0100)]
configure.ac: Add AC_CANONICAL_SYSTEM macro.

In order to determine the target OS when cross-compiling libsigrok
we need autotools to set the 'target_os' variable. This macro
determines the system type and sets output variables to the names
of the canonical system types.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agobackend: Add basic transform module sanity checks.
Uwe Hermann [Tue, 10 Feb 2015 21:55:41 +0000 (22:55 +0100)]
backend: Add basic transform module sanity checks.

9 years agotransform: Add a few basic unit tests.
Uwe Hermann [Tue, 10 Feb 2015 21:47:36 +0000 (22:47 +0100)]
transform: Add a few basic unit tests.

9 years agotransform: Add an "invert" transform module.
Uwe Hermann [Wed, 11 Feb 2015 08:34:38 +0000 (09:34 +0100)]
transform: Add an "invert" transform module.

This inverts the data values:

 - An analog value of x becomes 1/x.

 - A digital value of 0 becomes 1 (and vice versa).

9 years agotransform: Add a "scale" transform module.
Uwe Hermann [Tue, 10 Feb 2015 21:25:52 +0000 (22:25 +0100)]
transform: Add a "scale" transform module.

9 years agotransform: Add a "nop" transform module.
Uwe Hermann [Tue, 10 Feb 2015 20:38:21 +0000 (21:38 +0100)]
transform: Add a "nop" transform module.

This doesn't do anything, just passes input packets on unmodified.

9 years agotransform: Hook up transforms.
Uwe Hermann [Tue, 10 Feb 2015 20:24:23 +0000 (21:24 +0100)]
transform: Hook up transforms.

9 years agotransform: Add a basic set of API calls.
Uwe Hermann [Tue, 10 Feb 2015 19:49:46 +0000 (20:49 +0100)]
transform: Add a basic set of API calls.

9 years agotransform: Add struct sr_transform and struct sr_transform_module.
Uwe Hermann [Tue, 10 Feb 2015 19:42:50 +0000 (20:42 +0100)]
transform: Add struct sr_transform and struct sr_transform_module.

9 years agoFix problem building with BSD make
Uffe Jakobsen [Tue, 10 Feb 2015 13:09:28 +0000 (14:09 +0100)]
Fix problem building with BSD make

This fixes bug #556:

Bug 556 - libsigrok fails to build with BSD Make

9 years agoMakefile.am: Add NEED_SERIAL condition.
Uwe Hermann [Sat, 31 Jan 2015 21:41:04 +0000 (22:41 +0100)]
Makefile.am: Add NEED_SERIAL condition.

9 years agoMakefile.am: Unconditionally build src/lcr/es51919.c.
Uwe Hermann [Sat, 31 Jan 2015 21:29:07 +0000 (22:29 +0100)]
Makefile.am: Unconditionally build src/lcr/es51919.c.

We do the same with DMM parsers currently, and this change also
fixes an issue in sigrok-util's 'new-driver' script.

This fixes bug #545.

9 years agoUpdate list of files ignored by git
Daniel Elstner [Sat, 31 Jan 2015 20:08:14 +0000 (21:08 +0100)]
Update list of files ignored by git

9 years agoconfigure: Avoid bashism breaking the C++ bindings
Daniel Elstner [Sat, 31 Jan 2015 20:07:28 +0000 (21:07 +0100)]
configure: Avoid bashism breaking the C++ bindings

9 years agosysclk-lwla: Widen constant to 64 bit before shifting
Daniel Elstner [Sat, 31 Jan 2015 20:04:14 +0000 (21:04 +0100)]
sysclk-lwla: Widen constant to 64 bit before shifting

(lwla_convert_trigger): Fix trigger mask computation bug introduced
by recent change:  Widen constant to 64 bit before shifting so that
channel nunmbers beyond 32 are processed correctly.

9 years agoLower dependency to glib 2.32.
Uwe Hermann [Thu, 29 Jan 2015 07:51:31 +0000 (08:51 +0100)]
Lower dependency to glib 2.32.

By avoiding g_slist_copy_deep() for now, we can easily allow libsigrok
to build against glib 2.32 (less hassle for users of stable/older
distros or OSes).

9 years agooutput/gnuplot: Use .dat as suggested file extension.
Uwe Hermann [Tue, 27 Jan 2015 08:00:34 +0000 (09:00 +0100)]
output/gnuplot: Use .dat as suggested file extension.

Gnuplot doesn't have any "official" file name extension(s). It uses
(at least) two different types of files basically:

 - "control files": These can have many different somewhat commonly
   used extensions such as .gpi, .gnu, .gnuplot, .gp, .plt, .gih,
   others. These files don't contain data, only Gnuplot commands such
   as 'set yrange [75:105]', 'set ylabel "foo" offset 1', and so on.

 - "data files": This is what libsigrok reads and writes. These files
   contain actual data to be graphed by Gnuplot (with the help of a
   specially-crafted control file, see above). The data is usually in
   a tab-separated format. The common file extension is usually .dat,
   though many others are possible as well.

9 years agoin/out: Minor consistency renames.
Uwe Hermann [Tue, 27 Jan 2015 07:33:51 +0000 (08:33 +0100)]
in/out: Minor consistency renames.

 - 'struct sr_input *' variables are consistently named 'in'.
 - 'struct sr_input_module *' variables are consistently named 'imod'.

 - 'struct sr_output *' variables are consistently named 'o'.
 - 'struct sr_output_module *' variables are consistently named 'omod'.

9 years agooutput/wav: Improved description
Joel Holdsworth [Wed, 21 Jan 2015 06:02:37 +0000 (01:02 -0500)]
output/wav: Improved description

9 years agooutput: Added preferred file extension field
Joel Holdsworth [Wed, 21 Jan 2015 06:02:14 +0000 (01:02 -0500)]
output: Added preferred file extension field

This fixes parts of bug #541.

9 years agoinput: Added preferred file extension field
Joel Holdsworth [Wed, 21 Jan 2015 05:56:51 +0000 (00:56 -0500)]
input: Added preferred file extension field

This fixes parts of bug #541.

9 years agocxx: Fix a linking issue.
Uwe Hermann [Mon, 26 Jan 2015 14:26:15 +0000 (15:26 +0100)]
cxx: Fix a linking issue.

Fix "undefined reference to `sigrok::EnumValue<sigrok::LogLevel,
sr_loglevel>::_values'", which happens at least when using clang(++),
e.g. on Linux, Mac OS X, or FreeBSD.

This fixes bug #534.

Thanks to Uffe Jakobsen and Martin Ling for reporting and investigating!

9 years agoFix FreeBSD issue with libusb_get_port_numbers()
Uffe Jakobsen [Thu, 22 Jan 2015 00:11:22 +0000 (01:11 +0100)]
Fix FreeBSD issue with libusb_get_port_numbers()

Currently (as of date 20150122) an ioctl problem within the
FreeBSD kernel is preventing libusb_get_port_numbers() from working.
Hence calls to libusb_get_port_numbers() will always return 0.
This makes it impossible to establish a physical path the the usb device.

This problem has existed "forever" -
meaning that libusb_get_port_numbers() has never worked.

A fix is committed to FreeBSD "current" head  -
and will later be merged (MFC'ed) to maintenance branches.
See: https://svnweb.freebsd.org/base?view=revision&revision=277417

Additionally FreeBSD requires that devices prior to calling
libusb_get_port_numbers() have been opened with libusb_open().

The patch is "forwards-compatible".
Currently it acts specificly to libusb_get_port_numbers()
currently returning 0 on FreeBSD.
In these situations it constructs an artificial path to the device.
When FreeBSD kernels appears with proper working ioctl
supporting libusb_get_port_numbers() the code will construct
proper physical paths for newer kernels - while still generating
artificial physical paths for older defective kernels.

9 years agodemo: implement averaging support
Bartosz Golaszewski [Thu, 22 Jan 2015 09:22:59 +0000 (10:22 +0100)]
demo: implement averaging support

Add support for averaging and avg_samples option to the demo device.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agonew config options: averaging
Bartosz Golaszewski [Thu, 22 Jan 2015 09:22:58 +0000 (10:22 +0100)]
new config options: averaging

Add new config options to libsigrok - 'averaging', which allows to
enable averaging of samples and 'avg_samples' for setting the number
of samples to be averaged over in each cycle.

Signed-off-by: Bartosz Golaszewski <redacted>
9 years agoCheck for librevisa >= 0.0.20130412 - the latest official release
Uffe Jakobsen [Fri, 23 Jan 2015 22:55:14 +0000 (23:55 +0100)]
Check for librevisa >= 0.0.20130412 - the latest official release

9 years agosr_input_new(): Add missing @param comment.
Uwe Hermann [Sun, 18 Jan 2015 15:02:54 +0000 (16:02 +0100)]
sr_input_new(): Add missing @param comment.

This fixes a Doxygen warning:

  src/input/input.c:209: warning: The following parameters of sr_input_new(const struct sr_input_module *imod, GHashTable *options) are not documented:
    parameter 'imod'

9 years agoC++: Fix segfault where input/output options are NULL.
Martin Ling [Sun, 18 Jan 2015 22:43:02 +0000 (22:43 +0000)]
C++: Fix segfault where input/output options are NULL.

9 years agoFix two warnings when libserialport is not used.
Uwe Hermann [Sat, 17 Jan 2015 20:47:59 +0000 (21:47 +0100)]
Fix two warnings when libserialport is not used.

    CC       src/fallback.lo
  src/fallback.c: In function 'sr_serial_list':
  src/fallback.c:26:59: warning: unused parameter 'driver' [-Wunused-parameter]
   SR_API GSList *sr_serial_list(const struct sr_dev_driver *driver)
                                                             ^
  src/fallback.c: In function 'sr_serial_free':
  src/fallback.c:31:51: warning: unused parameter 'serial' [-Wunused-parameter]
   SR_API void sr_serial_free(struct sr_serial_port *serial)

9 years agoInstall libsigrokcxx headers in separate directory.
Uwe Hermann [Sat, 17 Jan 2015 19:29:05 +0000 (20:29 +0100)]
Install libsigrokcxx headers in separate directory.

Don't mix libsigrokcxx header files into the $prefix/include/libsigrok
directory. Use a separate $prefix/include/libsigrokcxx instead.

9 years agocxx: Rename include/libsigrok/ to include/libsigrokcxx/.
Uwe Hermann [Sat, 17 Jan 2015 19:11:53 +0000 (20:11 +0100)]
cxx: Rename include/libsigrok/ to include/libsigrokcxx/.

9 years agoRename libsigrok.hpp to libsigrokcxx.hpp.
Uwe Hermann [Sat, 17 Jan 2015 19:05:15 +0000 (20:05 +0100)]
Rename libsigrok.hpp to libsigrokcxx.hpp.

This avoids confusion of libsigrok.h vs. libsigrok.hpp and makes it
clearer that this is the main libsigrokcxx header.

9 years agolibsigrok.hpp: Fix incorrect glibmm.h #include.
Uwe Hermann [Sat, 17 Jan 2015 18:59:44 +0000 (19:59 +0100)]
libsigrok.hpp: Fix incorrect glibmm.h #include.

As per upstream docs "#include <glibmm.h>" is the correct usage,
the "glibmm-2.4" directory is handled correctly via pkg-config:

 $ pkg-config --cflags glibmm-2.4
 -I/usr/include/glibmm-2.4 [...]

9 years agolibsigrokcxx: Drop Requires.private entry.
Uwe Hermann [Sat, 17 Jan 2015 18:53:44 +0000 (19:53 +0100)]
libsigrokcxx: Drop Requires.private entry.

libsigrokcxx.pc has a "Requires" field listing "libsigrok" which
will cause libsigrok's "Requires.private" entries to be used/inherited
when 'pkg-config --libs --static libsigrokcxx' is used.

9 years agoRename libsigrokxx to the more common libsigrokcxx.
Uwe Hermann [Sat, 17 Jan 2015 17:49:04 +0000 (18:49 +0100)]
Rename libsigrokxx to the more common libsigrokcxx.

9 years agoMakefile.am: Use $(MKDIR_P) everywhere.
Uwe Hermann [Mon, 12 Jan 2015 00:19:12 +0000 (01:19 +0100)]
Makefile.am: Use $(MKDIR_P) everywhere.

9 years agoscpi: Fix incomplete data issue for e.g. Hameg HMO1024.
Mathias Katzer [Sun, 11 Jan 2015 00:40:28 +0000 (01:40 +0100)]
scpi: Fix incomplete data issue for e.g. Hameg HMO1024.

On a Hameg HMO1024 you get incomplete data because the USB transfer takes
longer than the scpi->read_timeout_ms of 1 second that is defined in
scpi_dev_inst_new(). Therefore reset the timeout in sr_scpi_get_string()
whenever the device sends a partial response.

9 years agohameg-hmo: Fix double-free issue.
Mathias Katzer [Sun, 11 Jan 2015 00:39:41 +0000 (01:39 +0100)]
hameg-hmo: Fix double-free issue.

9 years agohameg-hmo: Set SR_CONF_GET | SR_CONF_SET for frame limit.
Mathias Katzer [Sun, 11 Jan 2015 00:38:20 +0000 (01:38 +0100)]
hameg-hmo: Set SR_CONF_GET | SR_CONF_SET for frame limit.

Reading analog data from an HMO1024 (Firmware 04.527) failed because the
frame limit could not be set.