Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Distributed Autonomous Networked Control Lab
MicroCART
Commits
a2d6b954
Commit
a2d6b954
authored
8 years ago
by
burneykb
Browse files
Options
Downloads
Patches
Plain Diff
Added monitor help messages
parent
b6f86aa4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
groundStation/src/cli/cli.c
+5
-8
5 additions, 8 deletions
groundStation/src/cli/cli.c
groundStation/src/cli/cli_monitor.c
+6
-1
6 additions, 1 deletion
groundStation/src/cli/cli_monitor.c
groundStation/src/cli/cli_setpid.c
+13
-1
13 additions, 1 deletion
groundStation/src/cli/cli_setpid.c
with
24 additions
and
10 deletions
groundStation/src/cli/cli.c
+
5
−
8
View file @
a2d6b954
...
...
@@ -28,9 +28,9 @@ int main(int argc, char **argv)
// Verify the user has entered enough information to continue
if
(
argc
<
2
&&
!
useSymlink
)
{
printf
(
"Incorrect usage :
\n
"
);
printf
(
"
\n\t
Usage
:
./Cli command [options
]
\n
"
);
printf
(
"
\t
For a list of available command
s run
./Cli --help
\n\n
"
);
printf
(
"
\t
For a list of available options for a command
run
./Cli command --help
\n
"
);
printf
(
"Usage
Syntax:
\n\t
./Cli command [options
...]
\n
\n
"
);
printf
(
"For a list of available
'
command
' names
\n\t
./Cli --help
\n\n
"
);
printf
(
"For a list of available options for a
'
command
'
\n\t
./Cli command --help
\n
"
);
return
-
1
;
}
...
...
@@ -41,9 +41,8 @@ int main(int argc, char **argv)
// If the user runs './Cli help' , provide the user with a list of commands available.
if
(
needCliHelp
)
{
printf
(
"Usage : ./Cli command [options]
\n
"
);
printf
(
"For a list of available options for a command run ./Cli command --help
\n\n
"
);
printf
(
"Available commands include the following
\n
"
);
printf
(
"Usage Syntax:
\n\t
./Cli command [options...]
\n\n
"
);
printf
(
"Available 'command' names include the following
\n
"
);
for
(
int
i
=
0
;
i
<
MAX_COMMANDS
;
++
i
)
{
printf
(
"
\t
'%s'
\n
"
,
commandNames
[
i
]);
}
...
...
@@ -67,8 +66,6 @@ int main(int argc, char **argv)
return
-
1
;
}
printf
(
"Parsed Command : %s
\n
"
,
commandNames
[
cmdID
]);
// Determine if the user called for help on the command
if
(
!
useSymlink
&&
argc
>
2
)
{
if
(
strncmp
(
"--help"
,
argv
[
2
],
strlen
(
argv
[
2
]))
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
groundStation/src/cli/cli_monitor.c
+
6
−
1
View file @
a2d6b954
...
...
@@ -51,7 +51,12 @@ int cli_monitor(struct backend_conn * conn, int argc, char **argv) {
}
if
(
needHelp
)
{
printf
(
"helping you
\n
"
);
printf
(
"Usage Syntax :
\n\t
./Cli monitor [options...]
\n
"
);
printf
(
"Symlink Usage Syntax :
\n\t
./monitor [options...]
\n\n
"
);
printf
(
"Available options include the following
\n
"
);
printf
(
"
\t
[-f] : Run monitor continuously until you kill the program. (ctrl-C)
\n
"
);
printf
(
"
\t
[-c] 'count' : Sets the number of times the monitor will refresh
\n
"
);
printf
(
"
\t
[-r] 'rate' : Sets the 'rate' at which the monitor will refresh per second
\n
"
);
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
groundStation/src/cli/cli_setpid.c
+
13
−
1
View file @
a2d6b954
...
...
@@ -13,6 +13,7 @@ int cli_setpid(struct backend_conn * conn, int argc, char **argv) {
struct
frontend_pid_data
pid_data
;
static
int
mask
;
static
float
pval
=
0
,
ival
=
0
,
dval
=
0
;
static
needHelp
=
0
;
static
struct
option
long_options
[]
=
{
/* These options don’t set a flag. We distinguish them by their indices. */
{
"roll"
,
no_argument
,
&
setRoll
,
1
},
...
...
@@ -24,6 +25,7 @@ int cli_setpid(struct backend_conn * conn, int argc, char **argv) {
{
"height"
,
no_argument
,
&
setHeight
,
1
},
{
"lat"
,
no_argument
,
&
setLat
,
1
},
{
"long"
,
no_argument
,
&
setLong
,
1
},
{
"help"
,
no_argument
,
&
needHelp
,
1
},
{
0
,
0
,
0
,
0
}
};
...
...
@@ -56,7 +58,17 @@ int cli_setpid(struct backend_conn * conn, int argc, char **argv) {
}
}
if
(
setRoll
)
{
if
(
needHelp
)
{
printf
(
"Usage Syntax :
\n\t
./Cli monitor [options...]
\n
"
);
printf
(
"Symlink Usage Syntax :
\n\t
./monitor [options...]
\n\n
"
);
printf
(
"Available options include the following
\n
"
);
printf
(
"
\t
[-f] : Run monitor continuously until you kill the program. (ctrl-C)
\n
"
);
printf
(
"
\t
[-c] 'count' : Sets the number of times the monitor will refresh
\n
"
);
printf
(
"
\t
[-r] 'rate' : Sets the 'rate' at which the monitor will refresh per second
\n
"
);
return
0
;
}
if
(
setRoll
)
{
pid_data
.
controller
=
PID_ROLL
;
}
else
if
(
setYaw
)
{
pid_data
.
controller
=
PID_YAW
;
...
...
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