From 5f33a79314f4f14c81f03a86d18c941ef81b725a Mon Sep 17 00:00:00 2001 From: Rowan Flood <121908273+rflood07@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:57:17 -0600 Subject: [PATCH] smartcurrentlimits --- src/main/java/frc/robot/subsystems/IntakeSubsystem.java | 8 ++++++++ src/main/java/frc/robot/subsystems/ShooterSubsystem.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystems/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/IntakeSubsystem.java index 19d862eb..6ae4004f 100644 --- a/src/main/java/frc/robot/subsystems/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/IntakeSubsystem.java @@ -32,6 +32,12 @@ public IntakeSubsystem() { brush1 = new CANSparkMax(IntakeConstants.BRUSH_1_MOTOR, MotorType.kBrushless); brush2 = new CANSparkMax(IntakeConstants.BRUSH_2_MOTOR, MotorType.kBrushless); brush3 = new CANSparkMax(IntakeConstants.BRUSH_3_MOTOR, MotorType.kBrushless); + brush1.setSmartCurrentLimit(20, 20, 60); + brush2.setSmartCurrentLimit(20, 20, 60); + brush3.setSmartCurrentLimit(20, 20, 60); + brush1.burnFlash(); + brush2.burnFlash(); + brush3.burnFlash(); brush1.setIdleMode(IdleMode.kCoast); brush2.setIdleMode(IdleMode.kCoast); brush3.setIdleMode(IdleMode.kCoast); @@ -40,6 +46,8 @@ public IntakeSubsystem() { intake2.setInverted(true); intake1.setIdleMode(IdleMode.kCoast); intake2.setIdleMode(IdleMode.kCoast); + intake1.setSmartCurrentLimit(20, 20, 60); + intake2.setSmartCurrentLimit(20, 20, 60); intake1.burnFlash(); intake2.burnFlash(); } diff --git a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java index 41a2f35e..22816fa5 100644 --- a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java +++ b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java @@ -76,7 +76,7 @@ public ShooterSubsystem(double runSpeed) { PIDconfigs.kP = kP; PIDconfigs.kI = kI; PIDconfigs.kD = kD; - PIDconfigs.kS = kFF; + PIDconfigs.kS = kFF; SmartDashboard.putNumber("P Gain", Constants.ShooterConstants.kP); SmartDashboard.putNumber("I Gain", Constants.ShooterConstants.kI);