diff --git a/C++/Smart Motion Example/src/main/cpp/Robot.cpp b/C++/Smart Motion Example/src/main/cpp/Robot.cpp index 58b0e21..46cfaaa 100644 --- a/C++/Smart Motion Example/src/main/cpp/Robot.cpp +++ b/C++/Smart Motion Example/src/main/cpp/Robot.cpp @@ -139,7 +139,7 @@ class Robot : public frc::TimedRobot { if((ff != kFF)) { m_pidController.SetFF(ff); kFF = ff; } if((max != kMaxOutput) || (min != kMinOutput)) { m_pidController.SetOutputRange(min, max); kMinOutput = min; kMaxOutput = max; } if((maxV != kMaxVel)) { m_pidController.SetSmartMotionMaxVelocity(maxV); kMaxVel = maxV; } - if((minV != kMinVel)) { m_pidController.SetSmartMotionMaxVelocity(minV); kMinVel = minV; } + if((minV != kMinVel)) { m_pidController.SetSmartMotionMinOutputVelocity(minV); kMinVel = minV; } if((maxA != kMaxAcc)) { m_pidController.SetSmartMotionMaxAccel(maxA); kMaxAcc = maxA; } if((allE != kAllErr)) { m_pidController.SetSmartMotionAllowedClosedLoopError(allE); allE = kAllErr; } diff --git a/Java/Smart Motion Example/src/main/java/frc/robot/Robot.java b/Java/Smart Motion Example/src/main/java/frc/robot/Robot.java index 56c6bef..0493121 100644 --- a/Java/Smart Motion Example/src/main/java/frc/robot/Robot.java +++ b/Java/Smart Motion Example/src/main/java/frc/robot/Robot.java @@ -160,7 +160,7 @@ public void teleopPeriodic() { kMinOutput = min; kMaxOutput = max; } if((maxV != maxVel)) { m_pidController.setSmartMotionMaxVelocity(maxV,0); maxVel = maxV; } - if((minV != minVel)) { m_pidController.setSmartMotionMaxVelocity(minV,0); minVel = minV; } + if((minV != minVel)) { m_pidController.setSmartMotionMinOutputVelocity(minV,0); minVel = minV; } if((maxA != maxAcc)) { m_pidController.setSmartMotionMaxAccel(maxA,0); maxAcc = maxA; } if((allE != allowedErr)) { m_pidController.setSmartMotionAllowedClosedLoopError(allE,0); allE = allowedErr; }