[epilogue] Allow configuring logging period and logging period offset (#6893)

This commit is contained in:
Jade
2024-08-15 00:26:48 +08:00
committed by GitHub
parent dece2391f5
commit 70fa41c69e
4 changed files with 64 additions and 4 deletions

View File

@@ -9,6 +9,8 @@ import edu.wpi.first.epilogue.logging.NTDataLogger;
import edu.wpi.first.epilogue.logging.errors.ErrorHandler;
import edu.wpi.first.epilogue.logging.errors.ErrorPrinter;
import edu.wpi.first.networktables.NetworkTableInstance;
import edu.wpi.first.units.Measure;
import edu.wpi.first.units.Time;
/**
* A configuration object to be used by the generated {@code Epilogue} class to customize its
@@ -23,6 +25,18 @@ public class EpilogueConfiguration {
*/
public DataLogger dataLogger = new NTDataLogger(NetworkTableInstance.getDefault());
/**
* The period Epilogue will log at. By default this is the period that the robot runs at. This is
* the field used by bind to configure speed when adding the periodic logging function
*/
public Measure<Time> loggingPeriod;
/**
* The offset from the periodic run that Epilogue will log at. By default this will be half of the
* robots period. This is the field used by bind when adding the periodic logging function
*/
public Measure<Time> loggingPeriodOffset;
/**
* The minimum importance level of data to be logged. Defaults to debug, which logs data of all
* importance levels. Any data tagged with an importance level lower than this will not be logged.