Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the execution of all commands #21

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ public Robot() {
// Create a button on Smart Dashboard to reset the encoders.
SmartDashboard.putData(
"Align Encoders",
new InstantCommand(() -> m_swerve.zeroAbsTurningEncoderOffsets()).ignoringDisable(true));
new InstantCommand(() -> m_swerve.zeroAbsTurningEncoderOffsets())
.ignoringDisable(true)
.withName("Align swerve module steering encoders"));
}

@Override
Expand Down Expand Up @@ -145,16 +147,15 @@ public void configureButtonBindings() {
configureOperatorButtonBindings();
}

// spotless:off
private void configureDriverButtonBindings() {

// Reset heading
new JoystickButton(m_driver, ZorroController.Button.kHIn.value)
.onTrue(new InstantCommand(() -> m_swerve.resetHeading())
.ignoringDisable(true));

.onTrue(
new InstantCommand(() -> m_swerve.resetHeading())
.ignoringDisable(true)
.withName("Reset heading of robot pose"));
}
// spotless:on

private void configureOperatorButtonBindings() {}

Expand Down