Skip to content

Commit

Permalink
minor change in logging of default command
Browse files Browse the repository at this point in the history
  • Loading branch information
PGgit08 committed Dec 22, 2024
1 parent 9260faa commit cbfa5d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
6 changes: 1 addition & 5 deletions src/main/java/frc/lib/AdvancedSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public AdvancedSubsystem(NetworkTableInstance ntInst) {
* Returns the name of the command that's currently requiring this subsystem. Is "None" when the
* command in null.
*/
@Logged(name = "Current Command")
public final String currentCommandName() {
if (getCurrentCommand() != null) {
return getCurrentCommand().getName();
Expand Down Expand Up @@ -86,9 +87,4 @@ public final Command fullSelfCheck() {

return selfCheck;
}

@Override
public void periodic() {
DogLog.log(getName() + "/Current Command", currentCommandName());
}
}
5 changes: 2 additions & 3 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public Robot(NetworkTableInstance ntInst) {

DriverStation.silenceJoystickConnectionWarning(isSimulation());

FaultLogger.setup();
FaultLogger.setup(_ntInst);

configureBindings();

Expand All @@ -105,8 +105,7 @@ private void setFileOnly(boolean fileOnly) {
// if doing both file and nt logging, use the datalogger multilogger setup
Epilogue.getConfig().backend =
EpilogueBackend.multi(
new NTEpilogueBackend(_ntInst), // TODO: watch out unit tests
new FileBackend(DataLogManager.getLog()));
new NTEpilogueBackend(_ntInst), new FileBackend(DataLogManager.getLog()));
}

private void configureBindings() {
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/frc/robot/subsystems/Swerve.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ public Swerve(
* Returns the name of the command that's currently requiring this subsystem. Is "None" when the
* command in null.
*/
@Logged(name = "Current Command")
public final String currentCommandName() {
if (getCurrentCommand() != null) {
return getCurrentCommand().getName();
Expand Down Expand Up @@ -445,9 +446,6 @@ private void updateVisionPoseEstimates() {

@Override
public void periodic() {
// ---- advanced subsystem periodic ----
DogLog.log(getName() + "/Current Command", currentCommandName());

// ---- this subsystem's periodic ----
updateVisionPoseEstimates();

Expand Down

0 comments on commit cbfa5d5

Please sign in to comment.