From: maxwtan <100314265+MaxwellTTan20@users.noreply.github.com> Date: Fri, 20 Feb 2026 22:51:20 +0000 (-0800) Subject: Update Intake.java X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=76243d3d4357ee37e23292aba418f1eef682cc44;p=FRC2026.git Update Intake.java --- diff --git a/src/main/java/frc/robot/subsystems/Intake/Intake.java b/src/main/java/frc/robot/subsystems/Intake/Intake.java index 21342f9..f91063f 100644 --- a/src/main/java/frc/robot/subsystems/Intake/Intake.java +++ b/src/main/java/frc/robot/subsystems/Intake/Intake.java @@ -62,6 +62,8 @@ public class Intake extends SubsystemBase implements IntakeIO{ private double setpointInches = 0.0; + private boolean calibrating = false; + private final IntakeIOInputsAutoLogged inputs = new IntakeIOInputsAutoLogged(); public Intake() { @@ -190,6 +192,11 @@ public class Intake extends SubsystemBase implements IntakeIO{ double velocity = rollerMotor.getVelocity().getValueAsDouble(); SmartDashboard.putNumber("Roller Velocity", velocity); + if(calibrating){ + leftMotor.set(-0.1); + rightMotor.set(-0.1); + } + updateInputs(); Logger.processInputs("Intake", inputs); } @@ -336,7 +343,12 @@ public class Intake extends SubsystemBase implements IntakeIO{ } public void calibrate(){ - + calibrating = true; + } + public void stopCalibrating(){ + calibrating = false; + zeroMotors(); + retract(); } @Override