Class ExpansionHubPositionConstants
java.lang.Object
org.wpilib.hardware.expansionhub.ExpansionHubPositionConstants
This class contains feedback and feedforward constants for an ExpansionHub motor.
-
Method Summary
Modifier and TypeMethodDescriptionDisable continuous input mode.enableContinuousInput(double minimumInput, double maximumInput) Enables continuous input.setPID(double p, double i, double d) Sets the PID Controller gain parameters.setS(double s) Sets the feed forward gains to the specified values.
-
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.- Returns:
- This object, for method chaining.
-
setS
Sets the feed forward gains to the specified values.The units should be radians for angular systems and meters for linear systems.
The motor control period is 10ms
- Parameters:
s- The static gain in volts.- Returns:
- This object, for method chaining.
-
enableContinuousInput
public ExpansionHubPositionConstants enableContinuousInput(double minimumInput, double maximumInput) 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.- Returns:
- This object, for method chaining.
-
disableContinuousInput
Disable continuous input mode.- Returns:
- This object, for method chaining.
-