ptp4l: Allow P, I constants over 1.0.
With sub-second sync intervals, it may be useful to set P and I to values over 1.0. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>master
parent
776c88a13c
commit
4a3e5857b1
4
config.c
4
config.c
|
@ -276,12 +276,12 @@ static enum parser_result parse_global_setting(const char *option,
|
||||||
*cfg->tx_timestamp_timeout = val;
|
*cfg->tx_timestamp_timeout = val;
|
||||||
|
|
||||||
} else if (!strcmp(option, "pi_proportional_const")) {
|
} else if (!strcmp(option, "pi_proportional_const")) {
|
||||||
if (1 != sscanf(value, "%lf", &df) || df < 0.0 || df >= 1.0)
|
if (1 != sscanf(value, "%lf", &df) || df < 0.0)
|
||||||
return BAD_VALUE;
|
return BAD_VALUE;
|
||||||
*cfg->pi_proportional_const = df;
|
*cfg->pi_proportional_const = df;
|
||||||
|
|
||||||
} else if (!strcmp(option, "pi_integral_const")) {
|
} else if (!strcmp(option, "pi_integral_const")) {
|
||||||
if (1 != sscanf(value, "%lf", &df) || df < 0.0 || df >= 1.0)
|
if (1 != sscanf(value, "%lf", &df) || df < 0.0)
|
||||||
return BAD_VALUE;
|
return BAD_VALUE;
|
||||||
*cfg->pi_integral_const = df;
|
*cfg->pi_integral_const = df;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue