Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
7b7836de
Commit
7b7836de
authored
7 years ago
by
Beat Küng
Browse files
Options
Downloads
Patches
Plain Diff
param command: update usage
parent
c1788c4e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/systemcmds/param/param.c
+44
-1
44 additions, 1 deletion
src/systemcmds/param/param.c
with
44 additions
and
1 deletion
src/systemcmds/param/param.c
+
44
−
1
View file @
7b7836de
...
...
@@ -40,6 +40,7 @@
*/
#include
<px4_config.h>
#include
<px4_module.h>
#include
<px4_posix.h>
#include
<errno.h>
...
...
@@ -89,6 +90,48 @@ static int do_reset(const char *excludes[], int num_excludes);
static
int
do_reset_nostart
(
const
char
*
excludes
[],
int
num_excludes
);
static
int
do_find
(
const
char
*
name
);
static
void
print_usage
(
void
)
{
PRINT_MODULE_USAGE_NAME
(
"param"
,
"command"
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"load"
,
"Load params from a file (overwrite all)"
);
PRINT_MODULE_USAGE_ARG
(
"<file>"
,
"File name (use default if not given)"
,
true
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"import"
,
"Import params from a file"
);
PRINT_MODULE_USAGE_ARG
(
"<file>"
,
"File name (use default if not given)"
,
true
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"save"
,
"Save params to a file"
);
PRINT_MODULE_USAGE_ARG
(
"<file>"
,
"File name (use default if not given)"
,
true
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"select"
,
"Select default file"
);
PRINT_MODULE_USAGE_ARG
(
"<file>"
,
"File name (use <root>/eeprom/parameters if not given)"
,
true
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"show"
,
"Show parameter values"
);
PRINT_MODULE_USAGE_PARAM_FLAG
(
'c'
,
"Show only changed params"
,
true
);
PRINT_MODULE_USAGE_ARG
(
"<filter>"
,
"Filter by param name (wildcard at end allowed, eg. sys_*)"
,
true
);
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
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"compare"
,
"Compare a param with a value. Command will succeed if equal"
);
PRINT_MODULE_USAGE_ARG
(
"<param_name> <value>"
,
"Parameter name and value to compare"
,
false
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"greater"
,
"Compare a param with a value. Command will succeed if param is greater than the value"
);
PRINT_MODULE_USAGE_ARG
(
"<param_name> <value>"
,
"Parameter name and value to compare"
,
false
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"reset"
,
"Reset params to default"
);
PRINT_MODULE_USAGE_ARG
(
"<exclude1> [<exclude2>]"
,
"Do not reset matching params (wildcard at end allowed)"
,
true
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"reset_nostart"
,
"Reset params to default, but keep SYS_AUTOSTART and SYS_AUTOCONFIG"
);
PRINT_MODULE_USAGE_ARG
(
"<exclude1> [<exclude2>]"
,
"Do not reset matching params (wildcard at end allowed)"
,
true
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"index"
,
"Show param for a given index"
);
PRINT_MODULE_USAGE_ARG
(
"<index>"
,
"Index: an integer >= 0"
,
false
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"index_used"
,
"Show used param for a given index"
);
PRINT_MODULE_USAGE_ARG
(
"<index>"
,
"Index: an integer >= 0"
,
false
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"find"
,
"Show index of a param"
);
PRINT_MODULE_USAGE_ARG
(
"<param>"
,
"param name"
,
false
);
}
int
param_main
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -246,7 +289,7 @@ param_main(int argc, char *argv[])
}
}
PX4_INFO
(
"expected a command, try 'load', 'import', 'show [-c] [<filter>]', 'set <param> <value>', 'compare',
\n
'index', 'index_used', 'find', 'greater', 'select', 'save', or 'reset' "
);
print_usage
(
);
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment