mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpilibj] Fix RobotBase.isSimulation() (#5783)
#3534 changed it from returning !isReal() to checking against a numeric value, but #3565 (merged earlier) had changed the value to an enum.
This commit is contained in:
@@ -202,7 +202,7 @@ public abstract class RobotBase implements AutoCloseable {
|
||||
* @return If the robot is running in simulation.
|
||||
*/
|
||||
public static boolean isSimulation() {
|
||||
return HALUtil.getHALRuntimeType() != 0;
|
||||
return getRuntimeType() == RuntimeType.kSimulation;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user