From b257cab16ce3702e68fbf7808d0b18dc8624ab4f Mon Sep 17 00:00:00 2001 From: Blandown Silva Date: Thu, 4 Feb 2021 11:07:53 -0300 Subject: [PATCH] Fix #9 --- MiniPID.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/MiniPID.cpp b/MiniPID.cpp index 18cc516..9cc6453 100644 --- a/MiniPID.cpp +++ b/MiniPID.cpp @@ -111,13 +111,16 @@ void MiniPID::setF(double f){ * @param d Derivative gain. Responds quickly to large changes in error. Small values prevents P and I terms from causing overshoot. */ void MiniPID::setPID(double p, double i, double d){ - P=p;I=i;D=d; - checkSigns(); + setP(p); + setI(i); + setD(d); } void MiniPID::setPID(double p, double i, double d,double f){ - P=p;I=i;D=d;F=f; - checkSigns(); + setP(p); + setI(i); + setD(d); + setF(f); } /**Set the maximum output value contributed by the I component of the system