diff --git a/MiniPID.cpp b/MiniPID.cpp index 18cc516..725e0e9 100644 --- a/MiniPID.cpp +++ b/MiniPID.cpp @@ -162,6 +162,8 @@ void MiniPID::setOutputLimits(double minimum,double maximum){ */ void MiniPID::setDirection(bool reversed){ this->reversed=reversed; + checkSigns(); /* Invert gains if necessary. Without this call gains provided via the constructor won't be changed, and direction won't reverse. */ + } //**********************************