Skip to content

Commit

Permalink
Add simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
legoguy1000 committed Jan 24, 2024
1 parent d66520b commit dcf4ac3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public void robotInit() {
Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables
// new PowerDistribution(1, ModuleType.kRev); // Enables power distribution logging
setUseTiming(true);
} else if (isSimulation()) {
Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables
Logger.addDataReceiver(new WPILOGWriter(LogFileUtil.addPathSuffix("~/", "_sim")));
setUseTiming(true);
} else {
String logPath = LogFileUtil.findReplayLog(); // Pull the replay log from AdvantageScope
// (or prompt the user)
Expand Down

0 comments on commit dcf4ac3

Please sign in to comment.