WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
frc::OnBoardIO Class Reference

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
 

Detailed Description

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)

Member Enumeration Documentation

◆ ChannelMode

Mode for Romi onboard IO.

Enumerator
INPUT 

Input.

OUTPUT 

Output.

Constructor & Destructor Documentation

◆ OnBoardIO()

frc::OnBoardIO::OnBoardIO ( OnBoardIO::ChannelMode dio1,
OnBoardIO::ChannelMode dio2 )

Member Function Documentation

◆ GetButtonAPressed()

bool frc::OnBoardIO::GetButtonAPressed ( )

Gets if the A button is pressed.

◆ GetButtonBPressed()

bool frc::OnBoardIO::GetButtonBPressed ( )

Gets if the B button is pressed.

◆ GetButtonCPressed()

bool frc::OnBoardIO::GetButtonCPressed ( )

Gets if the C button is pressed.

◆ SetGreenLed()

void frc::OnBoardIO::SetGreenLed ( bool value)

Sets the green LED.

◆ SetRedLed()

void frc::OnBoardIO::SetRedLed ( bool value)

Sets the red LED.

◆ SetYellowLed()

void frc::OnBoardIO::SetYellowLed ( bool value)

Sets the yellow LED.

Member Data Documentation

◆ kMessageInterval

auto frc::OnBoardIO::kMessageInterval = 1_s
staticconstexpr

◆ m_nextMessageTime

units::second_t frc::OnBoardIO::m_nextMessageTime = 0_s

The documentation for this class was generated from the following file: