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

This class represents the onboard IO of the XRP reference robot. More...

#include <frc/xrp/XRPOnBoardIO.h>

Public Member Functions

 XRPOnBoardIO ()
 
bool GetUserButtonPressed ()
 Gets if the USER button is pressed.
 
void SetLed (bool value)
 Sets the yellow LED.
 
bool GetLed () const
 Gets the state of 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 XRP reference robot.

This the USER push button and LED.

DIO 0 - USER Button (input only) DIO 1 - LED (output only)

Constructor & Destructor Documentation

◆ XRPOnBoardIO()

frc::XRPOnBoardIO::XRPOnBoardIO ( )
inline

Member Function Documentation

◆ GetLed()

bool frc::XRPOnBoardIO::GetLed ( ) const

Gets the state of the yellow LED.

Returns
True if LED is active, false otherwise.

◆ GetUserButtonPressed()

bool frc::XRPOnBoardIO::GetUserButtonPressed ( )

Gets if the USER button is pressed.

Returns
True if the USER button is currently pressed.

◆ SetLed()

void frc::XRPOnBoardIO::SetLed ( bool value)

Sets the yellow LED.

Parameters
valueTrue to activate LED, false otherwise.

Member Data Documentation

◆ kMessageInterval

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

◆ m_nextMessageTime

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

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