mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[commands] Replace Command HID inheritance with delegation (#4470)
This commit is contained in:
@@ -121,6 +121,116 @@ class GenericHID {
|
||||
*/
|
||||
int GetPOV(int pov = 0) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around this angle of a POV on the
|
||||
* HID.
|
||||
*
|
||||
* <p>The POV angles start at 0 in the up direction, and increase clockwise
|
||||
* (eg right is 90, upper-left is 315).
|
||||
*
|
||||
* @param loop the event loop instance to attach the event to.
|
||||
* @param angle POV angle in degrees, or -1 for the center / not pressed.
|
||||
* @return a BooleanEvent instance based around this angle of a POV on the
|
||||
* HID.
|
||||
*/
|
||||
BooleanEvent POV(int angle, EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around this angle of a POV on the
|
||||
* HID.
|
||||
*
|
||||
* <p>The POV angles start at 0 in the up direction, and increase clockwise
|
||||
* (eg right is 90, upper-left is 315).
|
||||
*
|
||||
* @param loop the event loop instance to attach the event to.
|
||||
* @param pov index of the POV to read (starting at 0). Defaults to 0.
|
||||
* @param angle POV angle in degrees, or -1 for the center / not pressed.
|
||||
* @return a BooleanEvent instance based around this angle of a POV on the
|
||||
* HID.
|
||||
*/
|
||||
BooleanEvent POV(int pov, int angle, EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around the 0-degree angle (up) of
|
||||
* the default (index 0) POV on the HID.
|
||||
*
|
||||
* @return a BooleanEvent instance based around the 0-degree angle of a POV on
|
||||
* the HID.
|
||||
*/
|
||||
BooleanEvent POVUp(EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around the 45-degree angle (right
|
||||
* up) of the default (index 0) POV on the HID.
|
||||
*
|
||||
* @return a BooleanEvent instance based around the 45-degree angle of a POV
|
||||
* on the HID.
|
||||
*/
|
||||
BooleanEvent POVUpRight(EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around the 90-degree angle (right)
|
||||
* of the default (index 0) POV on the HID.
|
||||
*
|
||||
* @return a BooleanEvent instance based around the 90-degree angle of a POV
|
||||
* on the HID.
|
||||
*/
|
||||
BooleanEvent POVRight(EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around the 135-degree angle (right
|
||||
* down) of the default (index 0) POV on the HID.
|
||||
*
|
||||
* @return a BooleanEvent instance based around the 135-degree angle of a POV
|
||||
* on the HID.
|
||||
*/
|
||||
BooleanEvent POVDownRight(EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around the 180-degree angle (down)
|
||||
* of the default (index 0) POV on the HID.
|
||||
*
|
||||
* @return a BooleanEvent instance based around the 180-degree angle of a POV
|
||||
* on the HID.
|
||||
*/
|
||||
BooleanEvent POVDown(EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around the 225-degree angle (down
|
||||
* left) of the default (index 0) POV on the HID.
|
||||
*
|
||||
* @return a BooleanEvent instance based around the 225-degree angle of a POV
|
||||
* on the HID.
|
||||
*/
|
||||
BooleanEvent POVDownLeft(EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around the 270-degree angle (left)
|
||||
* of the default (index 0) POV on the HID.
|
||||
*
|
||||
* @return a BooleanEvent instance based around the 270-degree angle of a POV
|
||||
* on the HID.
|
||||
*/
|
||||
BooleanEvent POVLeft(EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around the 315-degree angle (left
|
||||
* up) of the default (index 0) POV on the HID.
|
||||
*
|
||||
* @return a BooleanEvent instance based around the 315-degree angle of a POV
|
||||
* on the HID.
|
||||
*/
|
||||
BooleanEvent POVUpLeft(EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Constructs a BooleanEvent instance based around the center (not pressed) of
|
||||
* the default (index 0) POV on the HID.
|
||||
*
|
||||
* @return a BooleanEvent instance based around the center of a POV on the
|
||||
* HID.
|
||||
*/
|
||||
BooleanEvent POVCenter(EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Get the number of axes for the HID.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user