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;
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()));
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