Class ExpansionHubPidConstants
java.lang.Object
org.wpilib.hardware.expansionhub.ExpansionHubPidConstants
This class contains PID constants for an ExpansionHub motor.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDisable continous input mode.voidenableContinuousInput(double minimumInput, double maximumInput) Enables continuous input.voidsetFF(double s, double v, double a) Sets the feed forward gains to the specified values.voidsetPID(double p, double i, double d) Sets the PID Controller gain parameters.
-
Method Details
-
setPID
Sets the PID Controller gain parameters.Set the proportional, integral, and differential coefficients.
- Parameters:
p- The proportional coefficient.i- The integral coefficient.d- The derivative coefficient.
-
setFF
Sets the feed forward gains to the specified values.The units should be radians for angular systems and meters for linear systems.
The PID control period is 10ms
- Parameters:
s- The static gain in volts.v- The velocity gain in V/(units/s).a- The acceleration gain in V/(units/s²).
-
enableContinuousInput
Enables continuous input.Rather then using the max and min input range as constraints, it considers them to be the same point and automatically calculates the shortest route to the setpoint.
- Parameters:
minimumInput- The minimum value expected from the input.maximumInput- The maximum value expected from the input.
-
disableContinuousInput
Disable continous input mode.
-