Skip to content

Commit

Permalink
vibrate controllers at 27 sec left
Browse files Browse the repository at this point in the history
  • Loading branch information
JayK445 committed Mar 20, 2024
1 parent 4f96b41 commit c63e260
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.CommandScheduler;
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup;
import edu.wpi.first.wpilibj2.command.WaitCommand;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.button.Trigger;
Expand Down Expand Up @@ -247,6 +248,14 @@ public RobotContainer() {
public void containerTeleopInit() {
// runs when teleop happens
CommandScheduler.getInstance().schedule(new VibrateHIDCommand(jacob.getHID(), 5, .5));
// vibrate controller at 27 seconds left
CommandScheduler.getInstance()
.schedule(
new WaitCommand(108)
.andThen(
new ParallelCommandGroup(
new VibrateHIDCommand(anthony.getHID(), 3, 0.4),
new VibrateHIDCommand(jacob.getHID(), 3, 0.4))));
}

/**
Expand Down

0 comments on commit c63e260

Please sign in to comment.