![]() |
WPILibC++ 2025.3.2
|
This class represents the onboard IO of the Romi reference robot. More...
#include <frc/romi/OnBoardIO.h>
Public Types | |
| enum | ChannelMode { INPUT , OUTPUT } |
| Mode for Romi onboard IO. More... | |
Public Member Functions | |
| OnBoardIO (OnBoardIO::ChannelMode dio1, OnBoardIO::ChannelMode dio2) | |
| bool | GetButtonAPressed () |
| Gets if the A button is pressed. | |
| bool | GetButtonBPressed () |
| Gets if the B button is pressed. | |
| bool | GetButtonCPressed () |
| Gets if the C button is pressed. | |
| void | SetGreenLed (bool value) |
| Sets the green LED. | |
| void | SetRedLed (bool value) |
| Sets the red LED. | |
| void | SetYellowLed (bool value) |
| Sets the yellow LED. | |
Public Attributes | |
| units::second_t | m_nextMessageTime = 0_s |
Static Public Attributes | |
| static constexpr auto | kMessageInterval = 1_s |
This class represents the onboard IO of the Romi reference robot.
This includes the pushbuttons and LEDs.
DIO 0 - Button A (input only) DIO 1 - Button B (input) or Green LED (output) DIO 2 - Button C (input) or Red LED (output) DIO 3 - Yellow LED (output only)
| frc::OnBoardIO::OnBoardIO | ( | OnBoardIO::ChannelMode | dio1, |
| OnBoardIO::ChannelMode | dio2 ) |
| bool frc::OnBoardIO::GetButtonAPressed | ( | ) |
Gets if the A button is pressed.
| bool frc::OnBoardIO::GetButtonBPressed | ( | ) |
Gets if the B button is pressed.
| bool frc::OnBoardIO::GetButtonCPressed | ( | ) |
Gets if the C button is pressed.
| void frc::OnBoardIO::SetGreenLed | ( | bool | value | ) |
Sets the green LED.
| void frc::OnBoardIO::SetRedLed | ( | bool | value | ) |
Sets the red LED.
| void frc::OnBoardIO::SetYellowLed | ( | bool | value | ) |
Sets the yellow LED.
|
staticconstexpr |
| units::second_t frc::OnBoardIO::m_nextMessageTime = 0_s |