okapi::AbstractButton class

Base classes

template<typename T>
class ControllerInput

Derived classes

class ButtonBase

Constructors, destructors, conversion operators

~AbstractButton() virtual

Public functions

auto isPressed() -> bool pure virtual
Return whether the button is currently pressed.
auto changed() -> bool pure virtual
Return whether the state of the button changed since the last time this method was called.
auto changedToPressed() -> bool pure virtual
Return whether the state of the button changed to being pressed since the last time this method was called.
auto changedToReleased() -> bool pure virtual
Return whether the state of the button to being not pressed changed since the last time this method was called.
auto controllerGet() -> bool override
Get the sensor value for use in a control loop.

Function documentation

bool okapi::AbstractButton::controllerGet() override

Get the sensor value for use in a control loop.

Returns the current sensor value. This is the same as the output of the pressed() method.

This method might be automatically called in another thread by the controller.