diff --git a/build.gradle b/build.gradle index c73a804..2348bae 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "java" - id "edu.wpi.first.GradleRIO" version "2024.1.1" + id "edu.wpi.first.GradleRIO" version "2024.2.1" } java { diff --git a/src/main/java/frc/robot/command/Pistongrimpeur.java b/src/main/java/frc/robot/command/Pistongrimpeur.java index 2bb6bbc..93f2da2 100644 --- a/src/main/java/frc/robot/command/Pistongrimpeur.java +++ b/src/main/java/frc/robot/command/Pistongrimpeur.java @@ -22,14 +22,14 @@ public class Pistongrimpeur extends Command { // Called when the command is initially scheduled. @Override public void initialize() { - grimpeur.pistondroiteouvre(); + grimpeur.pistonouvre(); } // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { - if(grimpeur.pistondgaucheouvre()){ + if(grimpeur.piston()){ LED.couleur(0, 0, 255); } } diff --git a/src/main/java/frc/robot/subsystem/Grimpeur.java b/src/main/java/frc/robot/subsystem/Grimpeur.java index eb41d70..725db90 100644 --- a/src/main/java/frc/robot/subsystem/Grimpeur.java +++ b/src/main/java/frc/robot/subsystem/Grimpeur.java @@ -77,13 +77,17 @@ public AHRS gyroscope = new AHRS(); public double getpitch(){ return gyroscope.getPitch(); } - public boolean pistondroiteouvre(){ - return pistondroite.get(); + public void pistonferme(){ + pistondroite.set(true); + pistondgauche.set(true); } - public boolean pistondgaucheouvre(){ + public void pistonouvre(){ + pistondgauche.set(false); + pistondroite.set(false); + } + public boolean piston(){ return pistondgauche.get(); } - @Override public void periodic() { // This method will be called once per scheduler run