Class ElevatorRunToHeight
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.alotobots.reefscape.subsystems.elevator.commands.ElevatorRunToHeight
- All Implemented Interfaces:
Sendable
Command that moves the elevator to a specified target height. Uses closed-loop control to
accurately position the elevator. Can either end when reaching target or continuously hold
position.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionElevatorRunToHeight
(ElevatorSubsystem elevatorSubsystem, Distance targetHeight) Creates a new ElevatorRunToHeight 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
-
ElevatorRunToHeight
Creates a new ElevatorRunToHeight command.- Parameters:
elevatorSubsystem
- The elevator subsystem to controltargetHeight
- The desired height for the elevator to reach
-
-
Method Details
-
initialize
public void initialize()- Overrides:
initialize
in classCommand
-
execute
public void execute() -
end
public void end(boolean interrupted) -
isFinished
public boolean isFinished()- Overrides:
isFinished
in classCommand
-