Skip to content

Commit

Permalink
Trigger LEDs at start of note lift sequence, disable lock to line
Browse files Browse the repository at this point in the history
  • Loading branch information
superpenguin612 committed Mar 22, 2024
1 parent 0077b40 commit f074f4f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/frc/robot/RobotCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ public static Command shootOnTheMoveCommand(Drivetrain drivetrain, Intake intake
public static Command intakeToNoteLift(Shooter shooter, ShooterTilt shooterTilt, NoteLift noteLift, LEDs leds) {
// proxying to allow shooterTilt to hold position while note lift moves down
return Commands.sequence(
new ScheduleCommand(leds.requestStateCommand(LEDState.FLASHING_WHITE).withTimeout(5)),
new ScheduleCommand(shooter.stopCommand()),
shooterTilt.moveToPositionCommand(() -> ShooterTiltPosition.CLIMB).asProxy(),
noteLift.moveToPositionCommand(() -> NoteLiftPosition.INTAKE).asProxy(),
leds.requestStateCommand(LEDState.FLASHING_WHITE));
noteLift.moveToPositionCommand(() -> NoteLiftPosition.INTAKE).asProxy());
}

public static Command prepareClimb(DoubleSupplier xSpeedSupplier, DoubleSupplier ySpeedSupplier,
Expand All @@ -134,10 +134,6 @@ public static Command prepareClimb(DoubleSupplier xSpeedSupplier, DoubleSupplier
NoteLift noteLift) {
return Commands.parallel(
new ScheduleCommand(shooter.stopCommand()),
drivetrain.targetStageCommand(xSpeedSupplier, ySpeedSupplier)
.unless(GlobalStates.DRIVETRAIN_TARGETTING_DISABLED::enabled)
.until(GlobalStates.DRIVETRAIN_TARGETTING_DISABLED::enabled)
.andThen(drivetrain.teleopDriveCommand(xSpeedSupplier, ySpeedSupplier, thetaSpeedSupplier)),
shooterTilt.moveToPositionCommand(() -> ShooterTiltPosition.CLIMB).asProxy(),
intake.moveToPositionCommand(() -> IntakePosition.GROUND).asProxy(),
noteLift.moveToPositionCommand(() -> NoteLiftPosition.CLIMB_PREP).asProxy(),
Expand Down

0 comments on commit f074f4f

Please sign in to comment.