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

index 412b42a19fbb5fe97c4bf0e8fc90674afe120e57..140161ae43b79e4ac943dda0520a791484eae724 100644 (file)
@@ -123,14 +123,14 @@ public class LinearClimb extends SubsystemBase implements LinearClimbIO{
 
     @Override
     public void periodic() {
+        double power = pid.calculate(motor.getPosition().getValueAsDouble());
         // if it is not calibrating, do normal stuff
         if (!calibrating) {
-            double power = pid.calculate(motor.getPosition().getValueAsDouble());
             power = MathUtil.clamp(power, -MAX_POWER, MAX_POWER);
-            motor.set(power);
-        } else {
-            motor.set(ClimbConstants.CALIBRATION_POWER);
+        } else{
+            power = ClimbConstants.CALIBRATION_POWER;
         }
+        motor.set(power);
         
         Logger.recordOutput("LinearClimb/setpointMeters", Units.rotationsToRadians(pid.getSetpoint()) * ClimbConstants.WHEEL_RADIUS / ClimbConstants.CLIMB_GEAR_RATIO);
     }
index 81db32caab36bb566fc3e1acd222c29681325f51..21342f93bafee280f944a0ee0aefb7ea14b41ccb 100644 (file)
@@ -335,6 +335,10 @@ public class Intake extends SubsystemBase implements IntakeIO{
         rollerMotor.close();
     }
 
+    public void calibrate(){
+        
+    }
+
     @Override
     public void updateInputs() {
         inputs.leftPosition = rotationsToInches(leftMotor.getPosition().getValueAsDouble());