@@ -62,8 +62,6 @@ public class RobotContainer {
6262 private Hopper hopper ;
6363 private Intake intake ;
6464 private Shooter shooter ;
65-
66-
6765 private Leds leds ;
6866
6967 // private NAR_ButtonBoard judgePad;
@@ -91,6 +89,7 @@ public RobotContainer() {
9189 hopper = Hopper .getInstance ();
9290 intake = Intake .getInstance ();
9391 shooter = Shooter .getInstance ();
92+ leds = Leds .getInstance ();
9493
9594 //uncomment line below to enable driving
9695 CommandScheduler .getInstance ().setDefaultCommand (swerve , new CmdSwerveDrive (controller ::getLeftX ,controller ::getLeftY , controller ::getRightX , true ));
@@ -151,7 +150,10 @@ private void configureButtonBindings() {
151150 //Stops shooting when all notes are gone
152151 new Trigger (()-> shooter .noteInRollers ()).negate ()
153152 .and (()->hopper .hasObjectPresent ()).negate ()
154- .onTrue (shooter .setShooting (false ));
153+ .onTrue (sequence (
154+ shooter .setShooting (false ),
155+ runOnce (() -> leds .setLedColor (Colors .BLUE ))
156+ ));
155157
156158 //Queues note to hopper
157159 new Trigger (()-> intake .getMeasurement () > 90 )
@@ -169,6 +171,7 @@ private void configureButtonBindings() {
169171 .and (()->hopper .hasObjectPresent ())
170172 .and (() -> !shooter .getShooting ())
171173 .onTrue (sequence (
174+ runOnce (() -> leds .blinkLEDColor (Colors .RED , Colors .GREEN , .25 )),
172175 shooter .runKickMotor (KICK_POWER ),
173176 hopper .runManipulator (HOPPER_INTAKE_POWER )
174177 ))
@@ -178,7 +181,10 @@ private void configureButtonBindings() {
178181 shooter .runKickMotor (0 )
179182 ));
180183
181- // new Trigger(() -> shouldEjectNote()).onTrue(ejectNote());
184+ // new Trigger(() -> shouldEjectNote()).onTrue(sequence(
185+ // runOnce(() -> leds.setLedColor(Colors.PURPLE)),
186+ // ejectNote()
187+ // ));
182188
183189 }
184190
@@ -189,6 +195,7 @@ private boolean shouldEjectNote(){
189195 if (shooter .noteInRollers () && hopper .hasObjectPresent () && !ejectTimerStarted ){
190196 ejectTimerStarted = true ;
191197 ejecTimer .start ();
198+ runOnce (() -> leds .blinkLEDColor (Colors .RED , Colors .ORANGE , .25 ));
192199 }
193200
194201 else if (shooter .noteInRollers () && hopper .hasObjectPresent () && ejectTimerStarted ){
0 commit comments