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
f8769e85
Commit
f8769e85
authored
8 years ago
by
burneykb
Browse files
Options
Downloads
Patches
Plain Diff
Added help message for getpid
parent
14642bfd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
groundStation/Makefile
+1
-1
1 addition, 1 deletion
groundStation/Makefile
groundStation/src/cli/cli_getpid.c
+17
-0
17 additions, 0 deletions
groundStation/src/cli/cli_getpid.c
with
18 additions
and
1 deletion
groundStation/Makefile
+
1
−
1
View file @
f8769e85
...
...
@@ -23,7 +23,7 @@ CLIBINARY=Cli
CLISRCDIR
=
src/cli
CLISOURCES
:=
$(
wildcard
$(
CLISRCDIR
)
/
*
.c
)
CLIOBJECTS
=
$(
CLISOURCES:
$(
CLISRCDIR
)
/%.c
=
$(
OBJDIR
)
/%.o
)
SYMLINKS
=
monitor setpid
SYMLINKS
=
monitor setpid
getpid
# Frontend-common stuff
FESRCDIR
=
src/frontend
...
...
This diff is collapsed.
Click to expand it.
groundStation/src/cli/cli_getpid.c
+
17
−
0
View file @
f8769e85
...
...
@@ -9,6 +9,7 @@ int cli_getpid(struct backend_conn * conn, int argc, char **argv) {
static
int
getRoll
=
0
,
getPitch
=
0
,
getYaw
=
0
,
getAll
=
0
;
static
int
getRollV
=
0
,
getPitchV
=
0
,
getYawV
=
0
;
static
int
getHeight
=
0
,
getLat
=
0
,
getLong
=
0
;
static
int
needHelp
=
0
;
struct
frontend_pid_data
pid_data
;
static
struct
option
long_options
[]
=
{
/* These options don’t set a flag. We distinguish them by their indices. */
...
...
@@ -21,6 +22,7 @@ int cli_getpid(struct backend_conn * conn, int argc, char **argv) {
{
"height"
,
no_argument
,
&
getHeight
,
1
},
{
"lat"
,
no_argument
,
&
getLat
,
1
},
{
"long"
,
no_argument
,
&
getLong
,
1
},
{
"help"
,
no_argument
,
&
needHelp
,
1
},
{
0
,
0
,
0
,
0
}
};
...
...
@@ -40,6 +42,21 @@ int cli_getpid(struct backend_conn * conn, int argc, char **argv) {
}
}
if
(
needHelp
)
{
printf
(
"Getpid gets the p, i , or d constant values of any single controller
\n
"
);
printf
(
"Usage Syntax :
\n\t
./Cli getpid controller [options...]
\n
"
);
printf
(
"Symlink Usage Syntax :
\n\t
./getpid controller [options...]
\n\n
"
);
printf
(
"Available 'controllers' include the following
\n
"
);
printf
(
"
\t
[--pitch] : Pitch
\n\t
[--roll] : Roll
\n\t
[--yaw] : Yaw
\n
"
);
printf
(
"
\t
[--pitchv] : Pitch Velocity
\n\t
[--rollv] : Roll Velocity
\n\t
[--yawv] : Yaw Velocity
\n
"
);
printf
(
"
\t
[--height] : Z
\n\t
[--lat] : X
\n\t
[--long] : Y
\n\n
"
);
printf
(
"Available 'controller' options include the following
\n
"
);
printf
(
"
\t
[-p] 'val' : Gets the p constant of the 'controller
\n
"
);
printf
(
"
\t
[-i] 'val' : Gets the i constant of the 'controller'
\n
"
);
printf
(
"
\t
[-d] 'val' : Gets the d constant of the 'controller'
\n
"
);
return
0
;
}
int
result
;
if
(
getAll
)
{
pid_data
.
controller
=
PID_ROLL
;
...
...
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