]> git.taranathan.com Git - FRC2026.git/commitdiff
Update Intake.java
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Fri, 20 Feb 2026 22:51:20 +0000 (14:51 -0800)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Fri, 20 Feb 2026 22:51:20 +0000 (14:51 -0800)
src/main/java/frc/robot/subsystems/Intake/Intake.java

index 21342f93bafee280f944a0ee0aefb7ea14b41ccb..f91063f5e750152a52a0d6a4c8ab5413109ff762 100644 (file)
@@ -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