File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed 
src/main/java/org/trigon/hardware Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,15 @@ public class RobotHardwareStats {
55    private  static  boolean  IS_REPLAY  = false ;
66    private  static  double  PERIODIC_TIME_SECONDS  = 0.02 ;
77
8-     public  static  void  setCurrentRobotStats (boolean  isReal , boolean  isSimulation , boolean  isReplay ) {
9-         IS_SIMULATION  = isSimulation  && !isReal ;
10-         IS_REPLAY  = isReplay  && !isReal ;
8+     public  static  void  setCurrentRobotStats (boolean  isReal , ReplayType  replayType ) {
9+         if  (isReal  || replayType .equals (ReplayType .NONE )) {
10+             IS_SIMULATION  = !isReal ;
11+             IS_REPLAY  = false ;
12+             return ;
13+         }
14+         
15+         IS_SIMULATION  = replayType .equals (ReplayType .SIMULATION_REPLAY );
16+         IS_REPLAY  = true ;
1117    }
1218
1319    public  static  void  setPeriodicTimeSeconds (double  periodicTimeSeconds ) {
@@ -25,4 +31,10 @@ public static boolean isReplay() {
2531    public  static  boolean  isSimulation () {
2632        return  IS_SIMULATION ;
2733    }
28- }
34+ 
35+     public  enum  ReplayType  {
36+         NONE ,
37+         SIMULATION_REPLAY ,
38+         REAL_REPLAY 
39+     }
40+ }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments