okapi::ControllerButton class

Base classes

class ButtonBase

Constructors, destructors, conversion operators

ControllerButton(ControllerDigital ibtn, bool iinverted = false)
A button on a Controller.
ControllerButton(ControllerId icontroller, ControllerDigital ibtn, bool iinverted = false)
A button on a Controller.

Protected functions

auto currentlyPressed() -> bool override

Protected variables

pros::controller_id_e_t id
pros::controller_digital_e_t btn

Function documentation

okapi::ControllerButton::ControllerButton(ControllerDigital ibtn, bool iinverted = false)

A button on a Controller.

Parameters
ibtn The button id.
iinverted Whether the button is inverted (default pressed instead of default released).

okapi::ControllerButton::ControllerButton(ControllerId icontroller, ControllerDigital ibtn, bool iinverted = false)

A button on a Controller.

Parameters
icontroller The Controller the button is on.
ibtn The button id.
iinverted Whether the button is inverted (default pressed instead of default released).