diff --git a/src/main/java/frc/robot/command/GrimpeurDroit.java b/src/main/java/frc/robot/command/GrimpeurDroit.java index 0aa2c46..20ff35e 100644 --- a/src/main/java/frc/robot/command/GrimpeurDroit.java +++ b/src/main/java/frc/robot/command/GrimpeurDroit.java @@ -56,6 +56,7 @@ public class GrimpeurDroit extends Command { @Override public void end(boolean interrupted) { grimpeur.droit(0); + grimpeur.pistonouvre(); } // Returns true when the command should end. diff --git a/src/main/java/frc/robot/subsystem/LED.java b/src/main/java/frc/robot/subsystem/LED.java index 8bc91cc..27fdba3 100644 --- a/src/main/java/frc/robot/subsystem/LED.java +++ b/src/main/java/frc/robot/subsystem/LED.java @@ -15,11 +15,16 @@ public class LED extends SubsystemBase { AddressableLEDBuffer ledBuffer = new AddressableLEDBuffer(60); public void led(){ led.setData(ledBuffer); - led.start(); - } - public void couleur(int R, int G, int B){ - ledBuffer.setRGB(0, R, G, B); + led.start();} + + public void couleur(int R, int G,int B){ + for (int i = 0; i < ledBuffer.getLength(); i++) { + // Sets the specified LED to the RGB values for red + ledBuffer.setRGB(i, 255, 0, 0);} + } + + @Override public void periodic() { // This method will be called once per scheduler run