From 9b53eadac070dd20a0d8dc0aa58e366cafed31cd Mon Sep 17 00:00:00 2001 From: ProgrammingSR Date: Sat, 23 Mar 2024 10:45:23 -0700 Subject: [PATCH 1/5] removed quadratic scaling on drive rotation --- src/main/java/frc/robot/RobotContainer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 5596f6e..db45276 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -151,13 +151,13 @@ public RobotContainer() { * IOConstants.kSlowModeScalar), // * 0.8, MathUtil.applyDeadband( - -m_driverController.getRightX() * Math.abs(m_driverController.getRightX()), + -m_driverController.getRightX(), IOConstants.kControllerDeadband) * DriveConstants.kMaxAngularSpeedRadiansPerSecond * (1 - m_driverController .getRightTriggerAxis() * IOConstants.kSlowModeScalar) - * 0.75, + * 0.8, !m_driverController.getLeftBumper()), m_robotDrive)); } From b369b4db157aebd9f2a0c065802093296a27e49a Mon Sep 17 00:00:00 2001 From: ProgrammingSR Date: Sat, 23 Mar 2024 19:01:58 -0700 Subject: [PATCH 2/5] untested, will test in match, 4 note change --- src/main/deploy/pathplanner/autos/4-Center-Stays.auto | 2 +- src/main/deploy/pathplanner/paths/CenterNote-Center.path | 4 ++-- src/main/deploy/pathplanner/paths/Middle5thNote-Right.path | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/4-Center-Stays.auto b/src/main/deploy/pathplanner/autos/4-Center-Stays.auto index 602b83d..7d849f7 100644 --- a/src/main/deploy/pathplanner/autos/4-Center-Stays.auto +++ b/src/main/deploy/pathplanner/autos/4-Center-Stays.auto @@ -2,7 +2,7 @@ "version": 1.0, "startingPose": { "position": { - "x": 1.3470318873095533, + "x": 1.4, "y": 5.5216374597852385 }, "rotation": 0 diff --git a/src/main/deploy/pathplanner/paths/CenterNote-Center.path b/src/main/deploy/pathplanner/paths/CenterNote-Center.path index b50dfaa..c8ea72a 100644 --- a/src/main/deploy/pathplanner/paths/CenterNote-Center.path +++ b/src/main/deploy/pathplanner/paths/CenterNote-Center.path @@ -3,12 +3,12 @@ "waypoints": [ { "anchor": { - "x": 1.3470318873095533, + "x": 1.4, "y": 5.5216374597852385 }, "prevControl": null, "nextControl": { - "x": 2.3470318873095533, + "x": 2.4, "y": 5.5216374597852385 }, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/Middle5thNote-Right.path b/src/main/deploy/pathplanner/paths/Middle5thNote-Right.path index a389143..4777efb 100644 --- a/src/main/deploy/pathplanner/paths/Middle5thNote-Right.path +++ b/src/main/deploy/pathplanner/paths/Middle5thNote-Right.path @@ -17,15 +17,15 @@ { "anchor": { "x": 8.05, - "y": 0.7104198823782273 + "y": 0.6 }, "prevControl": { "x": 7.050000000000001, - "y": 0.7104198823782273 + "y": 0.6 }, "nextControl": { "x": 9.049999999999988, - "y": 0.7104198823782273 + "y": 0.6 }, "isLocked": false, "linkedName": null From cf1efcf0bde0ad3522d0c2d3097640f6ec384f73 Mon Sep 17 00:00:00 2001 From: Programming Date: Sun, 24 Mar 2024 10:52:39 -0700 Subject: [PATCH 3/5] fixed 4 note first note --- src/main/java/frc/robot/RobotContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index db45276..235b8a5 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -66,7 +66,7 @@ public RobotContainer() { NamedCommands.registerCommand("Shoot", new SequentialCommandGroup( new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Shooting, ShooterConstants.kShooterOnTime), - new ParallelDeadlineGroup(new WaitCommand(0.25), new NoteOuttakeCommand(m_intakeSubsystem)), + new ParallelDeadlineGroup(new WaitCommand(0.65), new NoteOuttakeCommand(m_intakeSubsystem)), new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Off, ShooterConstants.kShooterOffTime))); NamedCommands.registerCommand("Intake", From 222b2dde4f033418aeae4763af414d15ba924c0d Mon Sep 17 00:00:00 2001 From: ProgrammingSR Date: Sun, 24 Mar 2024 10:58:32 -0700 Subject: [PATCH 4/5] increased shooter on time --- src/main/java/frc/robot/RobotContainer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 235b8a5..973a45d 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -65,8 +65,8 @@ public class RobotContainer { public RobotContainer() { NamedCommands.registerCommand("Shoot", new SequentialCommandGroup( - new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Shooting, ShooterConstants.kShooterOnTime), - new ParallelDeadlineGroup(new WaitCommand(0.65), new NoteOuttakeCommand(m_intakeSubsystem)), + new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Shooting, 1.5), + new ParallelDeadlineGroup(new WaitCommand(0.50), new NoteOuttakeCommand(m_intakeSubsystem)), new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Off, ShooterConstants.kShooterOffTime))); NamedCommands.registerCommand("Intake", From 0dfb511a8a4652ca9c69293bef5a516d07987b6f Mon Sep 17 00:00:00 2001 From: ProgrammingSR Date: Mon, 25 Mar 2024 17:11:21 -0700 Subject: [PATCH 5/5] feat: amp changes from comp --- src/main/java/frc/robot/RobotContainer.java | 6 +++++- src/main/java/frc/robot/commands/NoteOuttakeCommand.java | 1 - src/main/java/frc/robot/subsystems/ShooterSubsystem.java | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 973a45d..5cc7405 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -12,7 +12,6 @@ import edu.wpi.first.math.MathUtil; import edu.wpi.first.wpilibj.DriverStation; -import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.XboxController; import edu.wpi.first.wpilibj.XboxController.Button; import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; @@ -217,6 +216,11 @@ private void configureBindings() { }).onTrue(new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Shooting, ShooterConstants.kShooterOnTime)) .onFalse(new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Off, ShooterConstants.kShooterOffTime)); + new Trigger(() -> { + return m_operatorController.getXButtonPressed() == true; + }).onTrue(new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Amp, 0.1)) + .onFalse(new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Off, 0.02)); + // Climber Up, Operator Controller Right Bumper + A Button new Trigger(() -> { return m_operatorController.getAButton() && m_operatorController.getRightBumper(); diff --git a/src/main/java/frc/robot/commands/NoteOuttakeCommand.java b/src/main/java/frc/robot/commands/NoteOuttakeCommand.java index 5338ea4..2cddff1 100644 --- a/src/main/java/frc/robot/commands/NoteOuttakeCommand.java +++ b/src/main/java/frc/robot/commands/NoteOuttakeCommand.java @@ -4,7 +4,6 @@ package frc.robot.commands; -import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj2.command.Command; import frc.robot.subsystems.IntakeSubsystem; diff --git a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java index 55c14ea..dc4cd49 100644 --- a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java +++ b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java @@ -42,6 +42,9 @@ public void setShootingSpeed(ShootSpeed speed) { m_topSpeed = ShooterConstants.kShooterSpeedTop; m_bottomSpeed = ShooterConstants.kShooterSpeedBottom; break; + case Amp: + m_topSpeed = 0.2; + m_bottomSpeed = 0.3; case Prep: m_topSpeed = ShooterConstants.kPrepShooterSpeed; m_bottomSpeed = ShooterConstants.kPrepShooterSpeed; @@ -70,6 +73,7 @@ public void periodic() { public static enum ShootSpeed { Shooting, Prep, + Amp, Off } }