diff --git a/src/main/java/frc/robot/intake/Intake.java b/src/main/java/frc/robot/intake/Intake.java index 1d2a1a0..1eba205 100644 --- a/src/main/java/frc/robot/intake/Intake.java +++ b/src/main/java/frc/robot/intake/Intake.java @@ -5,8 +5,9 @@ import frc.lib.Subsystem; import frc.lib.Telemetry; import frc.lib.controller.VelocityControllerIO; -import frc.lib.controller.VelocityControllerIO.VelocityControllerIOConstants; import frc.lib.controller.VelocityControllerIO.VelocityControllerIOValues; +import frc.robot.intake.IntakeConstants.BackRollerConstants; +import frc.robot.intake.IntakeConstants.FrontRollerConstants; /** Subsystem class for the intake subsystem. */ public class Intake extends Subsystem { @@ -24,11 +25,11 @@ public class Intake extends Subsystem { private Intake() { frontRoller = IntakeFactory.createFrontRoller(); frontRollerValues = new VelocityControllerIOValues(); - frontRoller.configure(new VelocityControllerIOConstants()); + frontRoller.configure(FrontRollerConstants.CONTROLLER_CONSTANTS); backRoller = IntakeFactory.createBackRoller(); backRollerValues = new VelocityControllerIOValues(); - backRoller.configure(new VelocityControllerIOConstants()); + backRoller.configure(BackRollerConstants.CONTROLLER_CONSTANTS); } /** diff --git a/src/main/java/frc/robot/intake/IntakeConstants.java b/src/main/java/frc/robot/intake/IntakeConstants.java index d00feb2..ebb7831 100644 --- a/src/main/java/frc/robot/intake/IntakeConstants.java +++ b/src/main/java/frc/robot/intake/IntakeConstants.java @@ -2,6 +2,7 @@ import frc.lib.CAN; import frc.lib.PIDFConstants; +import frc.lib.controller.VelocityControllerIO.VelocityControllerIOConstants; /** Constants for the intake subsystem. */ public class IntakeConstants { @@ -16,6 +17,14 @@ public static class FrontRollerConstants { PIDF.kS = 0.13; PIDF.kV = 0.1683; } + + /** Front roller's controller constants. */ + public static final VelocityControllerIOConstants CONTROLLER_CONSTANTS = new VelocityControllerIOConstants(); + static { + CONTROLLER_CONSTANTS.ccwPositive = false; + CONTROLLER_CONSTANTS.neutralBrake = true; + CONTROLLER_CONSTANTS.sensorToMechanismRatio = 24.0 / 16.0; + } } /** Constants for the back roller. */ @@ -29,6 +38,14 @@ public static class BackRollerConstants { PIDF.kS = 0.13; PIDF.kV = 0.1759; } + + /** Back roller's controller constants. */ + public static final VelocityControllerIOConstants CONTROLLER_CONSTANTS = new VelocityControllerIOConstants(); + static { + CONTROLLER_CONSTANTS.ccwPositive = false; + CONTROLLER_CONSTANTS.neutralBrake = true; + CONTROLLER_CONSTANTS.sensorToMechanismRatio = 24.0 / 16.0; + } } /** Constants for the roller motor. */