From: Uwe Hermann Date: Sat, 14 Apr 2018 16:47:49 +0000 (+0200) Subject: input modules: Improve option names and descriptions. X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=867293a1013eae2e9e14af23915facc676916214 input modules: Improve option names and descriptions. These should be slightly more useful and contain more information (should also work reasonably well for 'sigrok-cli --show' and as tooltips in UIs). --- diff --git a/src/input/binary.c b/src/input/binary.c index 01362137..52e1da36 100644 --- a/src/input/binary.c +++ b/src/input/binary.c @@ -153,8 +153,8 @@ static int reset(struct sr_input *in) } static struct sr_option options[] = { - { "numchannels", "Number of channels", "Number of channels", NULL, NULL }, - { "samplerate", "Sample rate", "Sample rate", NULL, NULL }, + { "numchannels", "Number of logic channels", "The number of (logic) channels in the data", NULL, NULL }, + { "samplerate", "Sample rate (Hz)", "The sample rate of the (logic) data in Hz", NULL, NULL }, ALL_ZERO }; diff --git a/src/input/chronovu_la8.c b/src/input/chronovu_la8.c index 531258ff..c654f242 100644 --- a/src/input/chronovu_la8.c +++ b/src/input/chronovu_la8.c @@ -164,8 +164,8 @@ static int reset(struct sr_input *in) } static struct sr_option options[] = { - { "numchannels", "Number of channels", "Number of channels", NULL, NULL }, - { "samplerate", "Sample rate", "Sample rate", NULL, NULL }, + { "numchannels", "Number of logic channels", "The number of (logic) channels in the data", NULL, NULL }, + { "samplerate", "Sample rate (Hz)", "The sample rate of the (logic) data in Hz", NULL, NULL }, ALL_ZERO }; diff --git a/src/input/csv.c b/src/input/csv.c index 000599a8..fc0e752c 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -911,15 +911,15 @@ static int reset(struct sr_input *in) } static struct sr_option options[] = { - { "single-column", "Single column", "Enable/specify single column", NULL, NULL }, - { "numchannels", "Max channels", "Number of channels", NULL, NULL }, - { "delimiter", "Delimiter", "Column delimiter", NULL, NULL }, - { "format", "Format", "Numeric format", NULL, NULL }, - { "comment", "Comment", "Comment prefix character", NULL, NULL }, - { "samplerate", "Samplerate", "Samplerate used during capture", NULL, NULL }, - { "first-channel", "First channel", "Column number of first channel", NULL, NULL }, - { "header", "Header", "Treat first line as header with channel names", NULL, NULL }, - { "startline", "Start line", "Line number at which to start processing samples", NULL, NULL }, + { "single-column", "Single column", "Enable single-column mode, using the specified column (>= 1); 0: multi-col. mode", NULL, NULL }, + { "numchannels", "Number of logic channels", "The number of (logic) channels (single-col. mode: number of bits beginning at 'first channel', LSB-first)", NULL, NULL }, + { "delimiter", "Column delimiter", "The column delimiter (>= 1 characters)", NULL, NULL }, + { "format", "Data format (single-col. mode)", "The numeric format of the data (single-col. mode): bin, hex, oct", NULL, NULL }, + { "comment", "Comment character(s)", "The comment prefix character(s)", NULL, NULL }, + { "samplerate", "Samplerate (Hz)", "The sample rate (used during capture) in Hz", NULL, NULL }, + { "first-channel", "First channel", "The column number of the first channel (multi-col. mode); bit position for the first channel (single-col. mode)", NULL, NULL }, + { "header", "Interpret first line as header (multi-col. mode)", "Treat the first line as header with channel names (multi-col. mode)", NULL, NULL }, + { "startline", "Start line", "The line number at which to start processing samples (>= 1)", NULL, NULL }, ALL_ZERO }; diff --git a/src/input/raw_analog.c b/src/input/raw_analog.c index 68ac1c95..ca29eaa4 100644 --- a/src/input/raw_analog.c +++ b/src/input/raw_analog.c @@ -233,9 +233,9 @@ static int end(struct sr_input *in) } static struct sr_option options[] = { - { "numchannels", "Number of channels", "Number of channels", NULL, NULL }, - { "samplerate", "Sample rate", "Sample rate", NULL, NULL }, - { "format", "Format", "Numeric format", NULL, NULL }, + { "numchannels", "Number of analog channels", "The number of (analog) channels in the data", NULL, NULL }, + { "samplerate", "Sample rate (Hz)", "The sample rate of the (analog) data in Hz", NULL, NULL }, + { "format", "Data format", "The format of the data (data type, signedness, endianness)", NULL, NULL }, ALL_ZERO }; @@ -281,7 +281,7 @@ static int reset(struct sr_input *in) SR_PRIV struct sr_input_module input_raw_analog = { .id = "raw_analog", .name = "RAW analog", - .desc = "analog signals without header", + .desc = "Raw analog signals without header", .exts = (const char*[]){"raw", "bin", NULL}, .options = get_options, .init = init, diff --git a/src/input/trace32_ad.c b/src/input/trace32_ad.c index 7817457f..121688c5 100644 --- a/src/input/trace32_ad.c +++ b/src/input/trace32_ad.c @@ -787,7 +787,7 @@ static struct sr_option options[] = { { "podN", "Import pod N", "Create channels and data for pod N", NULL, NULL }, { "podO", "Import pod O", "Create channels and data for pod O", NULL, NULL }, - { "samplerate", "Reduced sample rate in MHz", "Reduced sample rate in MHz", NULL, NULL }, + { "samplerate", "Reduced sample rate (MHz)", "Reduce the original sample rate of 12.8 GHz to the specified sample rate in MHz", NULL, NULL }, ALL_ZERO }; diff --git a/src/input/vcd.c b/src/input/vcd.c index bf203193..c0312689 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -625,10 +625,11 @@ static int reset(struct sr_input *in) } static struct sr_option options[] = { - { "numchannels", "Number of channels", "Number of channels", NULL, NULL }, - { "skip", "Skip", "Skip until timestamp", NULL, NULL }, - { "downsample", "Downsample", "Divide samplerate by factor", NULL, NULL }, - { "compress", "Compress", "Compress idle periods longer than this value", NULL, NULL }, + { "numchannels", "Number of logic channels", "The number of (logic) channels in the data", NULL, NULL }, + { "skip", "Skip samples until timestamp", "Skip samples until the specified timestamp; " + "< 0: Skip until first timestamp listed; 0: Don't skip", NULL, NULL }, + { "downsample", "Downsampling factor", "Downsample, i.e. divide the samplerate by the specified factor", NULL, NULL }, + { "compress", "Compress idle periods", "Compress idle periods longer than the specified value", NULL, NULL }, ALL_ZERO };