From 6aedc309da19ee5df9ca28dd8a0c819f8caa768f Mon Sep 17 00:00:00 2001 From: moo Date: Fri, 17 Apr 2026 15:42:56 -0700 Subject: [PATCH] testing, fix reversed motor2 --- src/main/java/frc/robot/subsystems/spindexer/Spindexer.java | 3 +++ .../frc/robot/subsystems/spindexer/SpindexerConstants.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/spindexer/Spindexer.java b/src/main/java/frc/robot/subsystems/spindexer/Spindexer.java index d9822c5..a7f5046 100644 --- a/src/main/java/frc/robot/subsystems/spindexer/Spindexer.java +++ b/src/main/java/frc/robot/subsystems/spindexer/Spindexer.java @@ -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())); diff --git a/src/main/java/frc/robot/subsystems/spindexer/SpindexerConstants.java b/src/main/java/frc/robot/subsystems/spindexer/SpindexerConstants.java index 1855440..0d2b357 100644 --- a/src/main/java/frc/robot/subsystems/spindexer/SpindexerConstants.java +++ b/src/main/java/frc/robot/subsystems/spindexer/SpindexerConstants.java @@ -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 -- 2.39.5