param add status

This commit is contained in:
Daniel Agar
2019-01-12 14:47:58 -05:00
parent 84724d5e1d
commit 658d734068
4 changed files with 87 additions and 8 deletions

View File

@@ -136,6 +136,8 @@ $ reboot
PRINT_MODULE_USAGE_PARAM_FLAG('q', "quiet mode, print only param value (name needs to be exact)", true);
PRINT_MODULE_USAGE_ARG("<filter>", "Filter by param name (wildcard at end allowed, eg. sys_*)", true);
PRINT_MODULE_USAGE_COMMAND_DESCR("status", "Print status of parameter system");
PRINT_MODULE_USAGE_COMMAND_DESCR("set", "Set parameter to a value");
PRINT_MODULE_USAGE_ARG("<param_name> <value>", "Parameter name and value to set", false);
PRINT_MODULE_USAGE_ARG("fail", "If provided, let the command fail if param is not found", true);
@@ -245,6 +247,11 @@ param_main(int argc, char *argv[])
}
}
if (!strcmp(argv[1], "status")) {
param_print_status();
return PX4_OK;
}
if (!strcmp(argv[1], "set")) {
if (argc >= 5) {