Skip to content
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
Binary file modified .DS_Store
Binary file not shown.
Binary file added .gradle/8.5/checksums/checksums.lock
Binary file not shown.
Binary file added .gradle/8.5/checksums/sha1-checksums.bin
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file added .gradle/8.5/executionHistory/executionHistory.lock
Binary file not shown.
Binary file added .gradle/8.5/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/8.5/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/8.5/fileHashes/fileHashes.lock
Binary file not shown.
Binary file added .gradle/8.5/fileHashes/resourceHashesCache.bin
Binary file not shown.
Empty file added .gradle/8.5/gc.properties
Empty file.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Mon Sep 30 15:02:48 MDT 2024
gradle.version=8.5
Binary file added .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file added .gradle/file-system.probe
Binary file not shown.
Empty file added .gradle/vcs-1/gc.properties
Empty file.
20 changes: 10 additions & 10 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@ public void configureButtonBindings() {

swerveSubsystem.setDefaultCommand(new DriveCommands(
swerveSubsystem,
() -> primaryController.getLeftY() * DrivetrainConstants.drivingSpeedScalar,
() -> primaryController.getLeftX() * DrivetrainConstants.drivingSpeedScalar,
() -> primaryController.getRightX() * DrivetrainConstants.rotationSpeedScalar,
() -> Math.pow(primaryController.getLeftY(), 2)/1.5 * DrivetrainConstants.drivingSpeedScalar * primaryController.getLeftY()/Math.abs(primaryController.getLeftY()),
() -> Math.pow(primaryController.getLeftX(), 2)/1.5 * DrivetrainConstants.drivingSpeedScalar * primaryController.getLeftX()/Math.abs(primaryController.getLeftX()),
() -> Math.pow(primaryController.getRightX(), 2)/1.5 * DrivetrainConstants.rotationSpeedScalar * primaryController.getRightY()/Math.abs(primaryController.getRightY()),
true,
true
));

new JoystickButton(primaryController, XboxController.Button.kRightBumper.value).whileTrue(
new DriveCommands(swerveSubsystem,
() -> primaryController.getLeftY() * DrivetrainConstants.drivingSpeedScalar / 2.5,
() -> primaryController.getLeftX() * DrivetrainConstants.drivingSpeedScalar / 2.5,
() -> primaryController.getRightX() * DrivetrainConstants.rotationSpeedScalar / 2.5,
() -> Math.pow(primaryController.getLeftY(), 2) * DrivetrainConstants.drivingSpeedScalar / 4.5 * Math.signum(primaryController.getLeftY()),
() -> Math.pow(primaryController.getLeftX(), 2) * DrivetrainConstants.drivingSpeedScalar / 4.5 * Math.signum(primaryController.getLeftX()),
() -> Math.pow(primaryController.getRightX(), 2) * DrivetrainConstants.rotationSpeedScalar / 4.5 * Math.signum(primaryController.getRightY()),
true,
true
)
Expand All @@ -107,7 +107,7 @@ public void configureButtonBindings() {
new RunCommand(() -> swerveSubsystem.zeroGyroAndOdometry())
);
//
new JoystickButton(primaryController, XboxController.Button.kX.value).whileTrue(
new POVButton(secondaryController, 270).whileTrue(
new RotateToSpeakerAndDriveCommand(
swerveSubsystem,
() -> primaryController.getLeftY() * DrivetrainConstants.drivingSpeedScalar,
Expand Down Expand Up @@ -207,7 +207,7 @@ public void configureButtonBindings() {
new IntakeCommand(intakeSubsystem, indexerSubsystem, ledSubsystem, primaryController, secondaryController, IntakeCommand.Targets.SPEAKER, false)
);

new JoystickButton(primaryController, XboxController.Button.kB.value).whileTrue(
new POVButton(secondaryController, 90).whileTrue(
new RotateToNoteAndDriveCommand(swerveSubsystem, secondaryController,
() -> -primaryController.getLeftY() * DrivetrainConstants.drivingSpeedScalar,
() -> -primaryController.getLeftX() * DrivetrainConstants.drivingSpeedScalar,
Expand Down Expand Up @@ -241,11 +241,11 @@ public void configureButtonBindings() {
// );

new POVButton(secondaryController, 0).whileTrue(
new RunCommand(() -> shooterSubsystem.setSpeed(1000))
new RunCommand(() -> shooterSubsystem.setSpeed(3500))
).whileFalse(
new RunCommand(() -> shooterSubsystem.setSpeed(0))
);

//Please let me PR GitHub
//
// new JoystickButton(secondaryController, XboxController.Button.kX.value).whileTrue(
// new RunCommand(() -> shooterSubsystem.setBottomSpeed(6500))
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/frc/robot/constants/DrivetrainConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class DrivetrainConstants {
public static final double maxAngularSpeed = 2 * Math.PI;

public static final double directionSlewRate = 20; // rads/sec - turning was 4.0
public static final double magnitudeSlewRate = 1000; // percent/second (1 = 100%) - forward/backward/traverse - was 20.0
public static final double rotationalSlewRate = 1000; // percent/second (1 = 100%) - rotation was 50.0
public static final double magnitudeSlewRate = 20; // percent/second (1 = 100%) - forward/backward/traverse - was 20.0
public static final double rotationalSlewRate = 30; // percent/second (1 = 100%) - rotation was 50.0

public static final double drivingSpeedScalar = -4.0; //make positive so gyroreset with intake forward
public static final double rotationSpeedScalar = -3 * Math.PI;//make positive so gyroreset with intake forward
Expand All @@ -28,10 +28,10 @@ public class DrivetrainConstants {
new Translation2d(-wheelBase / 2, -trackWidth / 2)
);

public static final double frontLeftChassisAngularOffset = 1.029 + Math.PI/2 + Math.PI;
public static final double frontRightChassisAngularOffset = 5.034 - Math.PI + Math.PI;
public static final double rearLeftChassisAngularOffset = 0.8645 + Math.PI;
public static final double rearRightChassisAngularOffset = 5.449 - Math.PI/2 + Math.PI;
public static final double frontLeftChassisAngularOffset = 1.029 + Math.PI/2 + Math.PI-0.83+Math.PI/4;
public static final double frontRightChassisAngularOffset = 5.034 - Math.PI;
public static final double rearLeftChassisAngularOffset = 0.8645 + Math.PI+1.327;
public static final double rearRightChassisAngularOffset = 5.449 - Math.PI/2 + Math.PI-2.153;

public static final int frontLeftDrivingPort = 7;
public static final int rearLeftDrivingPort = 5;
Expand Down