]> git.taranathan.com Git - FRC2026.git/commitdiff
Merge branch 'main' into some-fixes
authoriefomit <timofei.stem@gmail.com>
Fri, 17 Apr 2026 23:08:33 +0000 (16:08 -0700)
committeriefomit <timofei.stem@gmail.com>
Fri, 17 Apr 2026 23:08:33 +0000 (16:08 -0700)
1  2 
src/main/java/frc/robot/RobotContainer.java
src/main/java/frc/robot/subsystems/spindexer/Spindexer.java

index 7d3e06efdb609aa773db6fed38546752d7f9dcd8,9b2c40e81555f7bfcc165df9c0d8d9a9510a8a99..ef29b2ac8ab8ab58db4b335b998e6c752f7709f8
@@@ -18,10 -20,8 +20,9 @@@ public class Spindexer extends Subsyste
  
      private double power = 0.0;
      public int ballCount = 0;
-     private boolean wasSpindexerSlow = false;
      private SpindexerState state = SpindexerState.STOPPED;
      private SpindexerIOInputsAutoLogged inputs = new SpindexerIOInputsAutoLogged();
 +    private double currentLimit = SpindexerConstants.currentLimit;
  
      public boolean noIndexing = false;
  
          limitConfig.StatorCurrentLimitEnable = true;
          limitConfig.SupplyCurrentLowerLimit = newCurrentLimit;
          limitConfig.SupplyCurrentLowerTime = 1.5;
-         motor.getConfigurator().apply(limitConfig);
+         motorOne.getConfigurator().apply(limitConfig);
+         motorTwo.getConfigurator().apply(limitConfig);
      }
  
 +    public double getCurrentLimit() {
 +        return currentLimit;
 +    }
 +
      @Override
      public void updateInputs() {
-         inputs.spindexerVelocity = motor.getVelocity().getValueAsDouble(); //SpindexerConstants.gearRatio;
-         inputs.spindexerCurrent = motor.getStatorCurrent().getValueAsDouble();
+         inputs.spindexerOneVelocity = motorOne.getVelocity().getValueAsDouble();
+         inputs.spindexerOneCurrent = motorOne.getStatorCurrent().getValueAsDouble();
+         inputs.spindexerTwoVelocity = motorTwo.getVelocity().getValueAsDouble();
+         inputs.spindexerTwoCurrent = motorTwo.getStatorCurrent().getValueAsDouble();
      }
-     private Double resetPos;
-     private PIDController resetPID = new PIDController(4.0, 0.0, 0);
-     private final double gearRatio = 27.0 / 1.0; //spindexer spins once for every 27 motor spins
-     
  }