Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>
---
 pi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pi.c b/pi.c
index 9c7b148..e0116fe 100644
--- a/pi.c
+++ b/pi.c
@@ -137,8 +137,8 @@ static double pi_sample(struct servo *servo,
                        break;
                }
 
-               ki_term = s->ki * offset;
-               ppb = s->kp * offset + s->drift + ki_term;
+               ki_term = s->ki * offset * weight;
+               ppb = s->kp * offset * weight + s->drift + ki_term;
                if (ppb < -servo->max_frequency) {
                        ppb = -servo->max_frequency;
                } else if (ppb > servo->max_frequency) {
-- 
2.1.0


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to