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
32bb5fd3
Commit
32bb5fd3
authored
8 years ago
by
burneykb
Browse files
Options
Downloads
Patches
Plain Diff
optional string usage for CLI is possible on all commands
parent
b0d4cccc
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
groundStation/src/cli/cli_source.c
+12
-4
12 additions, 4 deletions
groundStation/src/cli/cli_source.c
with
12 additions
and
4 deletions
groundStation/src/cli/cli_source.c
+
12
−
4
View file @
32bb5fd3
...
...
@@ -39,6 +39,7 @@ int cli_getsource(struct backend_conn * conn, int argc, char ** argv) {
int
cli_setsource
(
struct
backend_conn
*
conn
,
int
argc
,
char
**
argv
)
{
struct
frontend_source_data
source_data
;
struct
convert_data
conv_data
;
int
needHelp
=
0
;
if
((
needHelp
=
help_check
(
argc
,
argv
)))
{
...
...
@@ -53,10 +54,17 @@ int cli_setsource(struct backend_conn * conn, int argc, char ** argv) {
return
1
;
}
source_data
.
dst_block
=
atoi
(
argv
[
1
]);
source_data
.
dst_input
=
atoi
(
argv
[
2
]);
source_data
.
src_block
=
atoi
(
argv
[
3
]);
source_data
.
src_output
=
atoi
(
argv
[
4
]);
if
(
convert_to_id
(
conn
,
argv
,
&
conv_data
,
INPUT
))
{
return
1
;
}
source_data
.
dst_block
=
conv_data
.
val_1
;
source_data
.
dst_input
=
conv_data
.
val_2
;
if
(
convert_to_id
(
conn
,
argv
+
2
,
&
conv_data
,
OUTPUT
))
{
return
1
;
}
source_data
.
src_block
=
conv_data
.
val_1
;
source_data
.
src_output
=
conv_data
.
val_2
;
if
(
frontend_setsource
(
conn
,
&
source_data
))
{
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