From: iefomit Date: Fri, 17 Apr 2026 23:08:33 +0000 (-0700) Subject: Merge branch 'main' into some-fixes X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=76b61752f13a2d9afa9c372c5abecec856c8f097;p=FRC2026.git Merge branch 'main' into some-fixes --- 76b61752f13a2d9afa9c372c5abecec856c8f097 diff --cc src/main/java/frc/robot/subsystems/spindexer/Spindexer.java index 7d3e06e,9b2c40e..ef29b2a --- a/src/main/java/frc/robot/subsystems/spindexer/Spindexer.java +++ b/src/main/java/frc/robot/subsystems/spindexer/Spindexer.java @@@ -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; @@@ -134,24 -111,15 +113,19 @@@ 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 - - - }