Skip to content

Commit a15e673

Browse files
committed
Buttons PId fixed
1 parent f979a62 commit a15e673

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

src/main/java/frc/robot/Constants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public final class Constants
2626
public static final double MAX_SPEED = Units.feetToMeters(14.5);
2727

2828
// Maximum drive speed of the robot in meters per second.
29-
public static final double speedMultiplier = 0.15;
30-
public static final double rotationMultiplier = 0.15;
29+
public static final double speedMultiplier = 0.25;
30+
public static final double rotationMultiplier = 0.25;
3131

3232
// public static final class AutonConstants
3333
// {

src/main/java/frc/robot/RobotContainer.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,23 +231,24 @@ private void configureBindings()
231231
driverXbox.b().onTrue(raiseIntakeCommand);
232232
driverXbox.x().whileTrue(intakeSpinCommand);
233233
driverXbox.y().whileTrue(intakeStopCommand);
234-
// driverXbox.rightTrigger().onTrue(runIntakeCommand);
235-
// driverXbox.leftTrigger().onTrue(stowIntakeCommand);
234+
driverXbox.rightTrigger().onTrue(shooterMotorSubsystem.ForwordSlowSpin(0.5));
235+
driverXbox.leftTrigger().whileTrue(
236+
shooterMotorSubsystem.sysIdQuasistatic(Direction.kForward));
236237

237238
driverXbox.povUp().whileTrue(
238-
intakeSubsystem.sysIdQuasistatic(Direction.kForward)
239+
shooterMotorSubsystem.sysIdQuasistatic(Direction.kForward)
239240
.onlyIf(DriverStation::isTest)
240241
);
241242
driverXbox.povDown().whileTrue(
242-
intakeSubsystem.sysIdQuasistatic(Direction.kReverse)
243+
shooterMotorSubsystem.sysIdQuasistatic(Direction.kReverse)
243244
.onlyIf(DriverStation::isTest)
244245
);
245246
driverXbox.povRight().whileTrue(
246-
intakeSubsystem.sysIdDynamic(Direction.kForward)
247+
shooterMotorSubsystem.sysIdDynamic(Direction.kForward)
247248
.onlyIf(DriverStation::isTest)
248249
);
249250
driverXbox.povLeft().whileTrue(
250-
intakeSubsystem.sysIdDynamic(Direction.kReverse)
251+
shooterMotorSubsystem.sysIdDynamic(Direction.kReverse)
251252
.onlyIf(DriverStation::isTest)
252253
);
253254
} else

src/main/java/frc/robot/subsystems/ShooterMotorSubsystem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public ShooterMotorSubsystem() {
4141
leaderConfig.closedLoop
4242
.feedbackSensor(FeedbackSensor.kPrimaryEncoder)
4343
// The PID values (kP, kI, kD)
44-
.pid(0.050423, 0, 0, ClosedLoopSlot.kSlot0)
44+
.pid(3.596, 0, 0, ClosedLoopSlot.kSlot0)
4545
// The Feedforward values (kS, kV) from SysId
4646
.velocityFF(0.0) // Usually set to 0 when using kS/kV directly
4747
.feedForward
48-
.kS(0.0668, ClosedLoopSlot.kSlot0)
49-
.kV(0.12175, ClosedLoopSlot.kSlot0);
48+
.kS(41.367, ClosedLoopSlot.kSlot0)
49+
.kV(4097.7, ClosedLoopSlot.kSlot0);
5050

5151
leaderMotor.configure(leaderConfig, ResetMode.kResetSafeParameters, PersistMode.kPersistParameters);
5252

0 commit comments

Comments
 (0)