From 80bf5465fb024d43a35b47fb02d9fe2df407836f Mon Sep 17 00:00:00 2001 From: ProgrammingSR Date: Mon, 11 Mar 2024 18:19:13 -0700 Subject: [PATCH] WIP --- .../pathplanner/autos/4-Center-Stays.auto | 22 ++++--------------- src/main/java/frc/robot/Constants.java | 2 +- src/main/java/frc/robot/RobotContainer.java | 12 ++++++++-- .../robot/subsystems/ShooterSubsystem.java | 8 +++---- 4 files changed, 19 insertions(+), 25 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/4-Center-Stays.auto b/src/main/deploy/pathplanner/autos/4-Center-Stays.auto index 8ac0f0a..1cdbc94 100644 --- a/src/main/deploy/pathplanner/autos/4-Center-Stays.auto +++ b/src/main/deploy/pathplanner/autos/4-Center-Stays.auto @@ -22,16 +22,9 @@ "data": { "commands": [ { - "type": "sequential", + "type": "path", "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "CenterNote-Center" - } - } - ] + "pathName": "CenterNote-Center" } }, { @@ -60,16 +53,9 @@ "data": { "commands": [ { - "type": "sequential", + "type": "path", "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "LeftNote-Center" - } - } - ] + "pathName": "LeftNote-Center" } }, { diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index db00259..4b205ef 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -120,7 +120,7 @@ public static final class ShooterConstants { public static final int kBottomShooterMotorPort = 35; public static final double kShooterSpeedTop = 0.8; public static final double kShooterSpeedBottom = 0.9; - public static final double kPreShooterSpeed = 0.4; + public static final double kPrepShooterSpeed = 0.6; public static final double kShooterOff = 0; public static final double kShooterOffTime = 0.04; diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 21cfc10..8a8c56c 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -76,8 +76,16 @@ public RobotContainer() { new NoteIntakeCommand(m_intakeSubsystem), new IntakeArmPositionCommand(m_intakeSubsystem, ArmPosition.Retracted))); - NamedCommands.registerCommand("Pre-Speed - 30%", - new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Halfway, 0.01)); + NamedCommands.registerCommand("Prep-Speed - 60%", + new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Prep, 0.01)); + + NamedCommands.registerCommand("Spin up Shooter", + new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Shooting, 0.01)); + + NamedCommands.registerCommand("Spin down Shooter", + new ShooterSetSpeedCommand(m_shooterSubsystem, ShootSpeed.Off, 0.01)); + + NamedCommands.registerCommand("Outtake", new NoteOuttakeCommand(m_intakeSubsystem)); NamedCommands.registerCommand("Intake in", new IntakeArmPositionCommand(m_intakeSubsystem, ArmPosition.Retracted)); diff --git a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java index 3e0ccb9..f54afd1 100644 --- a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java +++ b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java @@ -42,9 +42,9 @@ public void setShootingSpeed(ShootSpeed speed) { m_topSpeed = ShooterConstants.kShooterSpeedTop; m_bottomSpeed = ShooterConstants.kShooterSpeedBottom; break; - case Halfway: - m_topSpeed = ShooterConstants.kPreShooterSpeed; - m_bottomSpeed = ShooterConstants.kPreShooterSpeed; + case Prep: + m_topSpeed = ShooterConstants.kPrepShooterSpeed; + m_bottomSpeed = ShooterConstants.kPrepShooterSpeed; break; case Off: m_topSpeed = 0.0; @@ -69,7 +69,7 @@ public void periodic() { public static enum ShootSpeed { Shooting, - Halfway, + Prep, Off } }