[wpilib] Add BooleanEvent/Trigger factories on HID classes (#4247)

This commit is contained in:
Starlight220
2022-06-14 08:48:16 +03:00
committed by GitHub
parent 9b1bf5c7f1
commit fd884581e4
24 changed files with 1717 additions and 1 deletions

View File

@@ -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.
*