Package frc.robot.helpers
Class PID
java.lang.Object
frc.robot.helpers.PID
PID control constants container.
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionvoid
applyToConfig
(com.revrobotics.spark.config.ClosedLoopConfig config) Applies the PID constants to a SparkMax configuration.
Field Details
p
public final double pProportional gain.i
public final double iIntegral gain.d
public final double dDerivative gain.
Constructor Details
PID
public PID(double p, double i, double d) Creates new PID constants.- Parameters:
p
- Proportional gaini
- Integral gaind
- Derivative gain
Method Details
applyToConfig
public void applyToConfig(com.revrobotics.spark.config.ClosedLoopConfig config) Applies the PID constants to a SparkMax configuration.- Parameters:
config
- The SparkMax configuration to apply the constants to.