Package frc.alotobots.reefscape.commands
Class AlignToReefBranch
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.alotobots.reefscape.commands.AlignToReefBranch
- All Implemented Interfaces:
Sendable
Command that aligns the robot to the closest reef branch on the specified side.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionAlignToReefBranch
(SwerveDriveSubsystem swerveDriveSubsystem, FieldConstants.BranchType branchType) Creates a new AlignToReefBranch command. -
Method Summary
Methods inherited from class edu.wpi.first.wpilibj2.command.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, deadlineWith, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, initSendable, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, runsWhenDisabled, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
AlignToReefBranch
public AlignToReefBranch(SwerveDriveSubsystem swerveDriveSubsystem, FieldConstants.BranchType branchType) Creates a new AlignToReefBranch command.- Parameters:
swerveDriveSubsystem
- The swerve drive subsystembranchType
- The type of the reef branch to align to (LEFT, RIGHT, ANY)
-
-
Method Details
-
initialize
public void initialize()- Overrides:
initialize
in classCommand
-
execute
public void execute() -
isFinished
public boolean isFinished()- Overrides:
isFinished
in classCommand
-
end
public void end(boolean interrupted)
-