From 4a3e5857b1c36872ade7352da3a1d704001ef89c Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 24 Apr 2013 15:49:10 +0200 Subject: [PATCH] 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 --- config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.c b/config.c index f32ab5f..3103ecd 100644 --- a/config.c +++ b/config.c @@ -276,12 +276,12 @@ static enum parser_result parse_global_setting(const char *option, *cfg->tx_timestamp_timeout = val; } 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; *cfg->pi_proportional_const = df; } 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; *cfg->pi_integral_const = df;