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).
This commit is contained in:
Uwe Hermann 2018-04-14 18:47:49 +02:00
parent d4b3f44fa7
commit 867293a101
6 changed files with 23 additions and 22 deletions

View File

@ -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
};

View File

@ -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
};

View File

@ -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
};

View File

@ -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,

View File

@ -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
};

View File

@ -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
};