-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
2 changed files
with
16 additions
and
3 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
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())); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/frc/robot/commands/led_commands/LEDBlinkRedCommand.java
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,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()); | ||
} | ||
} |