RobotCore
Robot Core Documentation
Public Member Functions | List of all members
edu.wpi.first.wpilibj2.command.ScheduleCommand Class Reference
Inheritance diagram for edu.wpi.first.wpilibj2.command.ScheduleCommand:
edu.wpi.first.wpilibj2.command.CommandBase edu.wpi.first.wpilibj2.command.Command

Public Member Functions

 ScheduleCommand (Command... toSchedule)
 
void initialize ()
 
boolean isFinished ()
 
boolean runsWhenDisabled ()
 
- Public Member Functions inherited from edu.wpi.first.wpilibj2.command.CommandBase
final void addRequirements (Subsystem... requirements)
 
Set< SubsystemgetRequirements ()
 
- 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 String getName ()
 

Additional Inherited Members

- Protected Attributes inherited from edu.wpi.first.wpilibj2.command.CommandBase
Set< Subsystemm_requirements = new HashSet<>()
 

Detailed Description

Schedules the given commands when this command is initialized. Useful for forking off from CommandGroups. Note that if run from a CommandGroup, the group will not know about the status of the scheduled commands, and will treat this command as finishing instantly.

Constructor & Destructor Documentation

◆ ScheduleCommand()

edu.wpi.first.wpilibj2.command.ScheduleCommand.ScheduleCommand ( Command...  toSchedule)

Creates a new ScheduleCommand that schedules the given commands when initialized.

Parameters
toSchedulethe commands to schedule

Member Function Documentation

◆ initialize()

void edu.wpi.first.wpilibj2.command.ScheduleCommand.initialize ( )

The initial subroutine of a command. Called once when the command is initially scheduled.

Implements edu.wpi.first.wpilibj2.command.Command.

◆ isFinished()

boolean edu.wpi.first.wpilibj2.command.ScheduleCommand.isFinished ( )

Whether the command has finished. Once a command finishes, the scheduler will call its end() method and un-schedule it.

Returns
whether the command has finished.

Implements edu.wpi.first.wpilibj2.command.Command.

◆ runsWhenDisabled()

boolean edu.wpi.first.wpilibj2.command.ScheduleCommand.runsWhenDisabled ( )

Whether the given command should run when the robot is disabled. Override to return true if the command should run when disabled.

Returns
whether the command should run when the robot is disabled

Implements edu.wpi.first.wpilibj2.command.Command.


The documentation for this class was generated from the following file: