Package | Description |
---|---|
edu.wpi.first.wpilibj.buttons | |
edu.wpi.first.wpilibj.command |
Modifier and Type | Method and Description |
---|---|
void |
Trigger.cancelWhenActive(Command command)
Cancels a command when the trigger becomes active
|
void |
Button.cancelWhenPressed(Command command)
Cancel the command when the button is pressed
|
void |
Trigger.toggleWhenActive(Command command)
Toggles a command when the trigger becomes active
|
void |
Button.toggleWhenPressed(Command command)
Toggles the command whenever the button is pressed (on then off then on)
|
void |
Trigger.whenActive(Command command)
Starts the given command whenever the trigger just becomes active.
|
void |
Trigger.whenInactive(Command command)
Starts the command when the trigger becomes inactive
|
void |
Button.whenPressed(Command command)
Starts the given command whenever the button is newly pressed.
|
void |
Button.whenReleased(Command command)
Starts the command when the button is released
|
void |
Trigger.whileActive(Command command)
Constantly starts the given command while the button is held.
|
void |
Button.whileHeld(Command command)
Constantly starts the given command while the button is held.
|
Modifier and Type | Class and Description |
---|---|
class |
CommandGroup
A
CommandGroup is a list of commands which are executed in sequence. |
class |
PIDCommand
This class defines a
Command which interacts heavily with a PID loop. |
class |
PrintCommand
A
PrintCommand is a command which prints out a string when it is initialized, and then immediately finishes. |
class |
StartCommand
A
StartCommand will call the start() method of another command when it is initialized
and will finish immediately. |
class |
WaitCommand
A
WaitCommand will wait for a certain amount of time before finishing. |
class |
WaitForChildren
This command will only finish if whatever
CommandGroup it is in has no active children. |
class |
WaitUntilCommand
WaitUntilCommand - waits until an absolute game time.
|
Modifier and Type | Method and Description |
---|---|
Command |
Subsystem.getCurrentCommand()
Returns the command which currently claims this subsystem.
|
protected Command |
Subsystem.getDefaultCommand()
Returns the default command (or null if there is none).
|
Modifier and Type | Method and Description |
---|---|
void |
Scheduler.add(Command command)
Adds the command to the
Scheduler . |
void |
CommandGroup.addParallel(Command command)
Adds a new child
Command to the group. |
void |
CommandGroup.addParallel(Command command,
double timeout)
Adds a new child
Command to the group with the given timeout. |
void |
CommandGroup.addSequential(Command command)
Adds a new
Command to the group. |
void |
CommandGroup.addSequential(Command command,
double timeout)
Adds a new
Command to the group with a given timeout. |
protected void |
Subsystem.setDefaultCommand(Command command)
Sets the default command.
|
Constructor and Description |
---|
StartCommand(Command commandToStart)
Instantiates a
StartCommand which will start the
given command whenever its initialize() is called. |
Copyright © 2015. All rights reserved.