![]() |
DUNE: Uniform Navigational Environment
2024.09.0
|
Public Member Functions | |
| Buttons (const std::string &source_dev) | |
| void | poll (double timeout) |
| bool | changed (unsigned btn) |
| bool | value (unsigned btn) |
| DUNE::Hardware::Buttons::Buttons | ( | const std::string & | source_dev | ) |
Constructor.
| [in] | source_dev | path for the input event device file (for example /dev/input/event0) |
|
inline |
Check if a button changed state.
| [in] | btn | button number. |
| void DUNE::Hardware::Buttons::poll | ( | double | timeout | ) |
Wait for new input.
| [in] | timeout | timeout in seconds, negative for no timeout. |
References DUNE::IO::Poll::poll(), and value().
|
inline |
Get the button state.
| [in] | btn | button number. |
Referenced by poll().
