Skip to content

Change configs for new back right module #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/frc/team2412/robot/Controls.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ public void bindShooterControls() {
BooleanSupplier b = driveController.getDPadButton(Direction.UP)::get;

driveController.getDPadButton(Direction.DOWN).whenPressed(
new ShooterHoodRPMCommand(subsystems.shooterSubsystem, 1400, 35).withInterrupt(b)
.alongWith(new InstantCommand(() -> subsystems.shooterSubsystem.setTurretAngle(-90))));
new ShooterHoodRPMCommand(subsystems.shooterSubsystem, 2030, 6.3).withInterrupt(b)
.alongWith(new InstantCommand(() -> subsystems.shooterSubsystem.setTurretAngle(90))));

driveController.getDPadButton(Direction.LEFT).whenPressed(
new ShooterHoodRPMCommand(subsystems.shooterSubsystem, 2400, 9.3).withInterrupt(b)
.alongWith(new InstantCommand(() -> subsystems.shooterSubsystem.setTurretAngle(-90))));
new ShooterHoodRPMCommand(subsystems.shooterSubsystem, 2075, 18.7).withInterrupt(b)
.alongWith(new InstantCommand(() -> subsystems.shooterSubsystem.setTurretAngle(90))));

driveController.getDPadButton(Direction.RIGHT).whenPressed(
new ShooterHoodRPMCommand(subsystems.shooterSubsystem, 0, 0).withInterrupt(b)
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/frc/team2412/robot/Hardware.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ public class Hardware {
DRIVETRAIN_BACK_LEFT_ANGLE_MOTOR = 8, DRIVETRAIN_BACK_RIGHT_ANGLE_MOTOR = 11;
public static final int DRIVETRAIN_FRONT_LEFT_ENCODER_PORT = 3, DRIVETRAIN_FRONT_RIGHT_ENCODER_PORT = 6,
DRIVETRAIN_BACK_LEFT_ENCODER_PORT = 9, DRIVETRAIN_BACK_RIGHT_ENCODER_PORT = 12;
public static final double DRIVETRAIN_FRONT_LEFT_ENCODER_OFFSET = -Math.toRadians(67.852);
public static final double DRIVETRAIN_FRONT_LEFT_ENCODER_OFFSET = -Math.toRadians(67.85156);
public static final double DRIVETRAIN_FRONT_RIGHT_ENCODER_OFFSET = -Math.toRadians(221.924);
public static final double DRIVETRAIN_BACK_LEFT_ENCODER_OFFSET = -Math.toRadians(214.980);
public static final double DRIVETRAIN_BACK_RIGHT_ENCODER_OFFSET = -Math.toRadians(168.398);
public static final double DRIVETRAIN_BACK_LEFT_ENCODER_OFFSET = -Math.toRadians(214.892578);
public static final double DRIVETRAIN_BACK_RIGHT_ENCODER_OFFSET = -Math.toRadians(168.310547 + 90);
public static final String DRIVETRAIN_INTAKE_CAN_BUS_NAME = "DrivebaseIntake";

// Changes swerve modules & disables subsystems missing from the swerve test bot
private static final Mk4SwerveModuleHelper.GearRatio GEAR_RATIO;

static {
GEAR_RATIO = Robot.getInstance().isCompetition()

? Mk4SwerveModuleHelper.GearRatio.L2
: Mk4SwerveModuleHelper.GearRatio.L1;
}
Expand Down