From: Gerhard Sittig Date: Tue, 23 May 2017 17:41:41 +0000 (+0200) Subject: options: expand builtin help, discuss samples/time/continuous constraint X-Git-Tag: sigrok-cli-0.7.0~12 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=65c1ecf9045a87cfd87e0c7d87bf3ca2d7e60021;p=sigrok-cli.git options: expand builtin help, discuss samples/time/continuous constraint It might be surprising when the sigrok-cli(1) program does nothing (yet spends user noticable time) before quitting while it spews the --help text to the screen. Expand the builtin help text, explicitly mention that either of --samples or --frames or --time or --continuous are essentially required for data acquisition. --- diff --git a/options.c b/options.c index 4d39847..9c8dc8c 100644 --- a/options.c +++ b/options.c @@ -215,4 +215,16 @@ void show_help(void) g_free(help); g_option_context_free(context); + +#ifdef HAVE_SRD +#define SHOW_DECODER_TEXT "| -P " +#else +#define SHOW_DECODER_TEXT "" +#endif + printf("Example use, typical options:\n"); + printf(" -d --scan\n"); + printf(" -d { --samples N | --frames N | --time T | --continuous }\n"); + printf(" { -d | -I | -O %s} --show\n", SHOW_DECODER_TEXT); + printf(" See the manpage or the wiki for more details.\n"); + printf(" Note: --samples/--frames/--time/--continuous is required for acquisition.\n"); }