21 #define START_ROBOT_CLASS(_ClassName_) \
23 if (!HAL_Initialize(0)) { \
24 std::cerr << "FATAL ERROR: HAL could not be initialized" << std::endl; \
27 HAL_Report(HALUsageReporting::kResourceType_Language, \
28 HALUsageReporting::kLanguage_CPlusPlus); \
29 static _ClassName_ robot; \
30 std::printf("\n********** Robot program starting **********\n"); \
31 robot.StartCompetition(); \
52 virtual void StartCompetition() = 0;
63 static std::thread::id m_threadId;
bool IsEnabled() const
Determine if the Robot is currently enabled.
Definition: RobotBase.cpp:62
bool IsAutonomous() const
Determine if the robot is currently in Autonomous mode.
Definition: RobotBase.cpp:75
bool IsDisabled() const
Determine if the Robot is currently disabled.
Definition: RobotBase.cpp:68
static std::thread::id GetThreadId()
Gets the ID of the main robot thread.
Definition: RobotBase.cpp:101
Provide access to the network communication data to / from the Driver Station.
Definition: DriverStation.h:27
bool IsNewDataAvailable() const
Indicates if new data is available from the driver station.
Definition: RobotBase.cpp:96
bool IsOperatorControl() const
Determine if the robot is currently in Operator Control mode.
Definition: RobotBase.cpp:82
Implement a Robot Program framework.
Definition: RobotBase.h:43
bool IsTest() const
Determine if the robot is currently in Test mode.
Definition: RobotBase.cpp:89
RobotBase()
Constructor for a generic robot program.
Definition: RobotBase.cpp:37