Package edu.wpi.first.wpilibj.buttons
Class POVButton
- java.lang.Object
-
- edu.wpi.first.wpilibj.buttons.Trigger
-
- edu.wpi.first.wpilibj.buttons.Button
-
- edu.wpi.first.wpilibj.buttons.POVButton
-
- All Implemented Interfaces:
Sendable
public class POVButton extends Button
AButtonthat gets its state from a POV on aGenericHID.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.buttons.Trigger
Trigger.ButtonScheduler
-
-
Constructor Summary
Constructors Constructor Description POVButton(GenericHID joystick, int angle)Creates a POV button for triggering commands.POVButton(GenericHID joystick, int angle, int povNumber)Creates a POV button for triggering commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanget()Checks whether the current value of the POV is the target angle.-
Methods inherited from class edu.wpi.first.wpilibj.buttons.Button
cancelWhenPressed, toggleWhenPressed, whenPressed, whenReleased, whileHeld
-
Methods inherited from class edu.wpi.first.wpilibj.buttons.Trigger
cancelWhenActive, initSendable, toggleWhenActive, whenActive, whenInactive, whileActive
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.wpi.first.wpilibj.Sendable
addChild, getName, getSubsystem, setName, setName, setName, setName, setSubsystem
-
-
-
-
Constructor Detail
-
POVButton
public POVButton(GenericHID joystick, int angle, int povNumber)
Creates a POV button for triggering commands.- Parameters:
joystick- The GenericHID object that has the POVangle- The desired angle in degrees (e.g. 90, 270)povNumber- The POV number (seeGenericHID.getPOV(int))
-
POVButton
public POVButton(GenericHID joystick, int angle)
Creates a POV button for triggering commands. By default, acts on POV 0- Parameters:
joystick- The GenericHID object that has the POVangle- The desired angle (e.g. 90, 270)
-
-