[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:
Peter Johnson
2023-10-18 14:15:35 -07:00
committed by GitHub
parent 579007ceb3
commit 4ce4d63efc

View File

@@ -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;
}
/**