diff --git a/src/main/java/org/trigon/hardware/RobotHardwareStats.java b/src/main/java/org/trigon/hardware/RobotHardwareStats.java index c54f9d60..e3507c73 100644 --- a/src/main/java/org/trigon/hardware/RobotHardwareStats.java +++ b/src/main/java/org/trigon/hardware/RobotHardwareStats.java @@ -5,9 +5,15 @@ public class RobotHardwareStats { private static boolean IS_REPLAY = false; private static double PERIODIC_TIME_SECONDS = 0.02; - public static void setCurrentRobotStats(boolean isReal, boolean isSimulation, boolean isReplay) { - IS_SIMULATION = isSimulation && !isReal; - IS_REPLAY = isReplay && !isReal; + public static void setCurrentRobotStats(boolean isReal, ReplayType replayType) { + if (isReal || replayType.equals(ReplayType.NONE)) { + IS_SIMULATION = !isReal; + IS_REPLAY = false; + return; + } + + IS_SIMULATION = replayType.equals(ReplayType.SIMULATION_REPLAY); + IS_REPLAY = true; } public static void setPeriodicTimeSeconds(double periodicTimeSeconds) { @@ -25,4 +31,10 @@ public static boolean isReplay() { public static boolean isSimulation() { return IS_SIMULATION; } -} + + public enum ReplayType { + NONE, + SIMULATION_REPLAY, + REAL_REPLAY + } +} \ No newline at end of file