Skip to content

Commit d86fc70

Browse files
committed
first pass
1 parent a7ffab4 commit d86fc70

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/main/java/frc/robot/RobotContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ private void configureBindings() {
297297
gamepad_.back().or(operatorGamepad_.back()).onTrue(shooter_.cycleTuning()) ;
298298

299299
// While the left trigger is held, we will run the intake. If the intake is stowed, it will also deploy it.
300-
gamepad_.leftTrigger().or(operatorGamepad_.leftTrigger()).whileTrue(RobotCommands.intake(intake_, hopper_));
300+
gamepad_.leftTrigger().or(operatorGamepad_.leftTrigger()).whileTrue(RobotCommands.intake(intake_, hopper_, drivebase_, () -> new Rotation2d(Math.atan2(gamepad_.getLeftY(), gamepad_.getLeftX()))));
301301

302302
// While the right trigger is held, we will shoot into the hub or ferry. Binding A to the shaking of the shooter.
303303
gamepad_.rightTrigger().or(operatorGamepad_.rightTrigger())

src/main/java/frc/robot/commands/robot/RobotCommands.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ public static Command ejectUp(Shooter shooter, Hopper hopper) {
184184
* @param hopper
185185
* @return
186186
*/
187-
public static Command intake(IntakeSubsystem intake, Hopper hopper) {
188-
return intake.intakeSequence().alongWith(hopper.collectScrambler());
187+
public static Command intake(IntakeSubsystem intake, Hopper hopper, Drive drive, Supplier<Rotation2d> angle) {
188+
return intake.intakeSequence().alongWith(hopper.collectScrambler(), DriveCommands.joystickDriveAtAngle(() -> {
189+
return angle.get();
190+
}));
189191
}
190192
}

0 commit comments

Comments
 (0)