blob: 231a21af5c0d8a78c8df082aaed6337477d2b890 [file] [log] [blame]
Campbell Crowleyc0cfb132015-12-30 20:58:02 -08001#ifndef FRC971_WPILIB_NEWROBOTBASE_H_
2#define FRC971_WPILIB_NEWROBOTBASE_H_
3
4#include "RobotBase.h"
5
6namespace frc971 {
7namespace wpilib {
8
9class WPILibRobotBase {
10public:
11 virtual void Run() = 0;
12};
13
14#define AOS_ROBOT_CLASS(_ClassName_) \
15 START_ROBOT_CLASS(::frc971::wpilib::WPILibAdapterRobot<_ClassName_>)
16
17template <typename T>
18class WPILibAdapterRobot : public RobotBase {
19 public:
20 void StartCompetition() override { robot_.Run(); }
21
22 private:
23 T robot_;
24};
25
26}
27}
28
29#endif // FRC971_WPILIB_NEWROBOTBASE_H_
30