Class ClimberDisableServos
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.FunctionalCommand
edu.wpi.first.wpilibj2.command.InstantCommand
frc.alotobots.reefscape.subsystems.climber.commands.ClimberDisableServos
- All Implemented Interfaces:
Sendable
A command that disables the servos in the climber subsystem. This command executes instantly and
can run when the robot is disabled.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionClimberDisableServos
(ClimberSubsystem climberSubsystem) Creates a new ClimberDisableServos command. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when the command is initially scheduled.boolean
Returns whether this command can run when the robot is disabled.Methods inherited from class edu.wpi.first.wpilibj2.command.FunctionalCommand
end, execute, isFinished
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
-
ClimberDisableServos
Creates a new ClimberDisableServos command.- Parameters:
climberSubsystem
- The climber subsystem to control
-
-
Method Details
-
initialize
public void initialize()Called when the command is initially scheduled. Disables the servos in the climber subsystem.- Overrides:
initialize
in classFunctionalCommand
-
runsWhenDisabled
public boolean runsWhenDisabled()Returns whether this command can run when the robot is disabled.- Overrides:
runsWhenDisabled
in classCommand
- Returns:
- true, allowing this command to run when the robot is disabled
-