phc2sys: Add option to set step threshold.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>master
parent
6dc1b90306
commit
09fdc45220
|
@ -81,6 +81,12 @@ Specify the proportional constant of the PI controller. The default is 0.7.
|
|||
.BI \-I " ki"
|
||||
Specify the integral constant of the PI controller. The default is 0.3.
|
||||
.TP
|
||||
.BI \-S " step"
|
||||
Specify the step threshold of the PI controller. It is the maximum offset that
|
||||
the controller corrects by changing the clock frequency instead of stepping the
|
||||
clock. The clock is always stepped on start. The value of 0.0 disables stepping
|
||||
after the start. The default is 0.0.
|
||||
.TP
|
||||
.BI \-R " update-rate"
|
||||
Specify the slave clock update rate when running in the direct synchronization
|
||||
mode. The default is 1 per second.
|
||||
|
|
|
@ -420,6 +420,7 @@ static void usage(char *progname)
|
|||
" -i [iface] master clock by network interface\n"
|
||||
" -P [kp] proportional constant (0.7)\n"
|
||||
" -I [ki] integration constant (0.3)\n"
|
||||
" -S [step] step threshold (disabled)\n"
|
||||
" -R [rate] slave clock update rate in HZ (1)\n"
|
||||
" -N [num] number of master clock readings per update (5)\n"
|
||||
" -O [offset] slave-master time offset (0)\n"
|
||||
|
@ -448,7 +449,7 @@ int main(int argc, char *argv[])
|
|||
/* Process the command line arguments. */
|
||||
progname = strrchr(argv[0], '/');
|
||||
progname = progname ? 1+progname : argv[0];
|
||||
while (EOF != (c = getopt(argc, argv, "c:d:hs:P:I:R:N:O:i:wv"))) {
|
||||
while (EOF != (c = getopt(argc, argv, "c:d:hs:P:I:S:R:N:O:i:wv"))) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
dst_clock.clkid = clock_open(optarg);
|
||||
|
@ -465,6 +466,9 @@ int main(int argc, char *argv[])
|
|||
case 'I':
|
||||
configured_pi_ki = atof(optarg);
|
||||
break;
|
||||
case 'S':
|
||||
configured_pi_offset = atof(optarg);
|
||||
break;
|
||||
case 'R':
|
||||
phc_rate = atoi(optarg);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue