Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
7da20d14
Commit
7da20d14
authored
Sep 10, 2020
by
Guido Visser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tune items added to tune KpKi and show
parent
22a4bef2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
24 deletions
+12
-24
cmd_tune.c
shell/cmd_tune.c
+12
-24
No files found.
shell/cmd_tune.c
View file @
7da20d14
/*
* This work is part of the White Rabbit project
*
* (c) 10-09-2020
* Author: Guido Visser <guidov@nikhef.nl>
*
* Released according to the GNU GPL, version 2 or any later version.
*/
...
...
@@ -10,52 +13,37 @@
#include <wrc.h>
#include "softpll_ng.h"
#include "shell.h"
#include "spll_common.h"
#include <TuneGuido.h>
#include "softpll_ng.h"
struct
spll_main_state
*
s
;
//struct spll_main_state *s;
static
int
cmd_tune
(
const
char
*
args
[])
{
int
GuidoTemp
=
0
,
A
=
0
,
B
=
0
;
//pp_printf("Tuning the world\n");
if
(
!
strcasecmp
(
args
[
0
],
"val"
)){
if
(
!
args
[
0
])
return
-
EINVAL
;
}
else
if
(
!
strcasecmp
(
args
[
0
],
"kpki"
)){
if
(
!
args
[
2
])
return
-
EINVAL
;
A
=
(
atoi
(
args
[
1
]));
Kphpsec
=
&
A
;
pp_printf
(
"A:%i
\t
Aptr: %i
\n
"
,
A
,
*
Kphpsec
);
B
=
(
atoi
(
args
[
2
]));
Kihpsec
=
&
B
;
pp_printf
(
"B:%i
\t
Bptr: %i
\n
"
,
B
,
*
Kihpsec
);
pp_printf
(
"Entered Kp:%i
\t
Ki: %i
\n
"
,
*
Kphpsec
,
*
Kihpsec
);
spll_set_pi
(
*
Kphpsec
,
*
Kihpsec
);
spll_set_pi_kpki
(
atoi
(
args
[
1
]),
atoi
(
args
[
2
]));
}
else
if
(
!
strcasecmp
(
args
[
0
],
"kp"
)){
if
(
!
args
[
1
])
return
-
EINVAL
;
A
=
(
atoi
(
args
[
1
]));
Kihpsec
=
&
A
;
//pp_printf("A:%i\t Aptr: %i\n",A,*Kphpsec);
spll_set_pi_solo_kp
(
A
);
spll_set_pi_solo_kp
((
atoi
(
args
[
1
])));
}
else
if
(
!
strcasecmp
(
args
[
0
],
"ki"
)){
if
(
!
args
[
1
])
return
-
EINVAL
;
B
=
(
atoi
(
args
[
1
]));
Kihpsec
=
&
B
;
//pp_printf("A:%i\t Aptr: %i\n",B,*Kihpsec);
spll_set_pi_solo_ki
(
B
);
spll_set_pi_solo_ki
((
atoi
(
args
[
1
])));
}
else
if
(
!
strcasecmp
(
args
[
0
],
"show"
)){
if
(
!
args
[
0
])
return
-
EINVAL
;
spll_show_kpki
();
}
else
if
(
!
strcasecmp
(
args
[
0
],
"
init
"
)){
}
else
if
(
!
strcasecmp
(
args
[
0
],
"
gasopdielolly
"
)){
if
(
!
args
[
0
])
return
-
EINVAL
;
spll_
init
(
3
,
0
,
0
);
spll_
set_pi_kpki
(
-
3000
,
-
5
);
}
else
if
(
!
strcasecmp
(
args
[
0
],
"picontrol"
)){
if
(
!
args
[
1
])
return
-
EINVAL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment