Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammingSR committed Mar 12, 2024
1 parent 3dd18a2 commit 80bf546
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 25 deletions.
22 changes: 4 additions & 18 deletions src/main/deploy/pathplanner/autos/4-Center-Stays.auto
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,9 @@
"data": {
"commands": [
{
"type": "sequential",
"type": "path",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "CenterNote-Center"
}
}
]
"pathName": "CenterNote-Center"
}
},
{
Expand Down Expand Up @@ -60,16 +53,9 @@
"data": {
"commands": [
{
"type": "sequential",
"type": "path",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "LeftNote-Center"
}
}
]
"pathName": "LeftNote-Center"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 10 additions & 2 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/frc/robot/subsystems/ShooterSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -69,7 +69,7 @@ public void periodic() {

public static enum ShootSpeed {
Shooting,
Halfway,
Prep,
Off
}
}

0 comments on commit 80bf546

Please sign in to comment.