]> git.taranathan.com Git - FRC2026.git/commitdiff
testing, fix reversed motor2
authormoo <moogoesmeow123@gmail.com>
Fri, 17 Apr 2026 22:42:56 +0000 (15:42 -0700)
committermoo <moogoesmeow123@gmail.com>
Fri, 17 Apr 2026 22:42:56 +0000 (15:42 -0700)
src/main/java/frc/robot/subsystems/spindexer/Spindexer.java
src/main/java/frc/robot/subsystems/spindexer/SpindexerConstants.java

index d9822c59bed9413c26369b1464d84ff18ed6a1f3..a7f5046a5a439758bdbad8f5b8892a591b2f8e38 100644 (file)
@@ -1,9 +1,11 @@
 package frc.robot.subsystems.spindexer;
 
 import com.ctre.phoenix6.configs.CurrentLimitsConfigs;
+import com.ctre.phoenix6.configs.MotorOutputConfigs;
 import com.ctre.phoenix6.controls.DutyCycleOut;
 import com.ctre.phoenix6.controls.VoltageOut;
 import com.ctre.phoenix6.hardware.TalonFX;
+import com.ctre.phoenix6.signals.InvertedValue;
 
 import org.littletonrobotics.junction.Logger;
 
@@ -39,6 +41,7 @@ public class Spindexer extends SubsystemBase implements SpindexerIO {
         limitConfig.SupplyCurrentLowerTime = 1.5;
         motorOne.getConfigurator().apply(limitConfig);
         motorTwo.getConfigurator().apply(limitConfig);
+        motorTwo.getConfigurator().apply(new MotorOutputConfigs().withInverted(InvertedValue.Clockwise_Positive));
 
         if (!Constants.DISABLE_SMART_DASHBOARD) {
             SmartDashboard.putData("Spindexer Run Forward", new InstantCommand(() -> maxSpindexer()));
index 1855440a41635e441c10f27ceba01e0a0a79b6a4..0d2b357812395f6e9352b2225fe736cc7ac7a870 100644 (file)
@@ -2,12 +2,12 @@ package frc.robot.subsystems.spindexer;
 
 public class SpindexerConstants {
     public static final double spindexerVelocityWithBall = 6.0; // rps (for counting balls)
-    public static final double currentLimit = 40; // A
+    public static final double currentLimit = 20; // A
     public static final double spindexerForwardVoltage = 1.00; // Volts (set low for testing)
     public static final double spindexerReverseVoltage = -1.00; // Volts
     public static final double GEAR_RATIO = 27.0; // unused & both motors have same gearing
 
-    public static final double CURRENT_SPIKE_LIMIT = 150;
+    public static final double CURRENT_SPIKE_LIMIT = 20;
     public static final double CURRENT_TIME_LIMIT = 1.0; //s
     public static final double JAM_CURRENT_THRESHOLD = 75.0; // A
     public static final double JAM_DEBOUNCE_TIME = 0.3; // seconds