File tree Expand file tree Collapse file tree
src/main/java/frc/robot/loggers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package frc .robot .loggers ;
2+
3+ import edu .wpi .first .epilogue .CustomLoggerFor ;
4+ import edu .wpi .first .epilogue .logging .ClassSpecificLogger ;
5+ import edu .wpi .first .epilogue .logging .EpilogueBackend ;
6+ import edu .wpi .first .math .controller .ProfiledPIDController ;
7+
8+ @ CustomLoggerFor (ProfiledPIDController .class )
9+ public class ProfiledPIDControllerLogger extends ClassSpecificLogger <ProfiledPIDController > {
10+ public ProfiledPIDControllerLogger () {
11+ super (ProfiledPIDController .class );
12+ }
13+
14+ @ Override
15+ protected void update (EpilogueBackend backend , ProfiledPIDController controller ) {
16+ backend .log ("P" , controller .getP ());
17+ backend .log ("I" , controller .getI ());
18+ backend .log ("D" , controller .getD ());
19+ backend .log ("At Goal Position" , controller .atSetpoint ());
20+ backend .log ("Positional Error" , controller .getPositionError ());
21+ backend .log ("Velocity Error" , controller .getVelocityError ());
22+ backend .log ("Velocity Tolerance" , controller .getVelocityTolerance ());
23+ backend .log ("Positional Tolerance" , controller .getVelocityError ());
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments