|
libstp
Robotics library for Botball
|
#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 () |
Singleton wrapper around the robot's shared physical button input.
Definition at line 16 of file button.hpp.
|
delete |
|
delete |
|
static |
Access the process-wide button instance.
| bool libstp::button::Button::isPressed | ( | ) | const |
Return the current raw pressed state.
| void libstp::button::Button::setDigital | ( | int | port | ) |
| void libstp::button::Button::setDigital | ( | std::shared_ptr< hal::digital::DigitalSensor > | sensor | ) |
| void libstp::button::Button::waitForButtonPress | ( | ) | const |
Block until the button is pressed according to the active sensor implementation.