Class CommandFactory

java.lang.Object
frc.robot.commands.CommandFactory

public class CommandFactory extends Object
File to create commands using factories
  • Constructor Details

    • CommandFactory

      public CommandFactory()
  • Method Details

    • runIntake

      public static Command runIntake(Intake intake, ElevatorWrist elevatorWrist)
      Checks to make sure all preconditions are met before running the intake
      Parameters:
      intake - Intake subsystem
      elevatorWrist - Elevator and Wrist subsystem
      Returns:
      Returns a command
    • shootSpeaker

      public static Command shootSpeaker(Shooter shooter, Intake intake)
      Wrist follows the speaker until it is met, then it shoots
      Parameters:
      shooter - Shooter subsystem
      intake - Intake subsystem
      Returns:
      Returns a command
    • passThroughShoot

      public static Command passThroughShoot(Shooter shooter, Intake intake)
      Runs intake, indexer and shooter all at once.
      Parameters:
      shooter - Shooter subsystem
      intake - Intake subsystem
      Returns:
      Returns a command
    • spit

      public static Command spit(Shooter shooter, Intake intake)
      Command to spit out the notes
      Parameters:
      shooter - Shooter Subsystem
      intake - Intake Subsystem
      Returns:
      Command
    • intakeNote

      public static Command intakeNote(Intake intake)
      Command to run the intake and indexer at the proper speed to intake a note
      Parameters:
      intake - Intake Subsystem
      Returns:
      Command
    • autoAngleWristSpeaker

      public static Command autoAngleWristSpeaker(ElevatorWrist elevatorWrist, Swerve swerveDrive)
      Command to auto angle the wirst for the speaker opening based on distance from the speaker
      Parameters:
      elevatorWrist - Elevator Wrist Subsystem
      swerveDrive - Swerve Drive Subsystem
      Returns:
      Command
    • newIntakeCommand

      public static Command newIntakeCommand(Intake intake, ElevatorWrist elevatorWrist)
      New intake command to prevent intaking past the intake when the elevator isn't home
      Parameters:
      intake - Intake Subsystem
      elevatorWrist - Elevator Wrist Subsystem
      Returns:
      Command