diff --git a/bin/main/frc/robot/Constants.class b/bin/main/frc/robot/Constants.class index aba154f..e6d7920 100644 Binary files a/bin/main/frc/robot/Constants.class and b/bin/main/frc/robot/Constants.class differ diff --git a/bin/main/frc/robot/commands/Gyro.class b/bin/main/frc/robot/commands/Gyro.class index 48c1e8d..9bfcf27 100644 Binary files a/bin/main/frc/robot/commands/Gyro.class and b/bin/main/frc/robot/commands/Gyro.class differ diff --git a/bin/main/frc/robot/subsystems/BasePilotable.class b/bin/main/frc/robot/subsystems/BasePilotable.class index 62da180..96315e4 100644 Binary files a/bin/main/frc/robot/subsystems/BasePilotable.class and b/bin/main/frc/robot/subsystems/BasePilotable.class differ diff --git a/build/classes/java/main/frc/robot/subsystems/BrasTelescopique.class b/build/classes/java/main/frc/robot/subsystems/BrasTelescopique.class new file mode 100644 index 0000000..602c22e Binary files /dev/null and b/build/classes/java/main/frc/robot/subsystems/BrasTelescopique.class differ diff --git a/build/classes/java/main/frc/robot/subsystems/Pince.class b/build/classes/java/main/frc/robot/subsystems/Pince.class new file mode 100644 index 0000000..f1b877d Binary files /dev/null and b/build/classes/java/main/frc/robot/subsystems/Pince.class differ diff --git a/build/classes/java/main/frc/robot/subsystems/Pivot.class b/build/classes/java/main/frc/robot/subsystems/Pivot.class new file mode 100644 index 0000000..7316aa8 Binary files /dev/null and b/build/classes/java/main/frc/robot/subsystems/Pivot.class differ diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 44ac11c..427cfff 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -20,29 +20,7 @@ public class Constants { public static int limitbg = 2; public static int limithd = 3; public static int limithg = 1; - - public static int BrasTelescopique = 5; - - - - - - -<<<<<<< HEAD - - - public static int actuateur = 4; - - public static int actuateur = 4; - // pneumatique - public static int pistonpinceouvre = 0; - public static int pistonpinceferme = 1; - public static int BrasTelescopique = 5; - public static int actuateur = 4; -======= - ->>>>>>> 0c37463a91f99a8623a1405743145ad70a140362 - } + \ No newline at end of file diff --git a/src/main/java/frc/robot/commands/Gyro.java b/src/main/java/frc/robot/commands/Gyro.java index ffc3a22..f2dd5b8 100644 --- a/src/main/java/frc/robot/commands/Gyro.java +++ b/src/main/java/frc/robot/commands/Gyro.java @@ -33,7 +33,7 @@ public class Gyro extends CommandBase { } else { - basvjePilotable.drive(0, 0, 0); + basePilotable.drive(0, 0, 0); } } diff --git a/src/main/java/frc/robot/subsystems/BasePilotable.java b/src/main/java/frc/robot/subsystems/BasePilotable.java index 312ba79..220799e 100644 --- a/src/main/java/frc/robot/subsystems/BasePilotable.java +++ b/src/main/java/frc/robot/subsystems/BasePilotable.java @@ -10,6 +10,7 @@ import com.revrobotics.CANSparkMaxLowLevel.MotorType; import edu.wpi.first.wpilibj.DoubleSolenoid; import edu.wpi.first.wpilibj.PneumaticsModuleType; +import edu.wpi.first.wpilibj.DoubleSolenoid.Value; import edu.wpi.first.wpilibj.drive.DifferentialDrive; import edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup; import edu.wpi.first.wpilibj2.command.SubsystemBase; @@ -23,9 +24,12 @@ public class BasePilotable extends SubsystemBase { final MotorControllerGroup droit = new MotorControllerGroup(avantdroit, arrieredroit); final MotorControllerGroup gauche = new MotorControllerGroup(avantgauche, arrieregauche); final DifferentialDrive drive = new DifferentialDrive(gauche, droit); + //piston + private DoubleSolenoid brakedroit = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakedroit, Constants.brakedroit); + private DoubleSolenoid brakegauche = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakegauche, Constants.brakegauche); + //gyro private AHRS gyroscope = new AHRS();public double getangle() {return gyroscope.getAngle();} - - public double getpitch() { + public double getpitch() { return gyroscope.getPitch(); } @@ -44,7 +48,14 @@ public class BasePilotable extends SubsystemBase { arrieredroit.getEncoder().setPosition(0); arrieregauche.getEncoder().setPosition(0); } - +public void BrakeOuvre(){ + brakedroit.set(Value.kForward); + brakegauche.set(Value.kForward); +} +public void BrakeFerme(){ + brakedroit.set(Value.kReverse); + brakegauche.set(Value.kReverse); +} /** Creates a new BasePilotable. */ public BasePilotable() { droit.setInverted(true);