Start using the new FRC compiler define (#797)

Remove all definitions from the MockData headers when in simulation mode.
Add a constexpr IsReal and IsSimulation in RobotBase.
This commit is contained in:
Thad House
2017-12-08 22:47:21 -08:00
committed by Peter Johnson
parent b42285fddd
commit aa4f0ef4f8
24 changed files with 102 additions and 0 deletions

View File

@@ -52,6 +52,16 @@ class RobotBase {
static std::thread::id GetThreadId();
virtual void StartCompetition() = 0;
static constexpr bool IsReal() {
#ifdef __FRC_ROBORIO__
return true;
#else
return false;
#endif
}
static constexpr bool IsSimulation() { return !IsReal(); }
protected:
RobotBase();
virtual ~RobotBase() = default;