#include <adiButton.hpp>
|
| | ADIButton (std::uint8_t iport, bool iinverted=false) |
| | A button in an ADI port.
|
| |
| | ADIButton (std::pair< std::uint8_t, std::uint8_t > iports, bool iinverted=false) |
| | A button in an ADI port.
|
| |
| | ButtonBase (bool iinverted=false) |
| |
| bool | isPressed () override |
| | Return whether the button is currently pressed.
|
| |
| bool | changed () override |
| | Return whether the state of the button changed since the last time this method was called.
|
| |
| bool | changedToPressed () override |
| | Return whether the state of the button changed to pressed since the last time this method was called.
|
| |
| bool | changedToReleased () override |
| | Return whether the state of the button to not pressed since the last time this method was called.
|
| |
| virtual | ~AbstractButton () |
| |
| virtual bool | controllerGet () override |
| | Get the sensor value for use in a control loop.
|
| |
Definition at line 12 of file adiButton.hpp.
◆ ADIButton() [1/2]
| okapi::ADIButton::ADIButton |
( |
std::uint8_t |
iport, |
|
|
bool |
iinverted = false |
|
) |
| |
A button in an ADI port.
- Parameters
-
| iport | The ADI port number ([1, 8], [a, h], [A, H]). |
| iinverted | Whether the button is inverted (true meaning default pressed and false meaning default not pressed). |
◆ ADIButton() [2/2]
| okapi::ADIButton::ADIButton |
( |
std::pair< std::uint8_t, std::uint8_t > |
iports, |
|
|
bool |
iinverted = false |
|
) |
| |
A button in an ADI port.
auto invertedBtn =
ADIButton({1,
'A'},
true);
- Parameters
-
| iports | The ports the button is plugged in to in the order {smart port, button port}. The smart port is the smart port number ([1, 21]). The button port is the ADI port number ([1, 8], [a, h], [A, H]). |
| iinverted | Whether the button is inverted (true meaning default pressed and false meaning default not pressed). |
◆ currentlyPressed()
| virtual bool okapi::ADIButton::currentlyPressed |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ port
| std::uint8_t okapi::ADIButton::port |
|
protected |
◆ smartPort
| std::uint8_t okapi::ADIButton::smartPort |
|
protected |
The documentation for this class was generated from the following file: