diff --git a/.DS_Store b/.DS_Store index a294fe1..69a5cee 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gradle/8.5/checksums/checksums.lock b/.gradle/8.5/checksums/checksums.lock new file mode 100644 index 0000000..0545ad1 Binary files /dev/null and b/.gradle/8.5/checksums/checksums.lock differ diff --git a/.gradle/8.5/checksums/sha1-checksums.bin b/.gradle/8.5/checksums/sha1-checksums.bin new file mode 100644 index 0000000..a884186 Binary files /dev/null and b/.gradle/8.5/checksums/sha1-checksums.bin differ diff --git a/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock b/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock new file mode 100644 index 0000000..10231cb Binary files /dev/null and b/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock differ diff --git a/.gradle/8.5/dependencies-accessors/gc.properties b/.gradle/8.5/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/8.5/executionHistory/executionHistory.bin b/.gradle/8.5/executionHistory/executionHistory.bin new file mode 100644 index 0000000..4980a4c Binary files /dev/null and b/.gradle/8.5/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.5/executionHistory/executionHistory.lock b/.gradle/8.5/executionHistory/executionHistory.lock new file mode 100644 index 0000000..5c7af4d Binary files /dev/null and b/.gradle/8.5/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.5/fileChanges/last-build.bin b/.gradle/8.5/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/.gradle/8.5/fileChanges/last-build.bin differ diff --git a/.gradle/8.5/fileHashes/fileHashes.bin b/.gradle/8.5/fileHashes/fileHashes.bin new file mode 100644 index 0000000..ebe4fb9 Binary files /dev/null and b/.gradle/8.5/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.5/fileHashes/fileHashes.lock b/.gradle/8.5/fileHashes/fileHashes.lock new file mode 100644 index 0000000..a87e3a3 Binary files /dev/null and b/.gradle/8.5/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.5/fileHashes/resourceHashesCache.bin b/.gradle/8.5/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..8418eb5 Binary files /dev/null and b/.gradle/8.5/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/8.5/gc.properties b/.gradle/8.5/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..c104e2e Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..99b9473 --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Mon Sep 30 15:02:48 MDT 2024 +gradle.version=8.5 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..ce0c191 Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe new file mode 100644 index 0000000..e06a061 Binary files /dev/null and b/.gradle/file-system.probe differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index da820b0..fb4c63b 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -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 ) @@ -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, @@ -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, @@ -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)) diff --git a/src/main/java/frc/robot/constants/DrivetrainConstants.java b/src/main/java/frc/robot/constants/DrivetrainConstants.java index b019ccf..fef2e40 100644 --- a/src/main/java/frc/robot/constants/DrivetrainConstants.java +++ b/src/main/java/frc/robot/constants/DrivetrainConstants.java @@ -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 @@ -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;