13 #include <llvm/raw_ostream.h> 21 #define START_ROBOT_CLASS(_ClassName_) \ 23 if (!HAL_Initialize(500, 0)) { \ 24 llvm::errs() << "FATAL ERROR: HAL could not be initialized\n"; \ 27 HAL_Report(HALUsageReporting::kResourceType_Language, \ 28 HALUsageReporting::kLanguage_CPlusPlus); \ 29 llvm::outs() << "\n********** Robot program starting **********\n"; \ 30 static _ClassName_ robot; \ 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:73
bool IsAutonomous() const
Determine if the robot is currently in Autonomous mode.
Definition: RobotBase.cpp:86
bool IsDisabled() const
Determine if the Robot is currently disabled.
Definition: RobotBase.cpp:79
static std::thread::id GetThreadId()
Gets the ID of the main robot thread.
Definition: RobotBase.cpp:112
Provide access to the network communication data to / from the Driver Station.
Definition: DriverStation.h:29
bool IsNewDataAvailable() const
Indicates if new data is available from the driver station.
Definition: RobotBase.cpp:107
bool IsOperatorControl() const
Determine if the robot is currently in Operator Control mode.
Definition: RobotBase.cpp:93
Implement a Robot Program framework.
Definition: RobotBase.h:43
bool IsTest() const
Determine if the robot is currently in Test mode.
Definition: RobotBase.cpp:100
RobotBase()
Constructor for a generic robot program.
Definition: RobotBase.cpp:39