Package xbot.common.math
Class PIDManager
java.lang.Object
xbot.common.math.PIDPropertyManager
xbot.common.math.PIDManager
Wrapper for PID class which automatically puts the P, I and D values on
the SmartDashboard.
-
Nested Class Summary
Nested classes/interfaces inherited from class xbot.common.math.PIDPropertyManager
PIDPropertyManager.PIDPropertyManagerFactory
-
Constructor Summary
ConstructorDescriptionPIDManager
(String functionName, PropertyFactory propMan, RobotAssertionManager assertionManager, double defaultP, double defaultI, double defaultD, double defaultF, double defaultMaxOutput, double defaultMinOutput, double errorThreshold, double derivativeThreshold, double timeThreshold, double iZone) -
Method Summary
Modifier and TypeMethodDescriptiondouble
calculate
(double goal, double current) boolean
getIMask()
double
double
boolean
Determines if you are on target.boolean
isOnTarget
(double errorTolerance) Deprecated.void
reset()
void
setIMask
(boolean isMasked) void
setMaxOutput
(double value) void
setMinOutput
(double value) Methods inherited from class xbot.common.math.PIDPropertyManager
getD, getDerivativeThreshold, getEnableDerivativeThreshold, getEnableErrorThreshold, getEnableTimeThreshold, getErrorThreshold, getF, getI, getIZone, getP, getTimeThreshold, setD, setDerivativeThreshold, setEnableDerivativeThreshold, setEnableErrorThreshold, setEnableTimeThreshold, setErrorThreshold, setF, setI, setIZone, setP, setTimeThreshold
-
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. -
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
-
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()
-