RobotCore
Robot Core Documentation
|
Public Member Functions | |
InstantCommand (Runnable toRun, Subsystem... requirements) | |
InstantCommand () | |
void | initialize () |
final boolean | isFinished () |
Public Member Functions inherited from edu.wpi.first.wpilibj2.command.CommandBase | |
final void | addRequirements (Subsystem... requirements) |
Set< Subsystem > | getRequirements () |
Public Member Functions inherited from edu.wpi.first.wpilibj2.command.Command | |
default void | execute () |
default void | end (boolean interrupted) |
default ParallelRaceGroup | withTimeout (double seconds) |
default ParallelRaceGroup | withInterrupt (BooleanSupplier condition) |
default SequentialCommandGroup | beforeStarting (Runnable toRun, Subsystem... requirements) |
default SequentialCommandGroup | andThen (Runnable toRun, Subsystem... requirements) |
default SequentialCommandGroup | andThen (Command... next) |
default ParallelDeadlineGroup | deadlineWith (Command... parallel) |
default ParallelCommandGroup | alongWith (Command... parallel) |
default ParallelRaceGroup | raceWith (Command... parallel) |
default PerpetualCommand | perpetually () |
default ProxyScheduleCommand | asProxy () |
default void | schedule (boolean interruptible) |
default void | schedule () |
default void | cancel () |
default boolean | isScheduled () |
default boolean | hasRequirement (Subsystem requirement) |
default boolean | runsWhenDisabled () |
default String | getName () |
Additional Inherited Members | |
Protected Attributes inherited from edu.wpi.first.wpilibj2.command.CommandBase | |
Set< Subsystem > | m_requirements = new HashSet<>() |
A Command that runs instantly; it will initialize, execute once, and end on the same iteration of the scheduler. Users can either pass in a Runnable and a set of requirements, or else subclass this command if desired.
edu.wpi.first.wpilibj2.command.InstantCommand.InstantCommand | ( | Runnable | toRun, |
Subsystem... | requirements | ||
) |
Creates a new InstantCommand that runs the given Runnable with the given requirements.
toRun | the Runnable to run |
requirements | the subsystems required by this command |
edu.wpi.first.wpilibj2.command.InstantCommand.InstantCommand | ( | ) |
Creates a new InstantCommand with a Runnable that does nothing. Useful only as a no-arg constructor to call implicitly from subclass constructors.
void edu.wpi.first.wpilibj2.command.InstantCommand.initialize | ( | ) |
The initial subroutine of a command. Called once when the command is initially scheduled.
Implements edu.wpi.first.wpilibj2.command.Command.
final boolean edu.wpi.first.wpilibj2.command.InstantCommand.isFinished | ( | ) |
Whether the command has finished. Once a command finishes, the scheduler will call its end() method and un-schedule it.
Implements edu.wpi.first.wpilibj2.command.Command.