Class WristHoldAngle
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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionWristHoldAngle
(WristSubsystem wristSubsystem) Creates a new WristHoldAngle command. -
Method Summary
Methods inherited from class edu.wpi.first.wpilibj2.command.ScheduleCommand
runsWhenDisabled
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, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
WristHoldAngle
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 classScheduleCommand
-
execute
public void execute()Called repeatedly when this command is scheduled to run. -
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. -
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 classScheduleCommand
- Returns:
- false always, as this is a command that should not terminate
-