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
e78c5d6a
Commit
e78c5d6a
authored
Feb 18, 2014
by
Pietro Fezzardi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial: change old one-way delay to meanPathDelay
both in comments and in diagnostics
parent
0a440eb3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
pp-instance.h
include/ppsi/pp-instance.h
+1
-1
cmdline.c
lib/cmdline.c
+1
-1
servo.c
proto-standard/servo.c
+5
-5
No files found.
include/ppsi/pp-instance.h
View file @
e78c5d6a
...
...
@@ -74,7 +74,7 @@ struct pp_frgn_master {
* machine are implemented.
*
* pp_avg_fltr: It is a variable cutoff/delay low-pass, infinite impulse
* response (IIR) filter. The
one-way d
elay filter has the difference equation:
* response (IIR) filter. The
meanPathD
elay filter has the difference equation:
* s*y[n] - (s-1)*y[n-1] = x[n]/2 + x[n-1]/2,
* where increasing the stiffness (s) lowers the cutoff and increases the delay.
*/
...
...
lib/cmdline.c
View file @
e78c5d6a
...
...
@@ -32,7 +32,7 @@ static struct cmd_line_opt cmd_line_list[] = {
{
"-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 values (min == 1)"
},
{
"-w NUMBER"
,
"specify
one way d
elay filter stiffness"
},
{
"-w NUMBER"
,
"specify
meanPathD
elay filter stiffness"
},
CMD_LINE_SEPARATOR
,
{
"-b NAME"
,
"bind PTP to network interface NAME"
},
//{"-u ADDRESS", "also send uni-cast to ADDRESS\n"}, -- FIXME: useful?
...
...
proto-standard/servo.c
View file @
e78c5d6a
...
...
@@ -12,7 +12,7 @@ void pp_servo_init(struct pp_instance *ppi)
{
int
d
;
SRV
(
ppi
)
->
mpd_fltr
.
s_exp
=
0
;
/* clears
one-way d
elay filter */
SRV
(
ppi
)
->
mpd_fltr
.
s_exp
=
0
;
/* clears
meanPathD
elay filter */
SRV
(
ppi
)
->
ofm_fltr
.
s_exp
=
0
;
/* clears offset-from-master filter */
ppi
->
frgn_rec_num
=
0
;
/* no known master */
DSPAR
(
ppi
)
->
parentPortIdentity
.
portNumber
=
0
;
/* invalid */
...
...
@@ -74,7 +74,7 @@ static int pp_servo_bad_event(struct pp_instance *ppi)
TimeInternal
*
s_to_m_dly
=
&
SRV
(
ppi
)
->
s_to_m_dly
;
TimeInternal
*
mpd
=
&
DSCUR
(
ppi
)
->
meanPathDelay
;
/* Discard
one-way d
elays that overflow a second (makes no sense) */
/* Discard
meanPathD
elays that overflow a second (makes no sense) */
if
(
mpd
->
seconds
)
return
1
;
...
...
@@ -129,7 +129,7 @@ void pp_servo_got_resp(struct pp_instance *ppi)
/* Calc mean path delay, used later to calc "offset from master" */
add_TimeInternal
(
mpd
,
&
SRV
(
ppi
)
->
m_to_s_dly
,
&
SRV
(
ppi
)
->
s_to_m_dly
);
div2_TimeInternal
(
mpd
);
pp_diag
(
ppi
,
servo
,
1
,
"
One-way d
elay: %s
\n
"
,
fmt_TI
(
mpd
));
pp_diag
(
ppi
,
servo
,
1
,
"
meanPathD
elay: %s
\n
"
,
fmt_TI
(
mpd
));
if
(
pp_servo_bad_event
(
ppi
))
return
;
...
...
@@ -179,7 +179,7 @@ void pp_servo_got_resp(struct pp_instance *ppi)
/
mpd_fltr
->
s_exp
;
mpd
->
nanoseconds
=
mpd_fltr
->
y
;
pp_diag
(
ppi
,
servo
,
1
,
"After avg(%i),
one-way d
elay: %i
\n
"
,
pp_diag
(
ppi
,
servo
,
1
,
"After avg(%i),
meanPathD
elay: %i
\n
"
,
(
int
)
mpd_fltr
->
s_exp
,
mpd
->
nanoseconds
);
/* update 'offsetFromMaster', (End to End mode) */
...
...
@@ -329,7 +329,7 @@ void pp_servo_got_resp(struct pp_instance *ppi)
ppi
->
t_ops
->
adjust_offset
(
ppi
,
-
adj
);
}
pp_diag
(
ppi
,
servo
,
2
,
"
One-way d
elay averaged: %s
\n
"
,
fmt_TI
(
mpd
));
pp_diag
(
ppi
,
servo
,
2
,
"
meanPathD
elay averaged: %s
\n
"
,
fmt_TI
(
mpd
));
pp_diag
(
ppi
,
servo
,
2
,
"Offset from m averaged: %s
\n
"
,
fmt_TI
(
ofm
));
pp_diag
(
ppi
,
servo
,
2
,
"Observed drift: %9i
\n
"
,
(
int
)
SRV
(
ppi
)
->
obs_drift
);
...
...
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