diff --git a/wpilibc/src/main/native/include/frc/RobotBase.h b/wpilibc/src/main/native/include/frc/RobotBase.h index 4139b03655..66d5637bd9 100644 --- a/wpilibc/src/main/native/include/frc/RobotBase.h +++ b/wpilibc/src/main/native/include/frc/RobotBase.h @@ -185,6 +185,11 @@ class RobotBase { virtual void EndCompetition() = 0; + /** + * Get if the robot is real. + * + * @return If the robot is running in the real world. + */ static constexpr bool IsReal() { #ifdef __FRC_ROBORIO__ return true; @@ -193,6 +198,11 @@ class RobotBase { #endif } + /** + * Get if the robot is a simulation. + * + * @return If the robot is running in simulation. + */ static constexpr bool IsSimulation() { return !IsReal(); } /**