Skip to content

Commit

Permalink
add a new BlinkRedCommand
Browse files Browse the repository at this point in the history
This will make the LED's blink red while intaking. I might change this to a bottom to top effect instead, as that might give the info that it expects a note from the ground.
  • Loading branch information
kytpbs committed Apr 1, 2024
1 parent 1c597dd commit e4602e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/frc/robot/commands/BasicIntakeCommand.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
package frc.robot.commands;

import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import edu.wpi.first.wpilibj2.command.ParallelRaceGroup;
import frc.robot.Constants.IntakeConstants;
import frc.robot.commands.led_commands.LEDBlinkRedCommand;
import frc.robot.subsystems.IntakeSubsystem;
import frc.robot.subsystems.LEDSystem;

public class BasicIntakeCommand extends SequentialCommandGroup {
public class BasicIntakeCommand extends ParallelRaceGroup {
public BasicIntakeCommand(IntakeSubsystem intakeSubsystem) {
super(
intakeSubsystem
.run(() -> intakeSubsystem.setIntakeSpeed(IntakeConstants.kIntakeSpeed))
.until(intakeSubsystem::hasNote));
.until(intakeSubsystem::hasNote),
new LEDBlinkRedCommand(LEDSystem.getInstance()));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package frc.robot.commands.led_commands;

import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import frc.robot.subsystems.LEDSubsystem;

public class LEDBlinkRedCommand extends SequentialCommandGroup {
public LEDBlinkRedCommand(LEDSubsystem ledSubsystem) {
super(ledSubsystem.getRedBlinkCommand());
}
}

0 comments on commit e4602e4

Please sign in to comment.