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
Miroslav Lichvar 2013-04-24 15:49:10 +02:00 committed by Richard Cochran
parent 776c88a13c
commit 4a3e5857b1
1 changed files with 2 additions and 2 deletions

View File

@ -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;