Package com.thunder.lib.commands
Class ThunderAutoModeCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
com.thunder.lib.commands.ThunderAutoModeCommand
- All Implemented Interfaces:
Sendable
A command that executes a ThunderAuto Auto Mode.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior -
Constructor Summary
ConstructorsConstructorDescriptionThunderAutoModeCommand(String autoModeName, ThunderAutoProject project, ThunderTrajectoryRunnerProperties properties) Constructs a ThunderAutoModeCommand. -
Method Summary
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, runsWhenDisabled, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
ThunderAutoModeCommand
public ThunderAutoModeCommand(String autoModeName, ThunderAutoProject project, ThunderTrajectoryRunnerProperties properties) Constructs a ThunderAutoModeCommand.- Parameters:
autoModeName- The name of the auto mode to follow.project- The ThunderAutoProject that contains the auto mode and all referenced trajectories, actions, and conditions.properties- The ThunderTrajectoryRunnerProperties to use for following trajectories.
-
-
Method Details
-
isValid
public boolean isValid()Checks if the command has a valid auto mode to follow.- Returns:
- True or false.
-
initialize
public void initialize()- Overrides:
initializein classCommand
-
execute
public void execute() -
end
public void end(boolean interrupted) -
isFinished
public boolean isFinished()- Overrides:
isFinishedin classCommand
-