From e7f5b8144523fdd6e22e1077c36fe375d301090a Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Tue, 7 Mar 2023 19:17:53 -0500 Subject: [PATCH] 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