Skip to content
Snippets Groups Projects
Commit d4e79c89 authored by ArmarX User's avatar ArmarX User
Browse files

pidcontroller: fixed conditionIntegralErrorThreshold

parent d1c1264f
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,7 @@ void PIDController::update(double deltaSec, double measuredValue, double targetV
// ARMARX_INFO << deactivateSpam() << VAROUT(dt);
if (!firstRun)
{
if (error < conditionalIntegralErrorTreshold)
if (std::abs(error) < conditionalIntegralErrorTreshold)
{
integral += error * deltaSec;
integral = math::MathUtils::LimitTo(integral, maxIntegral);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment