-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package frc.robot.commands; | ||
|
||
import edu.wpi.first.wpilibj2.command.InstantCommand; | ||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; | ||
import frc.robot.Constants; | ||
import frc.robot.subsystems.ArmSubsystem; | ||
import frc.robot.subsystems.IndexSubsystem; | ||
import frc.robot.subsystems.IntakeSubsystem; | ||
import frc.robot.subsystems.ShooterSubsystemVelocity; | ||
|
||
public class ShootSafetyPose extends SequentialCommandGroup { | ||
public ShootSafetyPose(ArmSubsystem arm, IndexSubsystem index, IntakeSubsystem intake, ShooterSubsystemVelocity shooter) { | ||
|
||
addCommands( | ||
/* Moving the arm is shouldn't be necessary, but just in case */ | ||
new SetArmPosition(arm, Constants.ArmConstants.ARM_SAFETY_POSE), | ||
// new ShooterIndex(shooter, index).withTimeout(1.0) | ||
new RevAndShootCommand(index, shooter).withTimeout(1.25).andThen(new InstantCommand(() -> shooter.Disable(), shooter)), | ||
new SetIndex(index, 0).withTimeout(.2) | ||
); | ||
} | ||
} |