Skip to content

Commit

Permalink
On disk datalogging
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobfey committed Jan 17, 2025
1 parent f8aa39d commit ceda64a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

import edu.wpi.first.epilogue.Epilogue;
import edu.wpi.first.epilogue.Logged;
import edu.wpi.first.epilogue.logging.EpilogueBackend;
import edu.wpi.first.epilogue.logging.FileBackend;
import edu.wpi.first.epilogue.logging.NTEpilogueBackend;
import edu.wpi.first.networktables.NetworkTableInstance;
import edu.wpi.first.wpilibj.DataLogManager;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotController;
import edu.wpi.first.wpilibj.TimedRobot;
Expand Down Expand Up @@ -57,9 +62,10 @@ public Robot() {

Epilogue.configure(
config -> {
// TODO: Set up the epilogue data logging configuration.
// By default, data will only be logged to network tables.
// We should log to disk if there's a USB drive plugged in
config.backend = EpilogueBackend.multi(
new FileBackend(DataLogManager.getLog()),
new NTEpilogueBackend(NetworkTableInstance.getDefault())
);
});

Epilogue.bind(this);
Expand Down

0 comments on commit ceda64a

Please sign in to comment.