libstp
Robotics library for Botball
Loading...
Searching...
No Matches
libstp::button::Button Class Referencefinal

#include <button.hpp>

Public Member Functions

void setDigital (int port)
void setDigital (std::shared_ptr< hal::digital::DigitalSensor > sensor)
bool isPressed () const
void waitForButtonPress () const
 Button (const Button &)=delete
Button & operator= (const Button &)=delete
 Button (Button &&)=delete
Button & operator= (Button &&)=delete

Static Public Member Functions

static Button & instance ()

Detailed Description

Singleton wrapper around the robot's shared physical button input.

Definition at line 16 of file button.hpp.

Constructor & Destructor Documentation

◆ Button() [1/2]

libstp::button::Button::Button ( const Button & )
delete

◆ Button() [2/2]

libstp::button::Button::Button ( Button && )
delete

Member Function Documentation

◆ instance()

Button & libstp::button::Button::instance ( )
static

Access the process-wide button instance.

◆ isPressed()

bool libstp::button::Button::isPressed ( ) const

Return the current raw pressed state.

◆ operator=() [1/2]

Button & libstp::button::Button::operator= ( Button && )
delete

◆ operator=() [2/2]

Button & libstp::button::Button::operator= ( const Button & )
delete

◆ setDigital() [1/2]

void libstp::button::Button::setDigital ( int port)

◆ setDigital() [2/2]

void libstp::button::Button::setDigital ( std::shared_ptr< hal::digital::DigitalSensor > sensor)

◆ waitForButtonPress()

void libstp::button::Button::waitForButtonPress ( ) const

Block until the button is pressed according to the active sensor implementation.


The documentation for this class was generated from the following file:
  • /home/runner/work/raccoon-lib/raccoon-lib/modules/libstp-button/include/button/button.hpp