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

public class WristHoldAngle extends ScheduleCommand
Command that holds the wrist at its current position. This command uses velocity control with target speed of 0 and applies it to the wrist. ScheduleCommand to ensure that other commands are able to interrupt it in a command group.
  • Constructor Details

    • WristHoldAngle

      public WristHoldAngle(WristSubsystem wristSubsystem)
      Creates a new WristHoldAngle command.
      Parameters:
      wristSubsystem - The wrist subsystem this command will run on
  • Method Details

    • initialize

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

      public void execute()
      Called repeatedly when this command is scheduled to run.
      Overrides:
      execute in class Command
    • end

      public void end(boolean interrupted)
      Called once when the command ends or is interrupted. Stops the wrist to ensure it doesn't continue moving.
      Overrides:
      end in class Command
      Parameters:
      interrupted - Whether the command was interrupted (true) or completed normally (false)
    • isFinished

      public boolean isFinished()
      Returns whether this command has finished. This command never finishes on its own and will run until interrupted.
      Overrides:
      isFinished in class ScheduleCommand
      Returns:
      false always, as this is a command that should not terminate