]> sigrok.org Git - sigrok-cli.git/log
sigrok-cli.git
11 years agoMore GVariant conversions
Bert Vermeulen [Sun, 31 Mar 2013 08:21:11 +0000 (10:21 +0200)]
More GVariant conversions

11 years agofix options setting to use GVariant
Bert Vermeulen [Sat, 30 Mar 2013 14:44:56 +0000 (15:44 +0100)]
fix options setting to use GVariant

11 years agoavoid deprecated struct sr_rational
Bert Vermeulen [Sat, 30 Mar 2013 14:28:28 +0000 (15:28 +0100)]
avoid deprecated struct sr_rational

11 years agoMore GVariant conversions
Bert Vermeulen [Tue, 26 Mar 2013 21:09:28 +0000 (22:09 +0100)]
More GVariant conversions

11 years agoAdjust to GVariant-based sr_config_* functions
Bert Vermeulen [Mon, 25 Mar 2013 19:55:42 +0000 (20:55 +0100)]
Adjust to GVariant-based sr_config_* functions

11 years agofix time-based limit logic
Bert Vermeulen [Tue, 19 Mar 2013 15:20:08 +0000 (16:20 +0100)]
fix time-based limit logic

11 years agouse new libsigrok GVariant-based option/probe passing
Bert Vermeulen [Tue, 19 Mar 2013 00:57:52 +0000 (01:57 +0100)]
use new libsigrok GVariant-based option/probe passing

11 years agoREADME: Refer to INSTALL and new Building wiki page.
Uwe Hermann [Sun, 17 Mar 2013 12:02:09 +0000 (13:02 +0100)]
README: Refer to INSTALL and new Building wiki page.

11 years agoautotools: Don't use "foreign" option.
Uwe Hermann [Sun, 17 Mar 2013 12:09:35 +0000 (13:09 +0100)]
autotools: Don't use "foreign" option.

This adds INSTALL and allows for a few more sanity checks being done.

11 years agoshow SR_CONF_SAMPLE_INTERVAL (debug)
Bert Vermeulen [Sat, 16 Mar 2013 20:51:32 +0000 (21:51 +0100)]
show SR_CONF_SAMPLE_INTERVAL (debug)

11 years agomake libsigrokdecode optional
Bert Vermeulen [Tue, 12 Mar 2013 21:49:16 +0000 (22:49 +0100)]
make libsigrokdecode optional

Only if you really need to compile without libsigrokdecode.

11 years agosupport for live status of SR_CONF_DATALOG
Bert Vermeulen [Mon, 11 Mar 2013 15:30:14 +0000 (16:30 +0100)]
support for live status of SR_CONF_DATALOG

11 years agoadd --set option
Bert Vermeulen [Mon, 11 Mar 2013 15:29:27 +0000 (16:29 +0100)]
add --set option

11 years agodump obsolete multiple-device leftover code
Bert Vermeulen [Mon, 11 Mar 2013 14:32:45 +0000 (15:32 +0100)]
dump obsolete multiple-device leftover code

11 years agofix SR_DF_END flow
Bert Vermeulen [Tue, 5 Mar 2013 20:48:34 +0000 (21:48 +0100)]
fix SR_DF_END flow

Output modules were getting SR_DF_END after their object was already
free()d, and the output channel closed.

11 years agoproperly check for result after output module data()
Bert Vermeulen [Tue, 5 Mar 2013 20:31:50 +0000 (21:31 +0100)]
properly check for result after output module data()

11 years agouse input API properly
Bert Vermeulen [Fri, 22 Feb 2013 21:21:39 +0000 (22:21 +0100)]
use input API properly

11 years agoUpdate, fix, and extend manpage.
Uwe Hermann [Tue, 5 Feb 2013 17:23:02 +0000 (18:23 +0100)]
Update, fix, and extend manpage.

 - Probe indices start at 0 now (not 1).
 - Update manpage date.
 - Mention the 'analog' output format.
 - Various smaller cosmetic fixes.
 - Add more examples for some options.
 - Document all possible suffixes for --time/--samples values.
 - Mention the PulseView(1) manpage in "SEE ALSO".
 - Mention Bugzilla for bugreports.

11 years agoUse sr_dev_has_option() where appropriate.
Bert Vermeulen [Fri, 25 Jan 2013 19:42:43 +0000 (20:42 +0100)]
Use sr_dev_has_option() where appropriate.

11 years agoUse sr_dev_has_option().
Bert Vermeulen [Fri, 25 Jan 2013 15:21:04 +0000 (16:21 +0100)]
Use sr_dev_has_option().

11 years agoUse sr_config_get().
Bert Vermeulen [Fri, 25 Jan 2013 14:49:21 +0000 (15:49 +0100)]
Use sr_config_get().

11 years agoUse sr_config_set()
Bert Vermeulen [Fri, 25 Jan 2013 14:39:24 +0000 (15:39 +0100)]
Use sr_config_set()

11 years agoDeprecate SR_DI_HWOPTS.
Bert Vermeulen [Fri, 25 Jan 2013 14:10:22 +0000 (15:10 +0100)]
Deprecate SR_DI_HWOPTS.

11 years agoDeprecate SR_DI_HWCAPS.
Bert Vermeulen [Fri, 25 Jan 2013 14:02:30 +0000 (15:02 +0100)]
Deprecate SR_DI_HWCAPS.

11 years agoDeprecate SR_DI_TRIGGER_TYPES.
Bert Vermeulen [Fri, 25 Jan 2013 10:52:55 +0000 (11:52 +0100)]
Deprecate SR_DI_TRIGGER_TYPES.

11 years agoDeprecate SR_DI_TRIGGER_SOURCES.
Bert Vermeulen [Fri, 25 Jan 2013 10:26:59 +0000 (11:26 +0100)]
Deprecate SR_DI_TRIGGER_SOURCES.

11 years agoDeprecate SR_DI_TIMEBASES.
Bert Vermeulen [Fri, 25 Jan 2013 10:22:38 +0000 (11:22 +0100)]
Deprecate SR_DI_TIMEBASES.

11 years agoDeprecate SR_DI_FILTERS.
Bert Vermeulen [Fri, 25 Jan 2013 10:20:01 +0000 (11:20 +0100)]
Deprecate SR_DI_FILTERS.

11 years agoDeprecate SR_DI_VDIVS.
Bert Vermeulen [Fri, 25 Jan 2013 10:15:47 +0000 (11:15 +0100)]
Deprecate SR_DI_VDIVS.

11 years agoDeprecate SR_DI_COUPLING.
Bert Vermeulen [Fri, 25 Jan 2013 10:04:57 +0000 (11:04 +0100)]
Deprecate SR_DI_COUPLING.

11 years agoDeprecate SR_DI_BUFFERSIZES.
Bert Vermeulen [Fri, 25 Jan 2013 10:00:53 +0000 (11:00 +0100)]
Deprecate SR_DI_BUFFERSIZES.

11 years agoDeprecate SR_DI_PATTERNS.
Bert Vermeulen [Fri, 25 Jan 2013 02:39:18 +0000 (03:39 +0100)]
Deprecate SR_DI_PATTERNS.

11 years agoDeprecate SR_DI_CUR_SAMPLERATE.
Bert Vermeulen [Fri, 25 Jan 2013 02:18:27 +0000 (03:18 +0100)]
Deprecate SR_DI_CUR_SAMPLERATE.

11 years agodeprecate SR_DI_SAMPLERATES
Bert Vermeulen [Fri, 25 Jan 2013 02:04:59 +0000 (03:04 +0100)]
deprecate SR_DI_SAMPLERATES

11 years agoUse new SR_CONF_* keys.
Bert Vermeulen [Mon, 21 Jan 2013 22:24:18 +0000 (23:24 +0100)]
Use new SR_CONF_* keys.

11 years agoUse new sr_config_info*_get() calls.
Bert Vermeulen [Mon, 21 Jan 2013 21:00:29 +0000 (22:00 +0100)]
Use new sr_config_info*_get() calls.

11 years agohandle meta packets, specifically SR_HWCAP_SAMPLERATE
Bert Vermeulen [Sun, 20 Jan 2013 14:29:28 +0000 (15:29 +0100)]
handle meta packets, specifically SR_HWCAP_SAMPLERATE

It's actually unused, but a good example of how to handle these.

11 years agouse new sr_config struct
Bert Vermeulen [Sun, 20 Jan 2013 04:55:36 +0000 (05:55 +0100)]
use new sr_config struct

11 years agoupdate to newer options
Bert Vermeulen [Sun, 20 Jan 2013 04:20:55 +0000 (05:20 +0100)]
update to newer options

11 years agoMakefile.am: Fix typo in 'ChangeLog' target.
Uwe Hermann [Mon, 14 Jan 2013 10:17:20 +0000 (11:17 +0100)]
Makefile.am: Fix typo in 'ChangeLog' target.

11 years agodon't use the obsolete datastore.
Bert Vermeulen [Tue, 8 Jan 2013 13:11:49 +0000 (14:11 +0100)]
don't use the obsolete datastore.

This also removes the 64-probe limit.

Additionally, sigrok-cli now no longer requires a meta packet to be sent;
this was an entirely avoidable limitation.

11 years agoparserc.c: Fix memory leak from g_strsplit
Alexandru Gagniuc [Wed, 19 Dec 2012 07:31:58 +0000 (01:31 -0600)]
parserc.c: Fix memory leak from g_strsplit

g_strsplit() returns a newly-allocated NULL-terminated array of strings.
g_strfreev() must be used to free it, once it is no longer needed.

The probe 'names' were not freed properly, causing a "definitely lost" memory
leak.

Call g_strfreev(names) to properly free the memory.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agosigrok-cli.c: Fix memory leak in parsing of hardware options
Alexandru Gagniuc [Thu, 20 Dec 2012 03:53:51 +0000 (21:53 -0600)]
sigrok-cli.c: Fix memory leak in parsing of hardware options

During parsing of hardware options, hash_to_hwopt() creates a GSList that is
passed to device_scan(). The list is discarded by device_scan() and never freed.
This is identified by valgrind as "definitely lost".

Call g_slist_free_full() on the list when it is no longer needed.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoCorrected a comment typo
Joel Holdsworth [Thu, 27 Dec 2012 12:08:51 +0000 (12:08 +0000)]
Corrected a comment typo

11 years agoclean up unused code
Bert Vermeulen [Tue, 1 Jan 2013 12:00:33 +0000 (13:00 +0100)]
clean up unused code

11 years agouse constified SRD decoder list
Bert Vermeulen [Tue, 1 Jan 2013 11:59:33 +0000 (12:59 +0100)]
use constified SRD decoder list

11 years agofix device-specific options setting
Bert Vermeulen [Fri, 28 Dec 2012 22:42:28 +0000 (23:42 +0100)]
fix device-specific options setting

11 years agoconfigure.ac: Fix CFLAGS settings.
Uwe Hermann [Fri, 28 Dec 2012 16:30:56 +0000 (17:30 +0100)]
configure.ac: Fix CFLAGS settings.

Don't override/overwrite CFLAGS in configure.ac, but rather amend it
with (currently) "-Wall -Wextra".

This properly allows users/packagers to do things like:

 ./configure (this will default to using "-g -O2" additionally)

 CFLAGS="-g -O2" ./configure (same as above)

 CFLAGS="" ./configure (no additional flags)

 CFLAGS="-g -O0" ./configure (disable optimization, e.g. for valgrind use)

 etc. etc.

11 years agoMake datafeed_in packet parameter a const pointer
Joel Holdsworth [Tue, 18 Dec 2012 20:31:39 +0000 (20:31 +0000)]
Make datafeed_in packet parameter a const pointer

This patch corresponds to bf53457d in libsigrok.

11 years agoAdd struct sr_context * to sr_driver_init() calls
Peter Stuge [Sun, 21 Oct 2012 18:43:32 +0000 (20:43 +0200)]
Add struct sr_context * to sr_driver_init() calls

libsigrok.git commit 193691ae1590eb31025d943ffbb0ea5c1047e6ca changes
the API of sr_driver_init() to take a struct sr_context * parameter as
allocated by sr_init().

Move our struct sr_context *sr_ctx out of main() into file global scope
so that it can be used easily in all calls to sr_driver_init().

12 years agoDrop unneeded comments.
Uwe Hermann [Sun, 11 Nov 2012 17:17:52 +0000 (18:17 +0100)]
Drop unneeded comments.

12 years agoAdd struct sr_context to the sr_init() and sr_exit() calls
Peter Stuge [Sun, 21 Oct 2012 18:43:32 +0000 (20:43 +0200)]
Add struct sr_context to the sr_init() and sr_exit() calls

libsigrok.git commit b8072700c1bc7d13ba004fd897668b56cec4ac62 adds
struct sr_context to the public API, and changes sr_init() and sr_exit()
to take a struct sr_context ** and struct sr_context * parameter,
respectively.

struct sr_context is opaque, and all sr_init() and sr_exit() calls must
be balanced.

Thanks to the new struct sr_context * the error path code flow can also
be simplifed, and allow a single point in main() to clean up after any
possible program state.

12 years agoChange main() to have only one exit code flow, used also on errors
Peter Stuge [Sun, 21 Oct 2012 18:52:41 +0000 (20:52 +0200)]
Change main() to have only one exit code flow, used also on errors

12 years agoMove sr_exit() in main() to correctly mirror order of initialization
Peter Stuge [Sun, 21 Oct 2012 18:55:35 +0000 (20:55 +0200)]
Move sr_exit() in main() to correctly mirror order of initialization

12 years agoRe-add HACKING file after repo split.
Uwe Hermann [Tue, 16 Oct 2012 12:56:43 +0000 (14:56 +0200)]
Re-add HACKING file after repo split.

12 years agoMerge branch 'master' of ssh://sigrok.org/data/git/sigrok-cli
Bert Vermeulen [Sun, 14 Oct 2012 12:59:11 +0000 (14:59 +0200)]
Merge branch 'master' of ssh://sigrok.org/data/git/sigrok-cli

12 years agomore compact display of probe list
Bert Vermeulen [Sun, 14 Oct 2012 12:58:30 +0000 (14:58 +0200)]
more compact display of probe list

12 years agodon't accept numbers as probe indexes in probe string
Bert Vermeulen [Sun, 14 Oct 2012 12:53:30 +0000 (14:53 +0200)]
don't accept numbers as probe indexes in probe string

Unless the driver actually names them by number -- but the comparison
is done by string now.

Syntax for --probes is unchanged; even a range like 0-7 still works,
but only if there really are probes named "0", "1" etc.

12 years agoREADME: Cosmetics, update URL.
Uwe Hermann [Wed, 10 Oct 2012 21:48:11 +0000 (23:48 +0200)]
README: Cosmetics, update URL.

12 years agoupdated URLs and description
Bert Vermeulen [Mon, 8 Oct 2012 20:01:53 +0000 (22:01 +0200)]
updated URLs and description

12 years agorestore pre-split ignores
Bert Vermeulen [Mon, 8 Oct 2012 19:59:40 +0000 (21:59 +0200)]
restore pre-split ignores

12 years agodevice detail now lists probes
Bert Vermeulen [Mon, 8 Oct 2012 19:52:41 +0000 (21:52 +0200)]
device detail now lists probes

12 years agocli: support for new output module API
Bert Vermeulen [Sat, 8 Sep 2012 01:04:55 +0000 (03:04 +0200)]
cli: support for new output module API

12 years agocli: fix driver option conversion
Bert Vermeulen [Sun, 2 Sep 2012 13:40:51 +0000 (15:40 +0200)]
cli: fix driver option conversion

12 years agocli: use --show for PD detail
Bert Vermeulen [Mon, 6 Aug 2012 10:23:52 +0000 (12:23 +0200)]
cli: use --show for PD detail

12 years agocli: obsolete SR_HWCAP_PROBECONFIG
Bert Vermeulen [Sun, 5 Aug 2012 22:23:29 +0000 (00:23 +0200)]
cli: obsolete SR_HWCAP_PROBECONFIG

12 years agocli: use new sr_dev_config_set() API call
Bert Vermeulen [Sun, 5 Aug 2012 13:54:43 +0000 (15:54 +0200)]
cli: use new sr_dev_config_set() API call

12 years agocli: don't try to set device options before opening it
Bert Vermeulen [Sun, 5 Aug 2012 01:33:58 +0000 (03:33 +0200)]
cli: don't try to set device options before opening it

12 years agocli: use new API calls instead of static option data
Bert Vermeulen [Sun, 5 Aug 2012 01:31:45 +0000 (03:31 +0200)]
cli: use new API calls instead of static option data

12 years agocli: rename sr_hw_hwcap_get() to sr_devopt_get()
Bert Vermeulen [Sat, 4 Aug 2012 12:36:09 +0000 (14:36 +0200)]
cli: rename sr_hw_hwcap_get() to sr_devopt_get()

12 years agocli: use new generic arg parser API
Bert Vermeulen [Fri, 3 Aug 2012 09:48:41 +0000 (11:48 +0200)]
cli: use new generic arg parser API

12 years agocli: don't call sr_session_stop() when SR_DF_END is seen
Bert Vermeulen [Thu, 2 Aug 2012 23:05:59 +0000 (01:05 +0200)]
cli: don't call sr_session_stop() when SR_DF_END is seen

This was effectively an infinite loop in some cases.

12 years agocli: fix session saving
Bert Vermeulen [Mon, 23 Jul 2012 14:20:23 +0000 (16:20 +0200)]
cli: fix session saving

12 years agocli: code cleanup
Bert Vermeulen [Mon, 23 Jul 2012 01:06:47 +0000 (03:06 +0200)]
cli: code cleanup

12 years agocli: use probe numbers starting from 0
Bert Vermeulen [Mon, 23 Jul 2012 01:03:07 +0000 (03:03 +0200)]
cli: use probe numbers starting from 0

12 years agocli: change to new struct sr_dev_inst based libsigrok API
Bert Vermeulen [Sun, 22 Jul 2012 18:16:46 +0000 (20:16 +0200)]
cli: change to new struct sr_dev_inst based libsigrok API

12 years agocli: remove dead code
Bert Vermeulen [Sun, 22 Jul 2012 14:55:26 +0000 (16:55 +0200)]
cli: remove dead code

12 years agocli: add --show option, and switch to new info_get driver API
Bert Vermeulen [Mon, 16 Jul 2012 01:12:27 +0000 (03:12 +0200)]
cli: add --show option, and switch to new info_get driver API

12 years agocli: add --driver option, and switch to new sr API scanner
Bert Vermeulen [Mon, 16 Jul 2012 01:00:56 +0000 (03:00 +0200)]
cli: add --driver option, and switch to new sr API scanner

12 years agocli: more flexible generic arg parser
Bert Vermeulen [Sun, 15 Jul 2012 23:03:30 +0000 (01:03 +0200)]
cli: more flexible generic arg parser

12 years agoAllow setting samplerate when reading binary files
Tomaž Šolc [Wed, 4 Jul 2012 14:29:13 +0000 (16:29 +0200)]
Allow setting samplerate when reading binary files

I had a binary file that I needed to decode using UART decoder. UART
decoder needs to know the sample rate for the data, but currently it's
not possible to pass parameters to input formats and so the "binary"
file format always sets the samplerate to 0.

This patch adds the possibility to append a colon-separated list of
key=value options to the -I argument, in the same way -d supports it.
Also, it makes the "binary" format support the "samplerate" option.

I included the GHashTable containing input format options directly in
the sr_input struct. I'm not sure if that's the right way to do it. I
saw that -d uses a much more elaborate system with device capabilities
and typed options, but that seemed like an overkill for input formats.

12 years agocli: Use sr_session_stop() instead of sr_session_halt()
Lars-Peter Clausen [Thu, 5 Jul 2012 19:15:10 +0000 (21:15 +0200)]
cli: Use sr_session_stop() instead of sr_session_halt()

Use sr_session_stop() instead of the deprecated sr_session_halt().

Signed-off-by: Lars-Peter Clausen <redacted>
12 years agocli: switch to new <libsigrok/libsigrok.h>
Bert Vermeulen [Wed, 4 Jul 2012 23:06:28 +0000 (01:06 +0200)]
cli: switch to new <libsigrok/libsigrok.h>

12 years agocli: flush output on write
Bert Vermeulen [Tue, 26 Jun 2012 21:25:36 +0000 (23:25 +0200)]
cli: flush output on write

12 years agocli: Fix typo in protocol decoder stacking example
Lars-Peter Clausen [Sun, 24 Jun 2012 08:58:32 +0000 (10:58 +0200)]
cli: Fix typo in protocol decoder stacking example

Probe assignments are separated by colon and not by comma.

Signed-off-by: Lars-Peter Clausen <redacted>
12 years agosr/srd/cli: require glib version >= 2.28
Bert Vermeulen [Fri, 22 Jun 2012 23:17:36 +0000 (01:17 +0200)]
sr/srd/cli: require glib version >= 2.28

Needed for g_get_monotonic_time(). Thanks to Tomaž Šolc.

12 years agocli: Add missing fflush(stdout) for PD annotation output.
Uwe Hermann [Fri, 22 Jun 2012 15:47:11 +0000 (17:47 +0200)]
cli: Add missing fflush(stdout) for PD annotation output.

This is required/helpful to be able to pipe sigrok-cli PD output into
other tools, like this:

  sigrok-cli -i ... -a ... | othertool

12 years agocli: use output API for analog and frame begin/end packets
Bert Vermeulen [Tue, 19 Jun 2012 00:13:21 +0000 (02:13 +0200)]
cli: use output API for analog and frame begin/end packets

12 years agocli: not doing sigrokdecode directly from analog data
Bert Vermeulen [Tue, 19 Jun 2012 00:08:29 +0000 (02:08 +0200)]
cli: not doing sigrokdecode directly from analog data

It's just a completely different can of beans.

12 years agocli: output API says to check data_out, not length_out
Bert Vermeulen [Tue, 12 Jun 2012 22:48:43 +0000 (00:48 +0200)]
cli: output API says to check data_out, not length_out

12 years agocli/gtk/qt: Now all require libsigrok >= 0.2.0 (API changes).
Uwe Hermann [Thu, 31 May 2012 22:23:47 +0000 (00:23 +0200)]
cli/gtk/qt: Now all require libsigrok >= 0.2.0 (API changes).

12 years agocli: strip off PD arguments before selecting for annotation
Bert Vermeulen [Thu, 31 May 2012 21:57:16 +0000 (23:57 +0200)]
cli: strip off PD arguments before selecting for annotation

This fixes the bug where -A didn't work if the PD in question had arguments.

12 years agosr: Made hwcap const
Joel Holdsworth [Mon, 7 May 2012 12:57:43 +0000 (13:57 +0100)]
sr: Made hwcap const

12 years agocli: support for SR_HWCAP_COUPLING
Bert Vermeulen [Thu, 17 May 2012 01:17:28 +0000 (03:17 +0200)]
cli: support for SR_HWCAP_COUPLING

12 years agocli: support SR_HWCAP_VDIV and the new SR_T_RATIONAL_VOLT type
Bert Vermeulen [Thu, 17 May 2012 00:03:46 +0000 (02:03 +0200)]
cli: support SR_HWCAP_VDIV and the new SR_T_RATIONAL_VOLT type

12 years agocli: use SR_T_RATIONAL_PERIOD
Bert Vermeulen [Wed, 16 May 2012 00:08:20 +0000 (02:08 +0200)]
cli: use SR_T_RATIONAL_PERIOD

12 years agocli: support for SR_HWCAP_FILTER and SR_DI_FILTERS
Bert Vermeulen [Tue, 15 May 2012 20:40:23 +0000 (22:40 +0200)]
cli: support for SR_HWCAP_FILTER and SR_DI_FILTERS

12 years agocli: parameter support various new HWCAPs and types
Bert Vermeulen [Tue, 15 May 2012 18:54:10 +0000 (20:54 +0200)]
cli: parameter support various new HWCAPs and types

12 years agocli: support for frames, and limiting capture by number of frames.
Bert Vermeulen [Mon, 30 Apr 2012 17:58:21 +0000 (19:58 +0200)]
cli: support for frames, and limiting capture by number of frames.

12 years agocli: use SR_DF_META_*, support for analog packets
Bert Vermeulen [Sun, 22 Apr 2012 22:27:30 +0000 (00:27 +0200)]
cli: use SR_DF_META_*, support for analog packets