From de668cfe2e2f69ecdb62720f20a0765725b4d13e Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Tue, 7 Mar 2023 19:13:16 -0500 Subject: [PATCH 01/17] mhc n --- src/main/java/frc/robot/Constants.java | 10 +-- src/main/java/frc/robot/RobotContainer.java | 71 +++++++------------ src/main/java/frc/robot/commands/Gyro.java | 8 +-- .../frc/robot/subsystems/BasePilotable.java | 14 ++-- .../java/frc/robot/subsystems/bras/Pince.java | 2 - 5 files changed, 43 insertions(+), 62 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 1518cc8..8bfd25c 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -1,12 +1,12 @@ package frc.robot; public class Constants { - public static int avantdroit = 0; - public static int avantgauche = 1; - public static int arrieredroit = 2; - public static int arrieregauche = 3; + public static int avantdroit = 1; + public static int avantgauche = 4; + public static int arrieredroit = 3; + public static int arrieregauche = 5; public static int BrasTelescopique = 4; - public static int pivot = 5; + public static int pivot = 0; //moteur public static int leverGratte = 0; diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index a68150c..910ae33 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -6,18 +6,9 @@ package frc.robot; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; -import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; import edu.wpi.first.wpilibj2.command.RunCommand; +import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; import edu.wpi.first.wpilibj2.command.button.CommandXboxController; - -//subsystems -import frc.robot.subsystems.BasePilotable; -import frc.robot.subsystems.Gratte; -import frc.robot.subsystems.bras.BrasTelescopique; -import frc.robot.subsystems.bras.Pince; -import frc.robot.subsystems.bras.Pivot; -import pabeles.concurrency.ConcurrencyOps.Reset; -import frc.robot.subsystems.Limelight; // command import frc.robot.commands.BrakeFerme; import frc.robot.commands.BrakeOuvre; @@ -32,71 +23,63 @@ import frc.robot.commands.bras.PivotBrasRentre; import frc.robot.commands.bras.PivoteBrasBas; import frc.robot.commands.bras.PivoteBrasHaut; import frc.robot.commands.bras.PivoteBrasMilieux; -import frc.robot.commands.bras.PivotChercheBas; -import frc.robot.commands.bras.PivotChercheHaut; -import edu.wpi.first.apriltag.AprilTag; -import frc.robot.commands.Cube; -import frc.robot.commands.Cone; -import frc.robot.commands.Tape; +//subsystems +import frc.robot.subsystems.BasePilotable; public class RobotContainer { CommandXboxController manette1 = new CommandXboxController(0); CommandXboxController manette2 = new CommandXboxController(1); // subsystems BasePilotable basePilotable = new BasePilotable(); -Gratte gratte = new Gratte(); +/*Gratte gratte = new Gratte(); BrasTelescopique brasTelescopique = new BrasTelescopique(); Pince pince = new Pince(); Pivot pivot = new Pivot(); -Limelight limelight = new Limelight(); +Limelight limelight = new Limelight();/** */ //commands -BrakeFerme brakeFerme = new BrakeFerme(basePilotable); -BrakeOuvre brakeOuvre = new BrakeOuvre(basePilotable); -GratteBaisser gratteBaisser = new GratteBaisser(gratte); -GratteMonte gratteMonte = new GratteMonte(gratte); +//BrakeFerme brakeFerme = new BrakeFerme(basePilotable); +//BrakeOuvre brakeOuvre = new BrakeOuvre(basePilotable); +//GratteBaisser gratteBaisser = new GratteBaisser(gratte); +//GratteMonte gratteMonte = new GratteMonte(gratte); Gyro gyro = new Gyro(basePilotable); -FermePince fermePince = new FermePince(pince); +/*FermePince fermePince = new FermePince(pince); OuvrePince ouvrePince = new OuvrePince(pince); PivotBrasRentre pivotBrasRentre = new PivotBrasRentre(brasTelescopique, pivot); PivoteBrasBas pivoteBrasBas = new PivoteBrasBas(brasTelescopique, pivot); PivoteBrasMilieux pivoteBrasMilieux = new PivoteBrasMilieux(brasTelescopique, pivot); PivoteBrasHaut pivoteBrasHaut = new PivoteBrasHaut(brasTelescopique, pivot); -Cone cone = new Cone(limelight, basePilotable, ()->-manette1.getLeftY()); +Cone cone = new Cone(limelight, basePilotable, ()->-manette1.getLeftY());**/ public RobotContainer() { configureBindings(); - - basePilotable.setDefaultCommand(new RunCommand(() -> { - basePilotable.drive(-manette1.getLeftY(), manette1.getLeftX()); - },basePilotable)); - -} + } private void configureBindings() { - manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); + basePilotable.setDefaultCommand(new RunCommand(() -> { + basePilotable.drive(-manette1.getLeftY(), -manette1.getLeftX()); + },basePilotable)); + //manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable)); manette1.y().whileTrue(gyro); -<<<<<<< HEAD // manette1.b().toggleOnTrue(Commands.startEnd(gratte::baiser, gratte::Lever,gratte)); -======= ->>>>>>> 4b22cac30fd2b3c5e7b1af3c7f890c4def2d21f7 manette1.start().toggleOnTrue(Commands.startEnd(basePilotable::resetGyro, basePilotable::resetGyro, basePilotable)); - manette1.b().toggleOnTrue(Commands.startEnd(gratte::baiser, gratte::Lever,gratte)); + /** manette1.b().toggleOnTrue(Commands.startEnd(gratte::baiser, gratte::Lever,gratte)); manette2.a().toggleOnTrue(Commands.startEnd(brasTelescopique::pivoteBrasHaut, brasTelescopique::pivoteBrasHaut)); manette2.b().toggleOnTrue(Commands.startEnd(brasTelescopique::pivoteBrasBas, brasTelescopique::pivoteBrasBas, brasTelescopique)); manette2.x().toggleOnTrue(Commands.startEnd(brasTelescopique::pivoteBrasMilieux, brasTelescopique::pivoteBrasMilieux, brasTelescopique)); manette2.y().toggleOnTrue(Commands.startEnd(brasTelescopique::pivotBrasRentre, brasTelescopique::pivotBrasRentre, brasTelescopique)); manette2.povRight().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheBas, brasTelescopique::PivotChercheBas, brasTelescopique)); - manette2.povLeft().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheHaut, brasTelescopique::PivotChercheHaut, brasTelescopique)); - manette2.rightBumper().toggleOnTrue(Commands.startEnd(null, null, null)); - manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null)); + manette2.povLeft().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheHaut, brasTelescopique::PivotChercheHaut, brasTelescopique));*/ + // manette2.rightBumper().toggleOnTrue(Commands.startEnd(null, null, null)); + // manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null)); } public Command getAutonomousCommand() { - return new SequentialCommandGroup( - new PivoteBrasMilieux(brasTelescopique, pivot), - new OuvrePince(pince), - new PivotBrasRentre(brasTelescopique, pivot).alongWith(new Reculer(basePilotable)), - new Gyro(basePilotable) - ); + return null; + //return new SequentialCommandGroup( + //new PivoteBrasMilieux(brasTelescopique, pivot), + //new OuvrePince(pince), + //new PivotBrasRentre(brasTelescopique, pivot).alongWith(new Reculer(basePilotable)), + //new Gyro(basePilotable) + //); } } diff --git a/src/main/java/frc/robot/commands/Gyro.java b/src/main/java/frc/robot/commands/Gyro.java index dcb7893..d38b4a2 100644 --- a/src/main/java/frc/robot/commands/Gyro.java +++ b/src/main/java/frc/robot/commands/Gyro.java @@ -23,13 +23,13 @@ public class Gyro extends CommandBase { // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { - if(basePilotable.getpitch()<10) + if(basePilotable.getpitch()>4) { - basePilotable.drive(0.4, 0); + basePilotable.drive(0.3, 0); } - else if(basePilotable.getpitch()>-10) + else if(basePilotable.getpitch()<-4) { - basePilotable.drive(-0.4, 0); + basePilotable.drive(-0.3, 0); } else { diff --git a/src/main/java/frc/robot/subsystems/BasePilotable.java b/src/main/java/frc/robot/subsystems/BasePilotable.java index b628ceb..c3daf2e 100644 --- a/src/main/java/frc/robot/subsystems/BasePilotable.java +++ b/src/main/java/frc/robot/subsystems/BasePilotable.java @@ -71,12 +71,12 @@ public void resetGyro(){ @Override public void periodic() { - teb .add("encodeuravantdroit",0.1); - teb .add("encodeurarrieregauche",0.1); - teb .add("encodeurarrieredroit",0.1); - teb .add("encodeuravantgauche",0.1); - teb .add("distance",0.1); - teb .add("brakedroit",0.1); - teb .add("brakegauche", 0.1); + //teb .add("encodeuravantdroit",0.1); + //teb .add("encodeurarrieregauche",0.1); + //teb .add("encodeurarrieredroit",0.1); + //teb .add("encodeuravantgauche",0.1); + //teb .add("distance",0.1); + //teb .add("brakedroit",0.1); + //teb .add("brakegauche", 0.1); } } \ No newline at end of file diff --git a/src/main/java/frc/robot/subsystems/bras/Pince.java b/src/main/java/frc/robot/subsystems/bras/Pince.java index 62022de..6044d4c 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pince.java +++ b/src/main/java/frc/robot/subsystems/bras/Pince.java @@ -8,8 +8,6 @@ import edu.wpi.first.wpilibj.DoubleSolenoid; import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj2.command.SubsystemBase; import edu.wpi.first.wpilibj.DoubleSolenoid.Value; -import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; -import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import frc.robot.Constants; From e7f5b8144523fdd6e22e1077c36fe375d301090a Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Tue, 7 Mar 2023 19:17:53 -0500 Subject: [PATCH 02/17] hgd --- .../frc/robot/subsystems/BasePilotable.class | Bin 5139 -> 5139 bytes src/main/java/frc/robot/Constants.java | 3 --- src/main/java/frc/robot/RobotContainer.java | 5 ---- src/main/java/frc/robot/commands/Gyro.java | 5 ++++ .../frc/robot/subsystems/BasePilotable.java | 1 - .../java/frc/robot/subsystems/Gratte.java | 20 +++++---------- .../java/frc/robot/subsystems/Limelight.java | 4 +-- .../subsystems/bras/BrasTelescopique.java | 6 ----- .../java/frc/robot/subsystems/bras/Pince.java | 1 - .../java/frc/robot/subsystems/bras/Pivot.java | 24 +++++------------- 10 files changed, 21 insertions(+), 48 deletions(-) diff --git a/bin/main/frc/robot/subsystems/BasePilotable.class b/bin/main/frc/robot/subsystems/BasePilotable.class index 9d83fb8c4b8d806f9d9e70c4e4830a754a053402..30a8c07ebc00cf5bf07e74c7c45acc8d79238caf 100644 GIT binary patch delta 212 zcmbQNF#+{C-)1Q zb2Jr_2$A>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0 // pneumatique public static int pistonpinceouvre = 0; diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index b9a7dd2..5924a25 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -78,12 +78,7 @@ public RobotContainer() { manette2.povRight().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheBas, brasTelescopique::PivotChercheBas, brasTelescopique)); manette2.povLeft().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheHaut, brasTelescopique::PivotChercheHaut, brasTelescopique)); manette2.rightBumper().toggleOnTrue(Commands.startEnd(null, null, null)); -<<<<<<< HEAD manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null));**/ -======= - manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null)); - ->>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0 } public Command getAutonomousCommand() { diff --git a/src/main/java/frc/robot/commands/Gyro.java b/src/main/java/frc/robot/commands/Gyro.java index dcb7893..a20e5aa 100644 --- a/src/main/java/frc/robot/commands/Gyro.java +++ b/src/main/java/frc/robot/commands/Gyro.java @@ -4,13 +4,18 @@ package frc.robot.commands; +import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj2.command.CommandBase; import frc.robot.subsystems.BasePilotable; public class Gyro extends CommandBase { + ShuffleboardTab teb = Shuffleboard.getTab("teb"); private BasePilotable basePilotable; /** Creates a new Gyro. */ public Gyro(BasePilotable basePilotable) { + teb.add("angleGyro", 0.1); + teb.add("vitesseGyro", 0.1); this.basePilotable = basePilotable; // Use addRequirements() here to declare subsystem dependencies. addRequirements(basePilotable); diff --git a/src/main/java/frc/robot/subsystems/BasePilotable.java b/src/main/java/frc/robot/subsystems/BasePilotable.java index 4cbec8e..fb14cae 100644 --- a/src/main/java/frc/robot/subsystems/BasePilotable.java +++ b/src/main/java/frc/robot/subsystems/BasePilotable.java @@ -8,7 +8,6 @@ import com.kauailabs.navx.frc.AHRS; import com.revrobotics.CANSparkMax; import com.revrobotics.CANSparkMaxLowLevel.MotorType; import edu.wpi.first.wpilibj.DoubleSolenoid; -import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj.DoubleSolenoid.Value; import edu.wpi.first.wpilibj.drive.DifferentialDrive; diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java index 7176d4f..1657537 100644 --- a/src/main/java/frc/robot/subsystems/Gratte.java +++ b/src/main/java/frc/robot/subsystems/Gratte.java @@ -14,11 +14,7 @@ import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import frc.robot.Constants; public class Gratte extends SubsystemBase { -<<<<<<< HEAD ShuffleboardTab teb = Shuffleboard.getTab("teb"); -======= - ShuffleboardTab teb = Shuffleboard.getTab("teb"); ->>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0 ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") .getLayout("limitswitchsgratte", BuiltInLayouts.kList) .withSize(2, 2); @@ -45,7 +41,12 @@ public boolean baiser; return limitbg.get(); } /** Creates a new Gratte. */ - public Gratte() {} + public Gratte() { + limitswitchgratte.add ("limitbd", 0.1); + limitswitchgratte.add ("limithg", 0.1); + limitswitchgratte.add ("limithd", 0.1); + limitswitchgratte.add ("limitbg", 0.1); + } public void Lever(double vitesse){ Gratted.set(vitesse); Gratteg.set(vitesse); @@ -56,14 +57,7 @@ public boolean baiser; } @Override public void periodic() { - teb .add("limithd", 0.1); - teb .add("limithg", 0.1); - teb .add("limitbd", 0.1); - teb .add("limitbg", 0.1); - limitswitchgratte.add ("limitbd", 0.1); - limitswitchgratte.add ("limithg", 0.1); - limitswitchgratte.add ("limithd", 0.1); - limitswitchgratte.add ("limitbg", 0.1); + } public boolean basd() { diff --git a/src/main/java/frc/robot/subsystems/Limelight.java b/src/main/java/frc/robot/subsystems/Limelight.java index 58d30f8..abdddaf 100644 --- a/src/main/java/frc/robot/subsystems/Limelight.java +++ b/src/main/java/frc/robot/subsystems/Limelight.java @@ -21,6 +21,8 @@ public class Limelight extends SubsystemBase { PhotonCamera limelight = new PhotonCamera("limelight"); /** Creates a new Limelight. */ public Limelight() { + CameraServer.startAutomaticCapture(); + teb .add("limelight", 0.1); PortForwarder.add(5800, "photonvision.local", 5800); } @@ -58,7 +60,5 @@ public class Limelight extends SubsystemBase { } @Override public void periodic() { - CameraServer.startAutomaticCapture(); - teb .add("limelight", 0.1); } } diff --git a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java index cb92af3..0ba43ff 100644 --- a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java +++ b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java @@ -24,16 +24,10 @@ public class BrasTelescopique extends SubsystemBase { ShuffleboardLayout layout = Shuffleboard.getTab("teb") .getLayout("layout", BuiltInLayouts.kList) .withSize(2, 2); -<<<<<<< HEAD ShuffleboardLayout bras = Shuffleboard.getTab("teb") .getLayout("bras", BuiltInLayouts.kList) .withSize(2, 2); -======= -ShuffleboardLayout bras = Shuffleboard.getTab("teb") -.getLayout("bras", BuiltInLayouts.kList) -.withSize(2, 2); ->>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0 /** Creates a new BrasTelescopique. */ public BrasTelescopique() {} final CANSparkMax Winch = new CANSparkMax(Constants.BrasTelescopique,MotorType.kBrushless); diff --git a/src/main/java/frc/robot/subsystems/bras/Pince.java b/src/main/java/frc/robot/subsystems/bras/Pince.java index a8a7c81..6044d4c 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pince.java +++ b/src/main/java/frc/robot/subsystems/bras/Pince.java @@ -8,7 +8,6 @@ import edu.wpi.first.wpilibj.DoubleSolenoid; import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj2.command.SubsystemBase; import edu.wpi.first.wpilibj.DoubleSolenoid.Value; - import frc.robot.Constants; diff --git a/src/main/java/frc/robot/subsystems/bras/Pivot.java b/src/main/java/frc/robot/subsystems/bras/Pivot.java index e82eecc..7fa1c28 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -14,11 +14,8 @@ import com.revrobotics.CANSparkMax; import com.revrobotics.CANSparkMaxLowLevel.MotorType; public class Pivot extends SubsystemBase { -<<<<<<< HEAD -ShuffleboardTab teb = Shuffleboard.getTab("teb"); -======= - ShuffleboardTab teb = Shuffleboard.getTab("teb"); ->>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0 + ShuffleboardTab teb = Shuffleboard.getTab("teb"); + // moteur private CANSparkMax pivot = new CANSparkMax(Constants.pivot,MotorType.kBrushless); private DigitalInput limitpivot = new DigitalInput(Constants.limitpivot); @@ -27,6 +24,10 @@ ShuffleboardTab teb = Shuffleboard.getTab("teb"); public void monteDescendre(double vitesse) { pivot.set (vitesse); } + public Pivot(){ + teb .add ("encodeurpivot",0.1); + teb .add ("limitpivot",0.1); + } // encodeur public double distance(){ return (pivot.getEncoder().getPosition()); @@ -40,17 +41,6 @@ ShuffleboardTab teb = Shuffleboard.getTab("teb"); } @Override public void periodic() { - teb .add("encodeur", 0.1); - teb .add ("encodeur pivot",0.1); } -<<<<<<< HEAD -} - - +} -======= - { - teb.add ("encodeur pivot",0.1); - } -} ->>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0 From 6208839355028b4d422dfafd4a7576a27bf76efd Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Tue, 7 Mar 2023 19:56:20 -0500 Subject: [PATCH 03/17] h --- src/main/java/frc/robot/RobotContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 3b8b887..3520c0f 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -34,7 +34,7 @@ import frc.robot.commands.bras.PivoteBrasMilieux; public class RobotContainer { - CameraServer.startAutomaticCapture(); +CameraServer.startAutomaticCapture(); CommandXboxController manette1 = new CommandXboxController(0); CommandXboxController manette2 = new CommandXboxController(1); // subsystems From c8ed4a3ff2ef29eee491382efe4409f912e3dc4c Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Tue, 7 Mar 2023 19:59:45 -0500 Subject: [PATCH 04/17] g --- .../java/frc/robot/subsystems/bras/BrasTelescopique.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java index 0ba43ff..e10ed52 100644 --- a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java +++ b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java @@ -29,7 +29,10 @@ public class BrasTelescopique extends SubsystemBase { .withSize(2, 2); /** Creates a new BrasTelescopique. */ - public BrasTelescopique() {} + public BrasTelescopique() { + teb .add("photocell",0.1); + teb .add("winch",0.1); + bras.add ("encodeur",0.1);} final CANSparkMax Winch = new CANSparkMax(Constants.BrasTelescopique,MotorType.kBrushless); private DigitalInput photocell = new DigitalInput(Constants.photocell); private DoubleSolenoid brakewinch = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakewinchf, Constants.brakewinchb); @@ -53,8 +56,6 @@ public class BrasTelescopique extends SubsystemBase { } @Override public void periodic() { - teb .add("photocell",0.1); - teb .add("winch",0.1); - bras.add ("encodeur",0.1); + } } \ No newline at end of file From a50cbc2cf5643bf54839bb1e5520aa0bf79cd925 Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Tue, 7 Mar 2023 20:01:30 -0500 Subject: [PATCH 05/17] wdes --- src/main/java/frc/robot/RobotContainer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 3520c0f..710e70d 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -3,7 +3,7 @@ // the WPILib BSD license file in the root directory of this project. package frc.robot; -import edu.wpi.first.cameraserver.CameraServer; +//import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; @@ -34,7 +34,7 @@ import frc.robot.commands.bras.PivoteBrasMilieux; public class RobotContainer { -CameraServer.startAutomaticCapture(); +//CameraServer.startAutomaticCapture(); CommandXboxController manette1 = new CommandXboxController(0); CommandXboxController manette2 = new CommandXboxController(1); // subsystems From 64556db1cdf87628040a1dff60884d7848a2b896 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Tue, 7 Mar 2023 20:03:12 -0500 Subject: [PATCH 06/17] tfghjkm --- src/main/java/frc/robot/RobotContainer.java | 31 +++++++++------ .../frc/robot/commands/GratteBaisser.java | 8 ++-- .../java/frc/robot/commands/GratteMonte.java | 4 +- .../java/frc/robot/subsystems/Gratte.java | 38 ++++++++++++------- 4 files changed, 51 insertions(+), 30 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index eef6f29..3734664 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -18,6 +18,7 @@ import frc.robot.subsystems.bras.Pince; import frc.robot.subsystems.bras.Pivot; import pabeles.concurrency.ConcurrencyOps.Reset; import frc.robot.subsystems.Limelight; +import frc.robot.commands.Apriltag; // command import frc.robot.commands.BrakeFerme; import frc.robot.commands.BrakeOuvre; @@ -35,6 +36,7 @@ import frc.robot.commands.bras.PivoteBrasMilieux; import frc.robot.commands.bras.PivotChercheBas; import frc.robot.commands.bras.PivotChercheHaut; import edu.wpi.first.apriltag.AprilTag; +import edu.wpi.first.math.spline.CubicHermiteSpline; import frc.robot.commands.Cube; import frc.robot.commands.Cone; import frc.robot.commands.Tape; @@ -62,6 +64,12 @@ PivoteBrasBas pivoteBrasBas = new PivoteBrasBas(brasTelescopique, pivot); PivoteBrasMilieux pivoteBrasMilieux = new PivoteBrasMilieux(brasTelescopique, pivot); PivoteBrasHaut pivoteBrasHaut = new PivoteBrasHaut(brasTelescopique, pivot); Cone cone = new Cone(limelight, basePilotable, ()->-manette1.getLeftY()); +PivotChercheBas pivotChercheBas = new PivotChercheBas(brasTelescopique, pivot); +PivotChercheHaut pivotChercheHaut = new PivotChercheHaut(brasTelescopique, pivot); +Cube cube = new Cube(limelight, basePilotable, null); +Apriltag aprilTag = new Apriltag(limelight, basePilotable, null); +Tape tape = new Tape(limelight, basePilotable, null); + public RobotContainer() { configureBindings(); @@ -71,23 +79,24 @@ public RobotContainer() { } - private boolean configureBindings() { + private void configureBindings() { // manette 1 manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable)); manette1.y().whileTrue(gyro); manette1.start().toggleOnTrue(Commands.startEnd(basePilotable::resetGyro, basePilotable::resetGyro, basePilotable)); - manette1.b().toggleOnTrue(Commands.startEnd(gratte::baiser, gratte::Lever,gratte)); + manette1.b().onTrue(Commands.either(gratteBaisser, gratteMonte, gratte::getenHaut)); + manette1.leftBumper().toggleOnTrue(aprilTag); + manette1.rightBumper().toggleOnTrue(tape); // manette 2 - manette2.a().toggleOnTrue(Commands.startEnd(brasTelescopique::pivoteBrasHaut, brasTelescopique::pivoteBrasHaut, brasTelescopique)); - manette2.b().toggleOnTrue(Commands.startEnd(brasTelescopique::pivoteBrasBas, brasTelescopique::pivoteBrasBas, brasTelescopique)); - manette2.x().toggleOnTrue(Commands.startEnd(brasTelescopique::pivoteBrasMilieux, brasTelescopique::pivoteBrasMilieux, brasTelescopique)); - manette2.y().toggleOnTrue(Commands.startEnd(brasTelescopique::pivotBrasRentre, brasTelescopique::pivotBrasRentre, brasTelescopique)); - manette2.povRight().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheBas, brasTelescopique::PivotChercheBas, brasTelescopique)); - manette2.povLeft().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheHaut, brasTelescopique::PivotChercheHaut, brasTelescopique)); - manette2.rightBumper().toggleOnTrue(Commands.startEnd(null, null, null)); - manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null)); - + manette2.a().onTrue(pivoteBrasHaut); + manette2.b().onTrue(pivoteBrasBas); + manette2.x().onTrue(pivoteBrasMilieux); + manette2.y().onTrue(pivotBrasRentre); + manette2.povRight().onTrue(pivotChercheBas); + manette2.povLeft().onTrue(pivotChercheHaut); + manette2.rightBumper().toggleOnTrue(cube); + manette2.leftBumper().toggleOnTrue(cone); } public Command getAutonomousCommand() { diff --git a/src/main/java/frc/robot/commands/GratteBaisser.java b/src/main/java/frc/robot/commands/GratteBaisser.java index 8984475..61c7240 100644 --- a/src/main/java/frc/robot/commands/GratteBaisser.java +++ b/src/main/java/frc/robot/commands/GratteBaisser.java @@ -18,7 +18,9 @@ public class GratteBaisser extends CommandBase { // Called when the command is initially scheduled. @Override - public void initialize() {} + public void initialize() { + gratte.setenHaut(false); + } // Called every time the scheduler runs while the command is scheduled. @Override @@ -41,9 +43,7 @@ public class GratteBaisser extends CommandBase { // Called once the command ends or is interrupted. @Override - public void end(boolean interrupted) { - - } + public void end(boolean interrupted) {} // Returns true when the command should end. @Override diff --git a/src/main/java/frc/robot/commands/GratteMonte.java b/src/main/java/frc/robot/commands/GratteMonte.java index 3581712..507b90d 100644 --- a/src/main/java/frc/robot/commands/GratteMonte.java +++ b/src/main/java/frc/robot/commands/GratteMonte.java @@ -19,7 +19,9 @@ public class GratteMonte extends CommandBase { // Called when the command is initially scheduled. @Override - public void initialize() {} + public void initialize() { + gratte.setenHaut(true); + } // Called every time the scheduler runs while the command is scheduled. @Override diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java index 3f727ef..0934180 100644 --- a/src/main/java/frc/robot/subsystems/Gratte.java +++ b/src/main/java/frc/robot/subsystems/Gratte.java @@ -5,6 +5,11 @@ package frc.robot.subsystems; import edu.wpi.first.wpilibj2.command.SubsystemBase; + +import javax.swing.text.StyledEditorKit.BoldAction; + +import org.apache.commons.collections4.functors.IfClosure; + import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; @@ -25,8 +30,16 @@ ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") private DigitalInput limithg = new DigitalInput(Constants.limithg); private DigitalInput limitbd = new DigitalInput(Constants.limitbd); private DigitalInput limitbg = new DigitalInput(Constants.limitbg); -public boolean baiser; - + public boolean baiser; + boolean enHaut = true; + public void setenHaut(boolean enHaut){ + this.enHaut = enHaut; + } + public boolean getenHaut(){ + return enHaut; + + } + public boolean hautd(){ return limithd.get(); } @@ -35,14 +48,19 @@ public boolean baiser; return limithg.get(); } - public boolean basd(int i, String string){ + public boolean basd(){ return limitbd.get(); } public boolean basg(){ return limitbg.get(); } /** Creates a new Gratte. */ - public Gratte() {} + public Gratte() { + + } + + + public void Lever(double vitesse){ Gratted.set(vitesse); Gratteg.set(vitesse); @@ -52,18 +70,10 @@ public boolean baiser; Gratteg.set(-vitesse); } @Override - public void periodic() { - teb .add("limithd", 0.1); - teb .add("limithg", 0.1); - teb .add("limitbd", 0.1); - teb .add("limitbg", 0.1); + public void periodic(){ limitswitchgratte.add ("limitbd", 0.1); limitswitchgratte.add ("limithg", 0.1); limitswitchgratte.add ("limithd", 0.1); limitswitchgratte.add ("limitbg", 0.1); } - -public boolean basd() { - return false; -} -} +} \ No newline at end of file From d461720da61b0b252ef524e242983c0eff377d91 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Tue, 7 Mar 2023 20:05:55 -0500 Subject: [PATCH 07/17] fdvhnbm --- src/main/java/frc/robot/RobotContainer.java | 23 +----------------- .../java/frc/robot/subsystems/Gratte.java | 24 ++----------------- 2 files changed, 3 insertions(+), 44 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index bfb40f7..bfc6d3b 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -32,17 +32,11 @@ import frc.robot.commands.bras.PivotBrasRentre; import frc.robot.commands.bras.PivoteBrasBas; import frc.robot.commands.bras.PivoteBrasHaut; import frc.robot.commands.bras.PivoteBrasMilieux; -<<<<<<< HEAD import frc.robot.commands.bras.PivotChercheBas; import frc.robot.commands.bras.PivotChercheHaut; -import edu.wpi.first.apriltag.AprilTag; -import edu.wpi.first.math.spline.CubicHermiteSpline; import frc.robot.commands.Cube; -import frc.robot.commands.Cone; import frc.robot.commands.Tape; -======= ->>>>>>> a50cbc2cf5643bf54839bb1e5520aa0bf79cd925 public class RobotContainer { //CameraServer.startAutomaticCapture(); @@ -84,15 +78,11 @@ public RobotContainer() { } private void configureBindings() { -<<<<<<< HEAD // manette 1 -======= ->>>>>>> a50cbc2cf5643bf54839bb1e5520aa0bf79cd925 manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable)); manette1.y().whileTrue(gyro); manette1.start().toggleOnTrue(Commands.startEnd(basePilotable::resetGyro, basePilotable::resetGyro, basePilotable)); -<<<<<<< HEAD manette1.b().onTrue(Commands.either(gratteBaisser, gratteMonte, gratte::getenHaut)); manette1.leftBumper().toggleOnTrue(aprilTag); manette1.rightBumper().toggleOnTrue(tape); @@ -104,18 +94,7 @@ public RobotContainer() { manette2.povRight().onTrue(pivotChercheBas); manette2.povLeft().onTrue(pivotChercheHaut); manette2.rightBumper().toggleOnTrue(cube); - manette2.leftBumper().toggleOnTrue(cone); -======= - /*manette1.b().toggleOnTrue(Commands.startEnd(gratte::baiser, gratte::Lever,gratte)); - manette2.a().toggleOnTrue(Commands.startEnd(brasTelescopique::pivoteBrasHaut, brasTelescopique::pivoteBrasHaut)); - manette2.b().toggleOnTrue(Commands.startEnd(brasTelescopique::pivoteBrasBas, brasTelescopique::pivoteBrasBas, brasTelescopique)); - manette2.x().toggleOnTrue(Commands.startEnd(brasTelescopique::pivoteBrasMilieux, brasTelescopique::pivoteBrasMilieux, brasTelescopique)); - manette2.y().toggleOnTrue(Commands.startEnd(brasTelescopique::pivotBrasRentre, brasTelescopique::pivotBrasRentre, brasTelescopique)); - manette2.povRight().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheBas, brasTelescopique::PivotChercheBas, brasTelescopique)); - manette2.povLeft().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheHaut, brasTelescopique::PivotChercheHaut, brasTelescopique)); - manette2.rightBumper().toggleOnTrue(Commands.startEnd(null, null, null)); - manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null));**/ ->>>>>>> a50cbc2cf5643bf54839bb1e5520aa0bf79cd925 + manette2.leftBumper().toggleOnTrue(cone); } public Command getAutonomousCommand() { diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java index df518c7..056c6da 100644 --- a/src/main/java/frc/robot/subsystems/Gratte.java +++ b/src/main/java/frc/robot/subsystems/Gratte.java @@ -3,13 +3,7 @@ // the WPILib BSD license file in the root directory of this project. package frc.robot.subsystems; - import edu.wpi.first.wpilibj2.command.SubsystemBase; - -import javax.swing.text.StyledEditorKit.BoldAction; - -import org.apache.commons.collections4.functors.IfClosure; - import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; @@ -53,22 +47,13 @@ ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") public boolean basg(){ return limitbg.get(); } - /** Creates a new Gratte. */ -<<<<<<< HEAD - public Gratte() { - - } - - - -======= + public Gratte() { limitswitchgratte.add ("limitbd", 0.1); limitswitchgratte.add ("limithg", 0.1); limitswitchgratte.add ("limithd", 0.1); limitswitchgratte.add ("limitbg", 0.1); } ->>>>>>> a50cbc2cf5643bf54839bb1e5520aa0bf79cd925 public void Lever(double vitesse){ Gratted.set(vitesse); Gratteg.set(vitesse); @@ -78,15 +63,10 @@ ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") Gratteg.set(-vitesse); } @Override -<<<<<<< HEAD public void periodic(){ limitswitchgratte.add ("limitbd", 0.1); limitswitchgratte.add ("limithg", 0.1); limitswitchgratte.add ("limithd", 0.1); limitswitchgratte.add ("limitbg", 0.1); -======= - public void periodic() { - ->>>>>>> a50cbc2cf5643bf54839bb1e5520aa0bf79cd925 - } +} } \ No newline at end of file From 407603ab1fdb564bb2b1fc0a7b834e6980ab58e7 Mon Sep 17 00:00:00 2001 From: Olivier Demers Date: Wed, 8 Mar 2023 14:02:31 +0000 Subject: [PATCH 08/17] Deleted bin/main/frc/robot/subsystems/BasePilotable.class --- .../frc/robot/subsystems/BasePilotable.class | Bin 4945 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bin/main/frc/robot/subsystems/BasePilotable.class diff --git a/bin/main/frc/robot/subsystems/BasePilotable.class b/bin/main/frc/robot/subsystems/BasePilotable.class deleted file mode 100644 index 97e4d2ea02ea1f4aecc4b5d209cb7cce22189f01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4945 zcmbVQ`F|W`8UIeM$!?}?SlZf9S_0H|6KaPfg)|Mc&7IUu6S6fiP{rBZNixl3XPueN zB}xPpJPH-%xFR+B?IDJ8DPUiD*i*C;PS8 zRtZ(!i{n~4K0z@>vu#7S^@MF1u7pjQW%hA-X1^s;P#bm1axFV_0Q!N6Pu=!Z+G{(lLP|`Itvs3I4A{eu^$*hihi->nxY1%GonR?PP z65^(wRQB{zSC2_JSVY*FNRN$~dd$*nns(LVq!tr*Fts@=O#?M=R6gPf5+X1@XIoC( zO3?zok0!OWW|&&cQIp#AtSWfX);kpCyOra*t0l)xzFHct>y%K|VI}kcBwVRrJ6;pS zZq&-SO2SUz>>@x4u11Xy*5-q4i5N-!M0zTw+q{>64@IoFW)5q%A=a7AGIzpoBds%D^=_Zew)-x})R^b@hWwc4SYHb*A^k;nv0;s4sR?RfRFB)@5cXYCmLl{ zn178SeOk9gVhz~B);$bf!EZysY4p-j^%_Hg7h)3a(a_|>Ru8_Dt3TkD2p(ASsepLET}^^{L=i5hNOC6s$a z=WgOrac2EgCaf!NGLnXSB#2VXE0{%p0C(UWGTu(`e55mhi;!_01$SbB7V-;=Umv8t z0Pe!OWZccTT}$v)btYoXL});Bk5>~;&ZTJBcjG-on{2n!&V;EuOfc%p!s(I_B*|gi zD>Q$vgr;!c2Bn4L@4)*-d@YFCeImZR+5IBE7G!*g`Mt2~Ua`)}_=tqYjSC0y06r$J z^l=GhF&@K@e3U*F2;^L6ykKpAyP^TEgV3Qs&j_@>zUd#^;JA zoWZ1?o?@PjJN;H7%{t`~>I-<7(bsWusB5r;Az3Wn6cTO~1o)E3b_*i&JR&ar6$uT+ zE?p3#ug|B{S4A#as6;4;Z{RT*-z2jOGofggq2OCMD_SMpWw1)jVUUtZ9wb;IV)bb3KN zgCENHfrJ~@Vae64rVpUtS^S8FbjENeqQ*S)`;jo2wjS+QgLPO_DJ#h~+M~cv6l}#d zQNZR!#`&3opW}JIU+7D+D7m6}DhspL@Z^+k8&<-ISK`Ksqvy|vuZM#84Spx%w-T!J zb;z&e3Vx42Fc7Cj8!#}&dL;UewQqSY{-c6F;m@qwT7u_|6mn8tZXkAAkGt#igE5sd z^${aM4zyNcOC>I2t%+J`JFa&dUZZ=_C#(bF7=HTcOD1)@!_*u{cVzsFrF$Jkja18( zHPYT|e{eMet(47~f@;xaa#k%GId5be=Z$RQypc)Q8<}#wk?k@}wQ8;omE`YUIAev9kVg>|DmK$GkVM;ok~xKa6WRSNwOd2e0Ky!rq*G zQ${}E%kR5yEkOM$fItpl6RsnSP$0tVmU9deVE?|lWgIxmRSAR&L5{!yR#(+Ssr5`0 z%%F(pO*rVO7Q_vlm2!S#PPMyH<~?g6a`Q4;&f}ZficQePlty*$dji5hsRmW2h$SSn?JWiBiB%@J& zB~;3Ew%hj1lYP|w!p5Lyc=FqBiEC*!PbJTkh7H!R~e&NP3P2jA?O z`DU8;2*dv9D$s4YTg8ikCUT%+widLFpzQ?hC91HGM^3g3sQA89%92!fH&WZ5}P zo%MVw6Gxac&yp?{(H;+VyDynhwTeVeW13Pk#N)qEj>~Wax7on@evwAl$cY$useT1> z^-tpP=px>>h+4x{~qn8^Gj8gOFvZwIj(NfO3qbvC6 z5+2Mx>C8Rp^`D&K6IIBZ;qQYh_~a7ybL$jU`OG4|$e$H_c?r?{-lL0n)Z5eQLti_G zuPedKXxYI;QA1*1 zK{D?|FPRm?E_OP*aX%B(!?gAat$Kk;;90))Jn8=e!gvwK@n5`tl}BI7(c~9dBV#-h zjSW;_G4#u=_|-Z5dKoVW`Y(q5vS$6){5r2_h!DU4v)dqQaSN`;(5gclGKZGnZ+xo+ Zf5$&KhB&(m|HO;OYWVr=6#jjz=KpCZN&^4@ From cea457445cc5bdbc04e400672d85c43ce2d67800 Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Wed, 8 Mar 2023 18:13:47 -0500 Subject: [PATCH 09/17] kjgu][f --- .../frc/robot/subsystems/BasePilotable.class | Bin 5139 -> 4598 bytes .../frc/robot/subsystems/BasePilotable.java | 7 +------ .../subsystems/bras/BrasTelescopique.java | 13 ++----------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/bin/main/frc/robot/subsystems/BasePilotable.class b/bin/main/frc/robot/subsystems/BasePilotable.class index 30a8c07ebc00cf5bf07e74c7c45acc8d79238caf..3d8632d713bee88e3047c13241dd62670346323e 100644 GIT binary patch literal 4598 zcmbVP`(GT@75`3n47*GcL=z;@m_|%?$zz(Aff8eYg@9QivXnHjt(~16V6wA2%gih! z*4A44u(sB|)YiV6zF$@=vij^!XZ_+b2%-aQB$SOVylE^ZC=ZJ840&1xk7b}dH)Pkch$lEGpT~+WXH6N zeG*#zg)>@FpXD}1a~#ufjErNOo`j9zur%Ei%6pSFtxGTHANJ}_UXR|w7oSwFfw5>UWwrVh`rKu`1bIGw?-7e7l0N|`v)J#iDyJ}vW zzo-hQ_K!@YxVB}+@U;Al#ib3gctS$spq()ykg!d`E!YypZP+2>b_v^sr|KwDa0fa9 zW&MG&%}FzFoGIqghC`!-`u3!)Yu1$Jm|`3X8@*Z6mC%)ZXP$+|7EDi{6;|z5um`c= z&~YL3Z!j#ODV9jYr^FTZD%glkQS65*@D(Dy9Y2^vywrdJ|1v-NYWHgK3kb;(=cS=D7 z&CMscmN{-F;D<#|LFR zNY<_AOa&jphk1V=1vPdfCj}(@h=QBYRsvwyaB>7-61sv+aE%FL-f%=#j5q@8Qw(0g z?->QNI86`uQZnzjnK!)?Q8XZ{z{KeYaC zMHzJH{?(+ZO1w#XAxWdGEvIaCXch7Mc?AkuMV@;~81qF5*>`2kyS3#@_==1#*A3$Fyiv?C zcj@k!ohdT+`-J)`z9vB)oSYaM9~`S6!?iZ|2?9JTGRT~W=C6xOe?!8-dY7)LV{|m2 z)Hg+Z&b6RDitpfiGQLY@*JeW9XIH`Z@dHsi7#`m>2_v!O1;(9f@nuz0o@3@``r>uK zt*cbL<-)l?RM3u_MMlU9y8T4KPw}%L0gvXHIXv+iHO9`zr&@5Nok{zb3VwxO2l>9= z4RWA_(b#(4*mz)g(K9V|x|r9+TcL(&v{)!utiBk>zrmu67wbmMT31r=TfD?nr)4rF z%j_Cxt;3A<0U8*c@gI(}W`-UTbwt5%Ogm%h%xEdQ=;+3<>6a+i6t)M14<)n>*tX|- zj#d~myjeTrMsXFtlkp0xZeYx`qD@q6?6rxa$ZuH^`7H|~zh$!ZTc%pSWogNFgQ#QtmajZp zh-mf4te)8lT(+Wv|8M2!5Z6m=Te@FD=Q6gx;IG`t|INO97cBylxxWUxa3@DBRLc7g zhx;SJ{=1%9t)Qz)L8Po;BjQve3`p{tO>Co7(7h+VjD0V1v;jMXj4cr3YZ~{p?DV0D zhFZk@L0&+Z7R6!q8rY}5L(Pw)(Vy$3=A+9vb_MrHSm0owG|)Lnlm;^#43`G_Ef}#Y zSJ_PyfW0i<_o0*RHok1T+3vvs9=w-_9^g0By;WE3EnoFMoDL0geFK4#L7T21*?_a5 zMU{~-sWK8ag`)~GTYbz9(&2}ghYzEhCiLKFO#{Zu2Am3=wS`AMu!z($&awAU(5ool zYS)ipS42u$M@!;L}TZqBJv5o*52ip5)AavFAyCo>;*bme5Vnd7AR{BA(&j z3Z7fS0~Oixi+J9bJ=ER)t(WobC0yp@ZRb|-qa}0-Ese|gG26@SKkvSZUjWN^;cNw; z6AXV~fZX50->sx+2dQ~0Mo8Q=iTen)<7w=`Wqw0mA%d?Hxi>M0{~&??VyFt!x67C= zl`tj6MfmemIWWi*_f>7=JLKny2AU>9c?B=C6*=VhWY+8W6aI|9P_m697k|ayPj>SA Q$9epN?HhOt|3c^g0TkQP`v3p{ literal 5139 zcmbVP`F|6~75^?i){+-+osh&O5J(8f4q>^1111#Pva$Kd;9As_gdQttZ7*8ws=F&2 z)3i-X+oWmI^gh%3NbfXmWCzlu^h(<_P4D|Ye(ayn^waO`t`4x|82Dh#%-eb2dGnq3 z-n@DCf9IbD(2ak|SRvuY2`8;OcFOitw~%sYT~E)sYMk^!yI{LJ~hLLvF{@x?Wyyj#_ zw9`EjTK$QWS|L3}HAQnALwEFyV;i1?mEo}Txha(IP1LkT&Doyqq;1P{Y*QT(gZ^M( z>dqm@F66mja}}5|%{A3JU>S#>)wnS+L4z#M(9F1y5F(m#v~0=7&2`k{c7fa_ZBw^w zBO`X|Yn4`S@br{~-F1}RslvpBsi$nsA+=S5V_Hh=!PI8$0txEAT>XTvNQlVftYf=r zJ5L6JGsTh z9vfubAYrXI>^eXSHliZ{>kYtGCk#tJQplxrhx-!n?Fl=rnd6#ch;b-v^rj3~!luNF zyJ~1`-tf{>!m5~pPILu}jtZf_gFy*Rv3R_5Tx{W11uL;C3KctKZ0ESPYt``v1v_zz z@M0&eWpv*`cs!?*d0nUTOXMnYW{hFv8MZ|;GKNbg(>`~%D`-M<6#KAW1`YSQs}m>+ z?!W;$9uH!`N|Ss?!cDQxMX@!en_OyI4=44s;vo8D^h&tl(lESas)BxTI;~t`)OHPF zuV80DfsAI+JEWi`=nX4~pt<>A8`B8?k<2mO)#;6Nj&ZT#Q3a!TIl(9`fl1g9i`OuC zU_4=@1{}wBNI|qu1lG~QwBs{$Ou=fjMKF$6$~Z2etM<`c9BG@zHM5{AIDtD!cy`cs zW*9_FV0A*JmUd4RC-G_-ucFs2XH5mK!E3pHp9M8`IV%NDm{RZ(w3P@L)SVm&7zej8 z5o}{jpVl3bSR;<$`VfOx__v|p6h?RgzLcJ~->?ktKokwgDac|Z0voTBk(Y2)C3=_? zg&TUV0tbw&XppRfoGT4SP{53gX~x2(PE(b;6ZTAkMwy%ZJbP?5Ph(GGmT1{Nr{GSR zx=Uzvk&7+~LE`t}^}_PICG3g~U#7Mo)5aTx&$^;_kMLQ)_ZH!^u8g-bXVyN^7ri@V zyj{Z1%U6!#EbbFqdWQtFo^LF*de2>T9BN6Wz_H$`Ac|HIzYi)<&?@rWL&BJMOUPc4 zF;{BKd+~l5@2eZcqn2LCF?Xfi5j#_0?)M$)1Nfi>x&PSMz-T|+yj~2~QtlBB@L`cb zToKJ56`TH;gdO!ZT@zz?IB=qF7@EIAOrf1jogt|Akg3sb}qWsW3-fI$u zVu@3XJJsaPswO?huqJyt>yTR)RFnhaaKE6S9aptrPXu4WS7dyd8(oHdeFekxhOM9| zU^e(FzQ$aVP4Jdt_$|knixC*UkK!>I->4fXOYKC#9KI* z`J9F&QWQlj$e5RK+cKD}uF(Pj1yA4{Z=e~&n@SpIn7R+d=uXSAz8b9G&gE^3^{0Q% zPb#>O|B&HP;j-^2HVOTE_(E;v} zoq=~2Ji}Bc3RYSa1ZsF!7V>$MRXR_*h-Vc15I^FnX_-uE1-sU%`Ody1-14{y7SH&% z{Ba{gXAwnTUUv*TW2AZgB<+He)&~v0p1kNGvrX6_p{>uhJ=b%z{D|&N*%{`C=kaqH zKjUkt5|V~BZD(~gq2*E;jT5yAEzJkTtb$+Qm*g~85lMKiddHz=06xUW5wF5c3ER%{ z{joUat0WgG`p$brAA=>Ums$)Q9)o)q7`YmrpzvaE?w|ob%T_K82zhz0r79zF!Eklp(3i0G& zEBLt%9sGSMM>{E(*tT>%jM8$`WXskFvq1C>o-O@4K+u zH!X_W*lS>)=N=-TMWg?1FOj?FvG*KaCSitycxjO4V6ZfpVw$9I5v z{NQ+nxWmi`z##_3waf?C`7zv0PaeWrr07I Date: Wed, 8 Mar 2023 18:17:44 -0500 Subject: [PATCH 10/17] jhg --- src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java index f553764..c6f6e5b 100644 --- a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java +++ b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java @@ -23,7 +23,7 @@ public class BrasTelescopique extends SubsystemBase { public BrasTelescopique() { teb .add("photocell",0.1); teb .add("winch",0.1); - teb .add ("encodeur",0.1);} + teb .add("encodeur",0.1);} final CANSparkMax Winch = new CANSparkMax(Constants.BrasTelescopique,MotorType.kBrushless); private DigitalInput photocell = new DigitalInput(Constants.photocell); private DoubleSolenoid brakewinch = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakewinchf, Constants.brakewinchb); From 286ea352ffc3e0c46e6d4efb031b9e406915197c Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Wed, 8 Mar 2023 18:21:27 -0500 Subject: [PATCH 11/17] r --- src/main/java/frc/robot/commands/Gyro.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/commands/Gyro.java b/src/main/java/frc/robot/commands/Gyro.java index d38b4a2..4d60319 100644 --- a/src/main/java/frc/robot/commands/Gyro.java +++ b/src/main/java/frc/robot/commands/Gyro.java @@ -25,11 +25,11 @@ public class Gyro extends CommandBase { public void execute() { if(basePilotable.getpitch()>4) { - basePilotable.drive(0.3, 0); + basePilotable.drive(0.3*basePilotable.getpitch()/12, 0); } else if(basePilotable.getpitch()<-4) { - basePilotable.drive(-0.3, 0); + basePilotable.drive(0.3*basePilotable.getpitch()/12, 0); } else { From 00f9a623ae39d86c344f548606bd9fe4348f2a28 Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Wed, 8 Mar 2023 18:32:47 -0500 Subject: [PATCH 12/17] 'jrhsgohv --- src/main/java/frc/robot/RobotContainer.java | 3 ++- src/main/java/frc/robot/subsystems/Gratte.java | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index bfc6d3b..0a1dcc2 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -3,6 +3,7 @@ // the WPILib BSD license file in the root directory of this project. package frc.robot; +import edu.wpi.first.cameraserver.CameraServer; //import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; @@ -70,7 +71,7 @@ Tape tape = new Tape(limelight, basePilotable, null); public RobotContainer() { configureBindings(); - + CameraServer.startAutomaticCapture(); basePilotable.setDefaultCommand(new RunCommand(() -> { basePilotable.drive(-manette1.getLeftY(), manette1.getLeftX()); },basePilotable)); diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java index 056c6da..a90d859 100644 --- a/src/main/java/frc/robot/subsystems/Gratte.java +++ b/src/main/java/frc/robot/subsystems/Gratte.java @@ -48,7 +48,7 @@ ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") return limitbg.get(); } - public Gratte() { + public Gratte() { limitswitchgratte.add ("limitbd", 0.1); limitswitchgratte.add ("limithg", 0.1); limitswitchgratte.add ("limithd", 0.1); @@ -64,9 +64,5 @@ ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") } @Override public void periodic(){ - limitswitchgratte.add ("limitbd", 0.1); - limitswitchgratte.add ("limithg", 0.1); - limitswitchgratte.add ("limithd", 0.1); - limitswitchgratte.add ("limitbg", 0.1); -} + } } \ No newline at end of file From ede4116cd9bd14d0520e48e6c195a6729a77b3a8 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Wed, 8 Mar 2023 18:33:29 -0500 Subject: [PATCH 13/17] gt --- src/main/java/frc/robot/commands/Gyro.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/frc/robot/commands/Gyro.java b/src/main/java/frc/robot/commands/Gyro.java index 2350667..9665ecb 100644 --- a/src/main/java/frc/robot/commands/Gyro.java +++ b/src/main/java/frc/robot/commands/Gyro.java @@ -30,19 +30,16 @@ public class Gyro extends CommandBase { public void execute() { if(basePilotable.getpitch()>4) { -<<<<<<< HEAD basePilotable.drive(0.3*basePilotable.getpitch()/12, 0); } else if(basePilotable.getpitch()<-4) { basePilotable.drive(0.3*basePilotable.getpitch()/12, 0); -======= basePilotable.drive(0.3*basePilotable.getpitch()/15, 0); } else if(basePilotable.getpitch()<-4) { basePilotable.drive(0.3*basePilotable.getpitch()/15, 0); ->>>>>>> 3d2364b54822fb53a6cd71a0347d11baeef62001 } else { From 2dab0d5dc74cb6c65a3f1c265c16fc3738964531 Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Wed, 8 Mar 2023 18:41:20 -0500 Subject: [PATCH 14/17] jjj --- src/main/java/frc/robot/RobotContainer.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 21a327e..9542fb6 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -4,7 +4,6 @@ package frc.robot; import edu.wpi.first.cameraserver.CameraServer; -//import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; import edu.wpi.first.wpilibj2.command.RunCommand; From 4e6c8413d97064fbc2b9f27d9aa1ff84e5dcad80 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Wed, 8 Mar 2023 18:50:24 -0500 Subject: [PATCH 15/17] fe --- src/main/java/frc/robot/RobotContainer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 9542fb6..669f3f5 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -80,9 +80,7 @@ public RobotContainer() { } private void configureBindings() { - basePilotable.setDefaultCommand(new RunCommand(() -> { - basePilotable.drive(-manette1.getLeftY(), -manette1.getLeftX()); - },basePilotable)); + // manette 1 manette1.povDown().onTrue(pivoteBrasHaut); manette1.povUp().onTrue(pivoteBrasBas); From 99ce225dc62b77c9d29c823ee2284d1017e529eb Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Wed, 8 Mar 2023 19:11:46 -0500 Subject: [PATCH 16/17] df --- .../frc/robot/subsystems/BasePilotable.java | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/BasePilotable.java b/src/main/java/frc/robot/subsystems/BasePilotable.java index 9c1b909..cc90ca1 100644 --- a/src/main/java/frc/robot/subsystems/BasePilotable.java +++ b/src/main/java/frc/robot/subsystems/BasePilotable.java @@ -7,22 +7,25 @@ package frc.robot.subsystems; import com.kauailabs.navx.frc.AHRS; import com.revrobotics.CANSparkMax; 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.wpilibj.shuffleboard.BuiltInLayouts; import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; public class BasePilotable extends SubsystemBase { - final CANSparkMax avantd = new CANSparkMax(Constants.avantdroit, MotorType.kBrushless); + final CANSparkMax avantdroit = new CANSparkMax(Constants.avantdroit, MotorType.kBrushless); final CANSparkMax avantgauche = new CANSparkMax(Constants.avantgauche, MotorType.kBrushless); final CANSparkMax arrieredroit = new CANSparkMax(Constants.arrieredroit, MotorType.kBrushless); final CANSparkMax arrieregauche = new CANSparkMax(Constants.arrieregauche, MotorType.kBrushless); - final MotorControllerGroup droit = new MotorControllerGroup(avantd, arrieredroit); + final MotorControllerGroup droit = new MotorControllerGroup(avantdroit, arrieredroit); final MotorControllerGroup gauche = new MotorControllerGroup(avantgauche, arrieregauche); final DifferentialDrive drive = new DifferentialDrive(gauche, droit); @@ -31,26 +34,35 @@ public class BasePilotable extends SubsystemBase { private DoubleSolenoid brakegauche = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakegauche, Constants.brakegauche); //gyro ShuffleboardTab teb = Shuffleboard.getTab("teb"); + ShuffleboardLayout layout = Shuffleboard.getTab("teb") + .getLayout ("encodeurs base pilotable", BuiltInLayouts.kList) + .withSize(2, 2); private AHRS gyroscope = new AHRS();public double getangle() {return gyroscope.getAngle();} public double getpitch() { return gyroscope.getPitch(); } - public void drive(double xSpeed, double zRotation){ + public void drive(double xSpeed, double zRotation, int i){ drive.arcadeDrive(xSpeed, zRotation); } public double distance(){ - return (-avantd.getEncoder().getPosition() + teb .add ("distance",0.1); + return (-avantdroit.getEncoder().getPosition() +avantgauche.getEncoder().getPosition() -arrieredroit.getEncoder().getPosition() +arrieregauche.getEncoder().getPosition()) / 4; } public void Reset() { - avantd.getEncoder().setPosition(0); + avantdroit.getEncoder().setPosition(0); avantgauche.getEncoder().setPosition(0); arrieredroit.getEncoder().setPosition(0); arrieregauche.getEncoder().setPosition(0); } + public void resetGyro(){ + {gyroscope.reset(); + } + } + public void BrakeOuvre(){ brakedroit.set(Value.kForward); brakegauche.set(Value.kForward); @@ -59,24 +71,13 @@ public void BrakeFerme(){ brakedroit.set(Value.kReverse); brakegauche.set(Value.kReverse); } -public void resetGyro(){ - {gyroscope.reset();} - } /** Creates a new BasePilotable. */ public BasePilotable() { droit.setInverted(true); - teb .addDouble("distance", this::distance); } @Override public void periodic() { - //teb .add("encodeuravantdroit",0.1); - //teb .add("encodeurarrieregauche",0.1); - //teb .add("encodeurarrieredroit",0.1); - //teb .add("encodeuravantgauche",0.1); - //teb .add("distance",0.1); - //teb .add("brakedroit",0.1); - //teb .add("brakegauche", 0.1); - + } -} \ No newline at end of file +} From fc4607f3c6d7203a155182eded4626d37f75de5e Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Wed, 8 Mar 2023 19:14:16 -0500 Subject: [PATCH 17/17] rft --- src/main/java/frc/robot/RobotContainer.java | 9 ++++----- src/main/java/frc/robot/commands/Apriltag.java | 2 +- src/main/java/frc/robot/commands/Cone.java | 2 +- src/main/java/frc/robot/commands/Cube.java | 2 +- src/main/java/frc/robot/commands/Gyro.java | 10 +++++----- src/main/java/frc/robot/commands/Reculer.java | 2 +- src/main/java/frc/robot/commands/Tape.java | 2 +- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 669f3f5..3612eaa 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -7,7 +7,6 @@ import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; import edu.wpi.first.wpilibj2.command.RunCommand; -import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; import edu.wpi.first.wpilibj2.command.button.CommandXboxController; //subsystems @@ -25,7 +24,6 @@ import frc.robot.commands.Cone; import frc.robot.commands.GratteBaisser; import frc.robot.commands.GratteMonte; import frc.robot.commands.Gyro; -import frc.robot.commands.Reculer; import frc.robot.commands.bras.FermePince; import frc.robot.commands.bras.OuvrePince; import frc.robot.commands.bras.PivotBrasRentre; @@ -33,7 +31,6 @@ import frc.robot.commands.bras.PivoteBrasBas; import frc.robot.commands.bras.PivoteBrasHaut; import frc.robot.commands.bras.PivoteBrasMilieux; //subsystems -import frc.robot.subsystems.BasePilotable; import frc.robot.commands.bras.PivotChercheBas; import frc.robot.commands.bras.PivotChercheHaut; import frc.robot.commands.Cube; @@ -74,13 +71,15 @@ public RobotContainer() { configureBindings(); CameraServer.startAutomaticCapture(); basePilotable.setDefaultCommand(new RunCommand(() -> { - basePilotable.drive(-manette1.getLeftY(), manette1.getLeftX()); + basePilotable.drive(-manette1.getLeftY(), manette1.getLeftX(), 0); },basePilotable)); } private void configureBindings() { - + basePilotable.setDefaultCommand(new RunCommand(() -> { + basePilotable.drive(-manette1.getLeftY(), -manette1.getLeftX(), 0); + },basePilotable)); // manette 1 manette1.povDown().onTrue(pivoteBrasHaut); manette1.povUp().onTrue(pivoteBrasBas); diff --git a/src/main/java/frc/robot/commands/Apriltag.java b/src/main/java/frc/robot/commands/Apriltag.java index 9ef54b3..3ef6b06 100644 --- a/src/main/java/frc/robot/commands/Apriltag.java +++ b/src/main/java/frc/robot/commands/Apriltag.java @@ -32,7 +32,7 @@ public class Apriltag extends CommandBase { // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { - basePilotable.drive(doubleSupplier.getAsDouble(), limelight.getYaw()); + basePilotable.drive(doubleSupplier.getAsDouble(), limelight.getYaw(), 0); } // Called once the command ends or is interrupted. diff --git a/src/main/java/frc/robot/commands/Cone.java b/src/main/java/frc/robot/commands/Cone.java index d780293..8121b19 100644 --- a/src/main/java/frc/robot/commands/Cone.java +++ b/src/main/java/frc/robot/commands/Cone.java @@ -32,7 +32,7 @@ public class Cone extends CommandBase { // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { - basePilotable.drive(doubleSupplier.getAsDouble(), limelight.getYaw()); + basePilotable.drive(doubleSupplier.getAsDouble(), limelight.getYaw(), 0); } // Called once the command ends or is interrupted. diff --git a/src/main/java/frc/robot/commands/Cube.java b/src/main/java/frc/robot/commands/Cube.java index d54839e..2bd023f 100644 --- a/src/main/java/frc/robot/commands/Cube.java +++ b/src/main/java/frc/robot/commands/Cube.java @@ -32,7 +32,7 @@ public class Cube extends CommandBase { // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { - basePilotable.drive(doubleSupplier.getAsDouble(), limelight.getYaw()); + basePilotable.drive(doubleSupplier.getAsDouble(), limelight.getYaw(), 0); } // Called once the command ends or is interrupted. diff --git a/src/main/java/frc/robot/commands/Gyro.java b/src/main/java/frc/robot/commands/Gyro.java index 9665ecb..ffeca0a 100644 --- a/src/main/java/frc/robot/commands/Gyro.java +++ b/src/main/java/frc/robot/commands/Gyro.java @@ -30,20 +30,20 @@ public class Gyro extends CommandBase { public void execute() { if(basePilotable.getpitch()>4) { - basePilotable.drive(0.3*basePilotable.getpitch()/12, 0); + basePilotable.drive(0.3*basePilotable.getpitch()/12, 0, 0); } else if(basePilotable.getpitch()<-4) { - basePilotable.drive(0.3*basePilotable.getpitch()/12, 0); - basePilotable.drive(0.3*basePilotable.getpitch()/15, 0); + basePilotable.drive(0.3*basePilotable.getpitch()/12, 0, 0); + basePilotable.drive(0.3*basePilotable.getpitch()/15, 0, 0); } else if(basePilotable.getpitch()<-4) { - basePilotable.drive(0.3*basePilotable.getpitch()/15, 0); + basePilotable.drive(0.3*basePilotable.getpitch()/15, 0, 0); } else { - basePilotable.drive(0, 0); + basePilotable.drive(0, 0, 0); } } diff --git a/src/main/java/frc/robot/commands/Reculer.java b/src/main/java/frc/robot/commands/Reculer.java index 7ff9989..674ef40 100644 --- a/src/main/java/frc/robot/commands/Reculer.java +++ b/src/main/java/frc/robot/commands/Reculer.java @@ -27,7 +27,7 @@ public class Reculer extends CommandBase { // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { - basePilotable.drive(SmartDashboard.getNumber("vitesse auto", -0.3), 0); + basePilotable.drive(SmartDashboard.getNumber("vitesse auto", -0.3), 0, 0); } // Called once the command ends or is interrupted. diff --git a/src/main/java/frc/robot/commands/Tape.java b/src/main/java/frc/robot/commands/Tape.java index e1346f0..e240da4 100644 --- a/src/main/java/frc/robot/commands/Tape.java +++ b/src/main/java/frc/robot/commands/Tape.java @@ -32,7 +32,7 @@ public class Tape extends CommandBase { // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { - basePilotable.drive(doubleSupplier.getAsDouble(), limelight.getYaw()); + basePilotable.drive(doubleSupplier.getAsDouble(), limelight.getYaw(), 0); } // Called once the command ends or is interrupted.