From 5a9dfe8a3c42b15279a5bad5ebc30c8b21fb6cda Mon Sep 17 00:00:00 2001 From: Nathan Koenig Date: Wed, 6 Jul 2016 21:27:27 +0000 Subject: [PATCH] PID.cc edited online with Bitbucket --- src/PID.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PID.cc b/src/PID.cc index 1dafe424d..e30e24c40 100644 --- a/src/PID.cc +++ b/src/PID.cc @@ -149,7 +149,7 @@ double PID::Update(double _error, std::chrono::duration _dt) this->cmd = -pTerm - iTerm - dTerm; // Check the command limits - if (!(this->cmdMax < this->cmdMin)) + if (this->cmdMax >= this->cmdMin) this->cmd = clamp(this->cmd, this->cmdMin, this->cmdMax); return this->cmd;