LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
okapi::AbstractButton Class Referenceabstract

#include <abstractButton.hpp>

Inheritance diagram for okapi::AbstractButton:
okapi::ControllerInput< bool > okapi::ButtonBase okapi::ADIButton okapi::ControllerButton

Public Member Functions

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

Detailed Description

Definition at line 11 of file abstractButton.hpp.

Constructor & Destructor Documentation

◆ ~AbstractButton()

virtual okapi::AbstractButton::~AbstractButton ( )
virtual

Member Function Documentation

◆ changed()

virtual bool okapi::AbstractButton::changed ( )
pure virtual

Return whether the state of the button changed since the last time this method was called.

Implemented in okapi::ButtonBase.

◆ changedToPressed()

virtual bool okapi::AbstractButton::changedToPressed ( )
pure virtual

Return whether the state of the button changed to being pressed since the last time this method was called.

Implemented in okapi::ButtonBase.

◆ changedToReleased()

virtual bool okapi::AbstractButton::changedToReleased ( )
pure virtual

Return whether the state of the button to being not pressed changed since the last time this method was called.

Implemented in okapi::ButtonBase.

◆ controllerGet()

virtual bool okapi::AbstractButton::controllerGet ( )
overridevirtual

Get the sensor value for use in a control loop.

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

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

Implements okapi::ControllerInput< bool >.

◆ isPressed()

virtual bool okapi::AbstractButton::isPressed ( )
pure virtual

Return whether the button is currently pressed.

Implemented in okapi::ButtonBase.


The documentation for this class was generated from the following file: