mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[epilogue] Log internal debug data to the configured logger instead of NT (#7040)
This commit is contained in:
@@ -167,7 +167,7 @@ public class EpilogueGenerator {
|
||||
+ StringUtils.loggerFieldName(mainRobotClass)
|
||||
+ ".tryUpdate(config.dataLogger.getSubLogger(config.root), robot, config.errorHandler);");
|
||||
out.println(
|
||||
" edu.wpi.first.networktables.NetworkTableInstance.getDefault().getEntry(\"Epilogue/Stats/Last Run\").setDouble((System.nanoTime() - start) / 1e6);");
|
||||
" config.dataLogger.log(\"Epilogue/Stats/Last Run\", (System.nanoTime() - start) / 1e6);");
|
||||
out.println(
|
||||
" }, config.loggingPeriod.in(Seconds), config.loggingPeriodOffset.in(Seconds));");
|
||||
out.println(" }");
|
||||
|
||||
@@ -166,7 +166,7 @@ class EpilogueGeneratorTest {
|
||||
robot.addPeriodic(() -> {
|
||||
long start = System.nanoTime();
|
||||
exampleLogger.tryUpdate(config.dataLogger.getSubLogger(config.root), robot, config.errorHandler);
|
||||
edu.wpi.first.networktables.NetworkTableInstance.getDefault().getEntry("Epilogue/Stats/Last Run").setDouble((System.nanoTime() - start) / 1e6);
|
||||
config.dataLogger.log(\"Epilogue/Stats/Last Run\", (System.nanoTime() - start) / 1e6);
|
||||
}, config.loggingPeriod.in(Seconds), config.loggingPeriodOffset.in(Seconds));
|
||||
}
|
||||
}
|
||||
@@ -237,7 +237,7 @@ class EpilogueGeneratorTest {
|
||||
robot.addPeriodic(() -> {
|
||||
long start = System.nanoTime();
|
||||
alphaBotLogger.tryUpdate(config.dataLogger.getSubLogger(config.root), robot, config.errorHandler);
|
||||
edu.wpi.first.networktables.NetworkTableInstance.getDefault().getEntry("Epilogue/Stats/Last Run").setDouble((System.nanoTime() - start) / 1e6);
|
||||
config.dataLogger.log(\"Epilogue/Stats/Last Run\", (System.nanoTime() - start) / 1e6);
|
||||
}, config.loggingPeriod.in(Seconds), config.loggingPeriodOffset.in(Seconds));
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ class EpilogueGeneratorTest {
|
||||
robot.addPeriodic(() -> {
|
||||
long start = System.nanoTime();
|
||||
betaBotLogger.tryUpdate(config.dataLogger.getSubLogger(config.root), robot, config.errorHandler);
|
||||
edu.wpi.first.networktables.NetworkTableInstance.getDefault().getEntry("Epilogue/Stats/Last Run").setDouble((System.nanoTime() - start) / 1e6);
|
||||
config.dataLogger.log("Epilogue/Stats/Last Run", (System.nanoTime() - start) / 1e6);
|
||||
}, config.loggingPeriod.in(Seconds), config.loggingPeriodOffset.in(Seconds));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user