mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[wpilib] Add BooleanEvent/Trigger factories on HID classes (#4247)
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
class DriverStation;
|
||||
class BooleanEvent;
|
||||
class EventLoop;
|
||||
|
||||
/**
|
||||
* Handle input from standard HID devices connected to the Driver Station.
|
||||
@@ -91,6 +92,16 @@ class GenericHID {
|
||||
*/
|
||||
bool GetRawButtonReleased(int button);
|
||||
|
||||
/**
|
||||
* Constructs an event instance around this button's digital signal.
|
||||
*
|
||||
* @param button the button index
|
||||
* @param loop the event loop instance to attach the event to.
|
||||
* @return an event instance representing the button's digital signal attached
|
||||
* to the given loop.
|
||||
*/
|
||||
BooleanEvent Button(int button, EventLoop* loop) const;
|
||||
|
||||
/**
|
||||
* Get the value of the axis.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user