12 #include <wpi/raw_ostream.h>
20 int RunHALInitialization();
22 template <
class Robot>
24 int halInit = RunHALInitialization();
29 robot.StartCompetition();
34 #define START_ROBOT_CLASS(_ClassName_) \
35 WPI_DEPRECATED("Call frc::StartRobot<" #_ClassName_ \
36 ">() in your own main() instead of using the " \
37 "START_ROBOT_CLASS(" #_ClassName_ ") macro.") \
38 int StartRobotClassImpl() { return frc::StartRobot<_ClassName_>(); } \
39 int main() { return StartRobotClassImpl(); }
104 virtual void StartCompetition() = 0;
106 static constexpr
bool IsReal() {
107 #ifdef __FRC_ROBORIO__
114 static constexpr
bool IsSimulation() {
return !IsReal(); }
139 static std::thread::id m_threadId;
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
bool IsTest() const
Determine if the robot is currently in Test mode.
bool IsAutonomous() const
Determine if the robot is currently in Autonomous mode.
bool IsOperatorControl() const
Determine if the robot is currently in Operator Control mode.
bool IsEnabled() const
Determine if the Robot is currently enabled.
bool IsDisabled() const
Determine if the Robot is currently disabled.
Provide access to the network communication data to / from the Driver Station.
Definition: DriverStation.h:33
bool IsNewDataAvailable() const
Indicates if new data is available from the driver station.
RobotBase()
Constructor for a generic robot program.
Implement a Robot Program framework.
Definition: RobotBase.h:51
static std::thread::id GetThreadId()
Gets the ID of the main robot thread.