|
libstp
Robotics library for Botball
|
#include <Digital.hpp>
Public Member Functions | |
| ButtonGroup (std::vector< int > ports) | |
| Construct from one or more platform port indices (must be non-empty). | |
| bool | read () const override |
| True when any member port reads pressed. | |
| const std::vector< int > & | ports () const |
| The configured member ports. | |
| Public Member Functions inherited from libstp::hal::digital::DigitalSensor | |
| DigitalSensor (int port) | |
| Create a digital input bound to a platform-defined port index. | |
| virtual | ~DigitalSensor () |
Additional Inherited Members | |
| Public Attributes inherited from libstp::hal::digital::DigitalSensor | |
| int | port |
Composite digital input that reads pressed when ANY member port reads pressed (logical OR).
It IS-A DigitalSensor, so it can be used anywhere a single DigitalSensor is expected — in particular as the robot's primary button, letting several physical buttons act as one trigger. The inherited port is the first member port.
Definition at line 47 of file Digital.hpp.
|
explicit |
Construct from one or more platform port indices (must be non-empty).
|
inline |
The configured member ports.
Definition at line 57 of file Digital.hpp.
|
overridevirtual |
True when any member port reads pressed.
Reimplemented from libstp::hal::digital::DigitalSensor.