public class POVButton
extends edu.wpi.first.wpilibj.buttons.Trigger
| Modifier and Type | Field | Description |
|---|---|---|
private POV |
button |
|
private edu.wpi.first.wpilibj.Joystick |
joystick |
| Constructor | Description |
|---|---|
POVButton(edu.wpi.first.wpilibj.Joystick joystick,
POV button) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
cancelWhenPressed(edu.wpi.first.wpilibj.command.Command command) |
Cancel the command when the button is pressed
|
boolean |
get() |
|
void |
toggleWhenPressed(edu.wpi.first.wpilibj.command.Command command) |
Toggles the command whenever the button is pressed (on then off then on)
|
void |
whenPressed(edu.wpi.first.wpilibj.command.Command command) |
Starts the given command whenever the button is newly pressed.
|
void |
whenReleased(edu.wpi.first.wpilibj.command.Command command) |
Starts the command when the button is released
|
void |
whileHeld(edu.wpi.first.wpilibj.command.Command command) |
Constantly starts the given command while the button is held.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprivate POV button
private edu.wpi.first.wpilibj.Joystick joystick
public POVButton(edu.wpi.first.wpilibj.Joystick joystick,
POV button)
public void whenPressed(edu.wpi.first.wpilibj.command.Command command)
command - the command to startpublic void whileHeld(edu.wpi.first.wpilibj.command.Command command)
Command.start() will be called repeatedly while the button is held,
and will be canceled when the button is released.
command - the command to startpublic void whenReleased(edu.wpi.first.wpilibj.command.Command command)
command - the command to startpublic void toggleWhenPressed(edu.wpi.first.wpilibj.command.Command command)
command - the command to startpublic void cancelWhenPressed(edu.wpi.first.wpilibj.command.Command command)
command - the command to startpublic boolean get()
get in class edu.wpi.first.wpilibj.buttons.Trigger