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

public class ElevatorOpenLoop extends Command
Default command for manual control of the elevator using percent output. Allows direct operator control through a joystick or other input device.
  • Constructor Details

    • ElevatorOpenLoop

      public ElevatorOpenLoop(ElevatorSubsystem elevatorSubsystem, DoubleSupplier percent)
      Creates a new ElevatorOpenLoop command for manual elevator control.
      Parameters:
      elevatorSubsystem - The elevator subsystem to control
      percent - Supplier for the control input (-1.0 to 1.0), typically from a joystick
  • Method Details

    • initialize

      public void initialize()
      Called when the command is initially scheduled. No initialization is required for this command.
      Overrides:
      initialize in class Command
    • execute

      public void execute()
      Executes the manual control loop. Called every scheduler run while the command is scheduled.
      Overrides:
      execute in class Command
    • end

      public void end(boolean interrupted)
      Called when the command ends or is interrupted. Stops the elevator to prevent uncontrolled motion.
      Overrides:
      end in class Command
      Parameters:
      interrupted - true if the command was interrupted, false if it completed normally
    • isFinished

      public boolean isFinished()
      Determines if the command has finished. This command runs until interrupted, so it never finishes on its own.
      Overrides:
      isFinished in class Command
      Returns:
      false as this command runs continuously