Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
PPSi
Commits
419d9679
Commit
419d9679
authored
Mar 05, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial: check ai/ap at cmdline time, not at each run
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
88f3cdd6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
cmdline.c
lib/cmdline.c
+4
-1
servo.c
proto-standard/servo.c
+0
-6
No files found.
lib/cmdline.c
View file @
419d9679
...
...
@@ -27,7 +27,7 @@ static struct cmd_line_opt cmd_line_list[] = {
{
"-O NUMBER"
,
"do not reset the clock if offset is more than NUMBER nanoseconds"
},
{
"-M NUMBER"
,
"do not accept delay values of more than NUMBER nanoseconds"
},
{
"-t"
,
"do not adjust the system clock"
},
{
"-a NUMBER,NUMBER"
,
"specify clock servo P and I
attenuations
"
},
{
"-a NUMBER,NUMBER"
,
"specify clock servo P and I
values (min == 1)
"
},
{
"-w NUMBER"
,
"specify one way delay filter stiffness"
},
CMD_LINE_SEPARATOR
,
{
"-b NAME"
,
"bind PTP to network interface NAME"
},
...
...
@@ -133,6 +133,9 @@ int pp_parse_cmdline(struct pp_instance *ppi, int argc, char **argv)
case
'a'
:
a
=
argv
[
++
i
];
cmd_line_parse_two
(
a
,
&
n1
,
&
n2
);
/* no negative or zero attenuation */
if
(
n1
<
1
||
n2
<
1
)
return
-
1
;
OPTS
(
ppi
)
->
ap
=
n1
;
OPTS
(
ppi
)
->
ai
=
n2
;
break
;
...
...
proto-standard/servo.c
View file @
419d9679
...
...
@@ -204,12 +204,6 @@ void pp_update_clock(struct pp_instance *ppi)
static
int
dc
=
0
;
/* the PI controller */
/* no negative or zero attenuation */
if
(
OPTS
(
ppi
)
->
ap
<
1
)
OPTS
(
ppi
)
->
ap
=
1
;
if
(
OPTS
(
ppi
)
->
ai
<
1
)
OPTS
(
ppi
)
->
ai
=
1
;
/* the accumulator for the I component */
SRV
(
ppi
)
->
obs_drift
+=
DSCUR
(
ppi
)
->
offsetFromMaster
.
nanoseconds
/
...
...
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