Skip to content

Commit

Permalink
reset the arm encoder before starting auto
Browse files Browse the repository at this point in the history
had encoder issues this is the best fix
  • Loading branch information
kytpbs committed Mar 28, 2024
1 parent 3d8b184 commit a29176d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ private void configureMidiBindings() {
}

public Command getAutonomousCommand() {
return autoChooser.getSelected().andThen(() -> driveSubsystem.drive(0, 0, 0));
return autoChooser
.getSelected()
.andThen(() -> driveSubsystem.drive(0, 0, 0))
.beforeStarting(armSubsystem.runOnce(armSubsystem::resetEncoder));
}
}

0 comments on commit a29176d

Please sign in to comment.