mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
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:
committed by
Peter Johnson
parent
b42285fddd
commit
aa4f0ef4f8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user