Skip to content

Commit

Permalink
Auto lasts longer with commented auto code to score low
Browse files Browse the repository at this point in the history
  • Loading branch information
team5338 committed Dec 6, 2024
1 parent 426d1dd commit 5d51598
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/main/java/frc/robot/commands/Auto.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,24 @@ public static Command exampleAuto() {
* .andThen decorator
* to stop the drivetrain after the first command times out
*/
return new SequentialCommandGroup(PneumaticCommands.pistonExtend(), new WaitCommand(2),
new RunCommand(() -> RobotContainer.m_drivetrain.arcadeDrive(-.5, 0), RobotContainer.m_drivetrain)
return new SequentialCommandGroup(
PneumaticCommands.pistonExtend(), new WaitCommand(2),
new RunCommand(() -> RobotContainer.m_drivetrain.tankDrive(.5, .5), RobotContainer.m_drivetrain)
.withTimeout(1),
new InstantCommand(() -> RobotContainer.m_drivetrain.arcadeDrive(0, 0), RobotContainer.m_drivetrain),
new InstantCommand(() -> RobotContainer.m_drivetrain.tankDrive(0, 0), RobotContainer.m_drivetrain),
PneumaticCommands.pistonRetract());
// return new InstantCommand(() -> PneumaticCommands.pistonExtend()).andThen(new
// RunCommand(() -> drivetrain.arcadeDrive(-.5, 0), drivetrain)
// .withTimeout(1)
// .andThen(new RunCommand(() -> drivetrain.arcadeDrive(0, 0), drivetrain)));
}
// public static Command auto() {
// return new SequentialCommandGroup(
// new RunCommand(() -> RobotContainer.m_drivetrain.tankDrive(.5, .5), RobotContainer.m_drivetrain)
// .withTimeout(0.33),
// new RunCommand(() -> RobotContainer.m_drivetrain.tankDrive(0, -.5), RobotContainer.m_drivetrain)
// .withTimeout(0.1);
// new InstantCommand(() -> RobotContainer.m_drivetrain.tankDrive(0, 0), RobotContainer.m_drivetrain),
// PneumaticCommands.pistonExtend());
// }
}

0 comments on commit 5d51598

Please sign in to comment.