Class PIDManager


public class PIDManager extends PIDPropertyManager
Wrapper for PID class which automatically puts the P, I and D values on the SmartDashboard.
  • Constructor Details

    • PIDManager

      @AssistedInject public PIDManager(@Assisted String functionName, PropertyFactory propMan, RobotAssertionManager assertionManager, @Assisted("defaultP") double defaultP, @Assisted("defaultI") double defaultI, @Assisted("defaultD") double defaultD, @Assisted("defaultF") double defaultF, @Assisted("defaultMaxOutput") double defaultMaxOutput, @Assisted("defaultMinOutput") double defaultMinOutput, @Assisted("errorThreshold") double errorThreshold, @Assisted("derivativeThreshold") double derivativeThreshold, @Assisted("timeThreshold") double timeThreshold, @Assisted("iZone") double iZone)
  • Method Details

    • calculate

      public double calculate(double goal, double current)
    • reset

      public void reset()
    • isOnTarget

      @Deprecated public boolean isOnTarget(double errorTolerance)
      Deprecated.
    • isOnTarget

      public boolean isOnTarget()
      Determines if you are on target. Only works if: you have called setErrorThreshold() and/or setDerivativeThreshold(), as well as setEnableErrorThreshold() and/or setDerivativeErrorThreshold(), or if you have set these values in the SmartDashboard at runtime.
    • getOffTargetReason

      public PID.OffTargetReason getOffTargetReason()
    • setIMask

      public void setIMask(boolean isMasked)
    • getIMask

      public boolean getIMask()
    • setMinOutput

      public void setMinOutput(double value)
    • getMinOutput

      public double getMinOutput()
    • setMaxOutput

      public void setMaxOutput(double value)
    • getMaxOutput

      public double getMaxOutput()