448 static constexpr int kA = 0;
450 static constexpr int kB = 1;
452 static constexpr int kX = 2;
454 static constexpr int kY = 3;
This class provides an easy way to link actions to active high logic signals.
Definition BooleanEvent.hpp:28
A declarative way to bind a set of actions to a loop and execute them when the loop is polled.
Definition EventLoop.hpp:15
bool GetAButton() const
Read the value of the A button on the controller.
bool GetBButtonReleased()
Whether the B button was released since the last check.
bool GetLeftBumperButton() const
Read the value of the left bumper button on the controller.
BooleanEvent Y(EventLoop *loop) const
Constructs an event instance around the Y button's digital signal.
bool GetRightStickButton() const
Read the value of the right stick button on the controller.
BooleanEvent Back(EventLoop *loop) const
Constructs an event instance around the back button's digital signal.
bool GetLeftBumperButtonReleased()
Whether the left bumper button was released since the last check.
BooleanEvent RightTrigger(EventLoop *loop) const
Constructs an event instance around the axis value of the right trigger.
bool GetStartButtonPressed()
Whether the start button was pressed since the last check.
double GetLeftY() const
Get the Y axis value of left side of the controller.
BooleanEvent RightBumper(EventLoop *loop) const
Constructs an event instance around the right bumper button's digital signal.
bool GetRightStickButtonReleased()
Whether the right stick button was released since the last check.
BooleanEvent LeftTrigger(double threshold, EventLoop *loop) const
Constructs an event instance around the axis value of the left trigger.
double GetLeftTriggerAxis() const
Get the left trigger axis value of the controller.
bool GetBButtonPressed()
Whether the B button was pressed since the last check.
NiDsXboxController(int port)
Construct an instance of a controller.
bool GetRightBumperButton() const
Read the value of the right bumper button on the controller.
double GetRightY() const
Get the Y axis value of right side of the controller.
bool GetLeftStickButtonPressed()
Whether the left stick button was pressed since the last check.
double GetRightX() const
Get the X axis value of right side of the controller.
bool GetBackButtonPressed()
Whether the back button was pressed since the last check.
bool GetYButton() const
Read the value of the Y button on the controller.
double GetLeftX() const
Get the X axis value of left side of the controller.
bool GetAButtonReleased()
Whether the A button was released since the last check.
bool GetRightBumperButtonPressed()
Whether the right bumper button was pressed since the last check.
bool GetLeftStickButtonReleased()
Whether the left stick button was released since the last check.
void InitSendable(wpi::util::SendableBuilder &builder) override
Initializes this Sendable object.
BooleanEvent X(EventLoop *loop) const
Constructs an event instance around the X button's digital signal.
BooleanEvent A(EventLoop *loop) const
Constructs an event instance around the A button's digital signal.
bool GetStartButtonReleased()
Whether the start button was released since the last check.
bool GetXButton() const
Read the value of the X button on the controller.
BooleanEvent RightTrigger(double threshold, EventLoop *loop) const
Constructs an event instance around the axis value of the right trigger.
bool GetBackButton() const
Read the value of the back button on the controller.
bool GetYButtonPressed()
Whether the Y button was pressed since the last check.
BooleanEvent RightStick(EventLoop *loop) const
Constructs an event instance around the right stick button's digital signal.
bool GetXButtonPressed()
Whether the X button was pressed since the last check.
bool GetBackButtonReleased()
Whether the back button was released since the last check.
BooleanEvent LeftBumper(EventLoop *loop) const
Constructs an event instance around the left bumper button's digital signal.
BooleanEvent B(EventLoop *loop) const
Constructs an event instance around the B button's digital signal.
~NiDsXboxController() override=default
bool GetBButton() const
Read the value of the B button on the controller.
double GetRightTriggerAxis() const
Get the right trigger axis value of the controller.
bool GetStartButton() const
Read the value of the start button on the controller.
BooleanEvent LeftTrigger(EventLoop *loop) const
Constructs an event instance around the axis value of the left trigger.
BooleanEvent LeftStick(EventLoop *loop) const
Constructs an event instance around the left stick button's digital signal.
NiDsXboxController(NiDsXboxController &&)=default
bool GetYButtonReleased()
Whether the Y button was released since the last check.
NiDsXboxController & operator=(NiDsXboxController &&)=default
bool GetXButtonReleased()
Whether the X button was released since the last check.
bool GetLeftBumperButtonPressed()
Whether the left bumper button was pressed since the last check.
bool GetLeftStickButton() const
Read the value of the left stick button on the controller.
bool GetAButtonPressed()
Whether the A button was pressed since the last check.
BooleanEvent Start(EventLoop *loop) const
Constructs an event instance around the start button's digital signal.
bool GetRightStickButtonPressed()
Whether the right stick button was pressed since the last check.
bool GetRightBumperButtonReleased()
Whether the right bumper button was released since the last check.
Helper class for building Sendable dashboard representations.
Definition SendableBuilder.hpp:21
A helper class for use with objects that add themselves to SendableRegistry.
Definition SendableHelper.hpp:21
Interface for Sendable objects.
Definition Sendable.hpp:16
Definition CvSource.hpp:15
Represents an axis on an NiDsXboxController.
Definition NiDsXboxController.hpp:470
static constexpr int kRightX
Right X axis.
Definition NiDsXboxController.hpp:474
static constexpr int kLeftTrigger
Left trigger.
Definition NiDsXboxController.hpp:480
static constexpr int kRightY
Right Y axis.
Definition NiDsXboxController.hpp:478
static constexpr int kLeftY
Left Y axis.
Definition NiDsXboxController.hpp:476
static constexpr int kRightTrigger
Right trigger.
Definition NiDsXboxController.hpp:482
static constexpr int kLeftX
Left X axis.
Definition NiDsXboxController.hpp:472