diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-03-22 23:16:22 -0700 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-03-28 13:07:01 -0700 |
commit | 4c6ddf93724e51d8af914671bfd1090f42ce09a6 (patch) | |
tree | 7d2a1e61b35c15191c8eb48f8902daa25c710c92 /src/systemcmds/param | |
parent | d6f7c9b8b4a9531aa77c65e106093380e3300d07 (diff) | |
download | px4-firmware-4c6ddf93724e51d8af914671bfd1090f42ce09a6.tar.gz px4-firmware-4c6ddf93724e51d8af914671bfd1090f42ce09a6.tar.bz2 px4-firmware-4c6ddf93724e51d8af914671bfd1090f42ce09a6.zip |
Param command: Add functionality to view active params
Diffstat (limited to 'src/systemcmds/param')
-rw-r--r-- | src/systemcmds/param/param.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/systemcmds/param/param.c b/src/systemcmds/param/param.c index 36a00c0f0..6b855cf58 100644 --- a/src/systemcmds/param/param.c +++ b/src/systemcmds/param/param.c @@ -235,8 +235,9 @@ do_import(const char *param_file_name) static void do_show(const char *search_string) { - printf(" + = saved, * = unsaved\n"); + printf("Symbols: x = used, + = saved, * = unsaved\n"); param_foreach(do_show_print, (char *)search_string, false, false); + printf("\n %u parameters total, %u used.\n", param_count(), param_count_used()); exit(0); } @@ -278,12 +279,12 @@ do_show_print(void *arg, param_t param) } /* the search string must have been consumed */ - if (!(*ss == '\0' || *ss == '*')) { + if (!(*ss == '\0' || *ss == '*') || *pp != '\0') { return; } } - printf("%c %s: ", + printf("%c %c %s: ", (param_used(param) ? 'x' : ' '), param_value_unsaved(param) ? '*' : (param_value_is_default(param) ? ' ' : '+'), param_name(param)); |