Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
✨ Updated log config for sim viz to work properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatXliner committed Oct 3, 2024
1 parent d0efb7d commit b4c6d90
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,15 @@ public void robotInit() {
new PowerDistribution(
1, ModuleType.kRev); // Ignore this "resource leak"; it was the example code from docs
} else {
setUseTiming(false); // Run as fast as possible
if (Constants.Logging.kAdvkitUseReplayLogs) {
setUseTiming(false); // Run as fast as possible
String logPath =
LogFileUtil
.findReplayLog(); // Pull the replay log from AdvantageScope (or prompt the user)
Logger.setReplaySource(new WPILOGReader(logPath)); // Read replay log
// Save outputs to a new log
Logger.addDataReceiver(new WPILOGWriter(LogFileUtil.addPathSuffix(logPath, "_sim")));
} else {
Logger.addDataReceiver(new WPILOGWriter(""));
Logger.addDataReceiver(new NT4Publisher());
}
}
Expand Down

0 comments on commit b4c6d90

Please sign in to comment.