Class ElevatorRunToHeight

java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.alotobots.reefscape.subsystems.elevator.commands.ElevatorRunToHeight
All Implemented Interfaces:
Sendable

public class ElevatorRunToHeight extends Command
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.
  • Constructor Details

    • ElevatorRunToHeight

      public ElevatorRunToHeight(ElevatorSubsystem elevatorSubsystem, Distance targetHeight)
      Creates a new ElevatorRunToHeight command.
      Parameters:
      elevatorSubsystem - The elevator subsystem to control
      targetHeight - The desired height for the elevator to reach
  • Method Details

    • initialize

      public void initialize()
      Overrides:
      initialize in class Command
    • execute

      public void execute()
      Overrides:
      execute in class Command
    • end

      public void end(boolean interrupted)
      Overrides:
      end in class Command
    • isFinished

      public boolean isFinished()
      Overrides:
      isFinished in class Command