From db60676f1cc86f425e5d01d70253ca2baeb13524 Mon Sep 17 00:00:00 2001 From: Adam Xu Date: Thu, 16 Jul 2026 16:29:41 -0700 Subject: [PATCH] logging: persist AdvantageKit stream to disk with WPILOGWriter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until now the only AdvantageKit data receiver was NT4Publisher, so all telemetry (swerve states, odometry, mechanisms) was streamed live to AdvantageScope and never written anywhere — no .wpilog files exist from the entire 2026 season. Add WPILOGWriter so real-robot runs log to /U/logs on a USB stick (logs/ folder in simulation). Co-Authored-By: Claude Fable 5 --- src/main/java/frc/robot/Robot.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index b46991a..70d7f94 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -7,6 +7,7 @@ import org.littletonrobotics.junction.LoggedRobot; import org.littletonrobotics.junction.Logger; import org.littletonrobotics.junction.networktables.NT4Publisher; +import org.littletonrobotics.junction.wpilog.WPILOGWriter; import autobahn.client.Address; import autobahn.client.AutobahnClient; @@ -34,6 +35,9 @@ public static OptionalAutobahn getAutobahnClient() { } public Robot() { + // Persist the full AdvantageKit stream to disk: "/U/logs" on a USB stick + // when running on the RIO, "logs" folder in simulation. + Logger.addDataReceiver(new WPILOGWriter()); Logger.addDataReceiver(new NT4Publisher()); Logger.start();