From 8a9a331e66b4837c36657a0b62a1d84471387d16 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Wed, 8 Mar 2023 19:42:24 -0500 Subject: [PATCH 1/5] tehgfhcg --- src/main/java/frc/robot/Constants.java | 3 -- src/main/java/frc/robot/RobotContainer.java | 44 +++++++++++++++---- src/main/java/frc/robot/commands/Gyro.java | 4 +- .../java/frc/robot/subsystems/Gratte.java | 4 -- .../subsystems/bras/BrasTelescopique.java | 6 --- .../java/frc/robot/subsystems/bras/Pivot.java | 9 +--- 6 files changed, 39 insertions(+), 31 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 6d6e398..e46be4b 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -10,11 +10,8 @@ public class Constants { //moteur public static int leverGratte = 0; -<<<<<<< HEAD public static int baiserGratte = 1; -======= public static int baisserGratte = 1; ->>>>>>> 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 c239352..de3edd1 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -3,7 +3,13 @@ // the WPILib BSD license file in the root directory of this project. package frc.robot; +import java.util.Map; + import edu.wpi.first.cameraserver.CameraServer; +import edu.wpi.first.networktables.GenericEntry; +import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; +import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; @@ -34,7 +40,7 @@ import frc.robot.commands.bras.PivoteBrasMilieux; public class RobotContainer { - CameraServer.startAutomaticCapture(); + CommandXboxController manette1 = new CommandXboxController(0); CommandXboxController manette2 = new CommandXboxController(1); // subsystems @@ -57,7 +63,24 @@ 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()); +Reculer reculer = new Reculer(basePilotable); + +SendableChooser chooser = new SendableChooser<>(); +String enhaut = "en bas"; +String aumilieux = "au milieux"; +String enbas = "en bas"; +String nulpart = "nul part"; +ShuffleboardLayout layoutauto = Shuffleboard.getTab("teb").getLayout("auto"); +GenericEntry autobalance = layoutauto.add("choix balance",true).getEntry(); +GenericEntry autosortir = layoutauto.add("choix sorit",false).getEntry(); public RobotContainer() { + chooser.setDefaultOption(enhaut, enhaut); + chooser.addOption(enbas, enbas); + chooser.addOption(aumilieux, aumilieux); + chooser.addOption(nulpart, nulpart); + layoutauto.add("choix hauteur",chooser); + + configureBindings(); basePilotable.setDefaultCommand(new RunCommand(() -> { @@ -79,20 +102,25 @@ 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() { + chooser.getSelected(); + autobalance.getBoolean(true); return new SequentialCommandGroup( - new PivoteBrasMilieux(brasTelescopique, pivot), - new OuvrePince(pince), - new PivotBrasRentre(brasTelescopique, pivot).alongWith(new Reculer(basePilotable)), - new Gyro(basePilotable) + Commands.either(gyro, Commands.none(),()-> autobalance.getBoolean(true)), + Commands.either(reculer, Commands.none(),()-> autosortir.getBoolean(true)), + Commands.select(Map.ofEntries( + Map.entry(enhaut,pivoteBrasHaut), + Map.entry(aumilieux,null), + Map.entry(enbas,null), + Map.entry(nulpart,null) + ), chooser::getSelected) ); + + } } diff --git a/src/main/java/frc/robot/commands/Gyro.java b/src/main/java/frc/robot/commands/Gyro.java index 88aec83..06271ec 100644 --- a/src/main/java/frc/robot/commands/Gyro.java +++ b/src/main/java/frc/robot/commands/Gyro.java @@ -23,11 +23,11 @@ public class Gyro extends CommandBase { // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { - if(basePilotable.getpitch()>4) + if(basePilotable.getpitch()>10) { basePilotable.drive(0.3*basePilotable.getpitch()/15, 0); } - else if(basePilotable.getpitch()<-4) + else if(basePilotable.getpitch()<-10) { basePilotable.drive(0.3*basePilotable.getpitch()/15, 0); } diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java index 7176d4f..4fefe9f 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); diff --git a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java index cb92af3..8ddbd77 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/Pivot.java b/src/main/java/frc/robot/subsystems/bras/Pivot.java index e82eecc..acab25c 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -14,11 +14,7 @@ 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 // moteur private CANSparkMax pivot = new CANSparkMax(Constants.pivot,MotorType.kBrushless); private DigitalInput limitpivot = new DigitalInput(Constants.limitpivot); @@ -43,14 +39,11 @@ ShuffleboardTab teb = Shuffleboard.getTab("teb"); teb .add("encodeur", 0.1); teb .add ("encodeur pivot",0.1); } -<<<<<<< HEAD -} + -======= { teb.add ("encodeur pivot",0.1); } } ->>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0 From 38a6afbe39c3a3061b0b7b4a6cba170c4275a286 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Wed, 8 Mar 2023 19:48:02 -0500 Subject: [PATCH 2/5] 46euytfh --- src/main/java/frc/robot/Constants.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 8fc2828..b2ce20d 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -5,13 +5,12 @@ public class Constants { public static int avantgauche = 4; public static int arrieredroit = 3; public static int arrieregauche = 5; - public static int BrasTelescopique = 4; + public static int BrasTelescopique = 2; public static int pivot = 0; //moteur public static int leverGratte = 0; public static int baiserGratte = 1; - public static int baisserGratte = 1; // pneumatique public static int pistonpinceouvre = 0; From 46c3dcbad5a99b40cca2f28303590fe09d859f91 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Wed, 8 Mar 2023 19:50:19 -0500 Subject: [PATCH 3/5] dxgfhcn --- src/main/java/frc/robot/RobotContainer.java | 57 ++----------------- .../frc/robot/subsystems/BasePilotable.java | 2 + .../java/frc/robot/subsystems/Gratte.java | 4 -- .../subsystems/bras/BrasTelescopique.java | 6 +- .../java/frc/robot/subsystems/bras/Pivot.java | 9 +-- 5 files changed, 11 insertions(+), 67 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 43c48c1..de3edd1 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -12,6 +12,7 @@ import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; 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.button.CommandXboxController; @@ -22,7 +23,6 @@ import frc.robot.subsystems.bras.BrasTelescopique; import frc.robot.subsystems.bras.Pince; import frc.robot.subsystems.bras.Pivot; import frc.robot.subsystems.Limelight; -import frc.robot.commands.Apriltag; // command import frc.robot.commands.BrakeFerme; import frc.robot.commands.BrakeOuvre; @@ -30,25 +30,17 @@ 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; import frc.robot.commands.bras.PivoteBrasBas; import frc.robot.commands.bras.PivoteBrasHaut; import frc.robot.commands.bras.PivoteBrasMilieux; -//subsystems -import frc.robot.commands.bras.PivotChercheBas; -import frc.robot.commands.bras.PivotChercheHaut; -import frc.robot.commands.Cube; -import frc.robot.commands.Tape; public class RobotContainer { -<<<<<<< HEAD -======= -//CameraServer.startAutomaticCapture(); ->>>>>>> fc4607f3c6d7203a155182eded4626d37f75de5e CommandXboxController manette1 = new CommandXboxController(0); CommandXboxController manette2 = new CommandXboxController(1); // subsystems @@ -57,7 +49,7 @@ 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); @@ -81,12 +73,6 @@ String nulpart = "nul part"; ShuffleboardLayout layoutauto = Shuffleboard.getTab("teb").getLayout("auto"); GenericEntry autobalance = layoutauto.add("choix balance",true).getEntry(); GenericEntry autosortir = layoutauto.add("choix sorit",false).getEntry(); -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() { chooser.setDefaultOption(enhaut, enhaut); chooser.addOption(enbas, enbas); @@ -96,25 +82,16 @@ public RobotContainer() { configureBindings(); - CameraServer.startAutomaticCapture(); + basePilotable.setDefaultCommand(new RunCommand(() -> { - basePilotable.drive(-manette1.getLeftY(), manette1.getLeftX(), 0); + basePilotable.drive(-manette1.getLeftY(), manette1.getLeftX()); },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); - manette1.povLeft().onTrue(pivoteBrasMilieux); - manette1.povRight().onTrue(pivotBrasRentre); manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable)); -<<<<<<< HEAD manette1.y().whileTrue(gyro); manette1.start().toggleOnTrue(Commands.startEnd(basePilotable::resetGyro, basePilotable::resetGyro, basePilotable)); /*manette1.b().toggleOnTrue(Commands.startEnd(gratte::baiser, gratte::Lever,gratte)); @@ -145,27 +122,5 @@ public RobotContainer() { ); -======= - manette1.b().onTrue(Commands.either(gratteBaisser, gratteMonte, gratte::getenHaut)); - manette1.leftBumper().toggleOnTrue(cube); - manette1.rightBumper().toggleOnTrue(cone); - // manette 2 - manette2.y().whileTrue(gyro); - manette2.start().toggleOnTrue(Commands.startEnd(basePilotable::resetGyro, basePilotable::resetGyro, basePilotable)); - manette2.povRight().onTrue(pivotChercheBas); - manette2.povLeft().onTrue(pivotChercheHaut); - manette2.rightBumper().toggleOnTrue(aprilTag); - manette2.leftBumper().toggleOnTrue(tape); - } - - public Command getAutonomousCommand() { - return null; - //return new SequentialCommandGroup( - //new PivoteBrasMilieux(brasTelescopique, pivot), - //new OuvrePince(pince), - //new PivotBrasRentre(brasTelescopique, pivot).alongWith(new Reculer(basePilotable)), - //new Gyro(basePilotable) - //); ->>>>>>> fc4607f3c6d7203a155182eded4626d37f75de5e } } diff --git a/src/main/java/frc/robot/subsystems/BasePilotable.java b/src/main/java/frc/robot/subsystems/BasePilotable.java index cc90ca1..46ce7c2 100644 --- a/src/main/java/frc/robot/subsystems/BasePilotable.java +++ b/src/main/java/frc/robot/subsystems/BasePilotable.java @@ -80,4 +80,6 @@ public void BrakeFerme(){ public void periodic() { } +public void drive(double d, double leftX) { +} } diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java index acf7ede..a90d859 100644 --- a/src/main/java/frc/robot/subsystems/Gratte.java +++ b/src/main/java/frc/robot/subsystems/Gratte.java @@ -13,11 +13,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"); ->>>>>>> fc4607f3c6d7203a155182eded4626d37f75de5e ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") .getLayout("limitswitchsgratte", BuiltInLayouts.kList) .withSize(2, 2); diff --git a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java index 1ffdf3d..0e627cb 100644 --- a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java +++ b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java @@ -12,14 +12,14 @@ import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj.DoubleSolenoid; import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj.DoubleSolenoid.Value; +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 BrasTelescopique extends SubsystemBase { -<<<<<<< HEAD - ShuffleboardTab teb = Shuffleboard.getTab("teb"); ShuffleboardLayout layout = Shuffleboard.getTab("teb") .getLayout("layout", BuiltInLayouts.kList) .withSize(2, 2); @@ -27,9 +27,7 @@ public class BrasTelescopique extends SubsystemBase { ShuffleboardLayout bras = Shuffleboard.getTab("teb") .getLayout("bras", BuiltInLayouts.kList) .withSize(2, 2); -======= ShuffleboardTab teb = Shuffleboard.getTab("teb"); ->>>>>>> fc4607f3c6d7203a155182eded4626d37f75de5e /** Creates a new BrasTelescopique. */ public BrasTelescopique() { teb .add("photocell",0.1); diff --git a/src/main/java/frc/robot/subsystems/bras/Pivot.java b/src/main/java/frc/robot/subsystems/bras/Pivot.java index 0db4639..2cd74d2 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -14,12 +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"); ->>>>>>> fc4607f3c6d7203a155182eded4626d37f75de5e // moteur private CANSparkMax pivot = new CANSparkMax(Constants.pivot,MotorType.kBrushless); private DigitalInput limitpivot = new DigitalInput(Constants.limitpivot); @@ -46,7 +42,6 @@ public class Pivot extends SubsystemBase { @Override public void periodic() { } -<<<<<<< HEAD @@ -55,7 +50,5 @@ public class Pivot extends SubsystemBase { teb.add ("encodeur pivot",0.1); } } -======= -} ->>>>>>> fc4607f3c6d7203a155182eded4626d37f75de5e + From 50cf278f0002d65bcf4ff75582af86d0c1365851 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Wed, 8 Mar 2023 19:50:49 -0500 Subject: [PATCH 4/5] fnc n --- src/main/java/frc/robot/subsystems/Gratte.java | 5 +---- .../frc/robot/subsystems/bras/BrasTelescopique.java | 6 ++---- src/main/java/frc/robot/subsystems/bras/Pivot.java | 10 ++-------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java index acf7ede..8b0a9a2 100644 --- a/src/main/java/frc/robot/subsystems/Gratte.java +++ b/src/main/java/frc/robot/subsystems/Gratte.java @@ -13,11 +13,8 @@ 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"); ->>>>>>> fc4607f3c6d7203a155182eded4626d37f75de5e ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") .getLayout("limitswitchsgratte", BuiltInLayouts.kList) .withSize(2, 2); diff --git a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java index 1ffdf3d..0e627cb 100644 --- a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java +++ b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java @@ -12,14 +12,14 @@ import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj.DoubleSolenoid; import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj.DoubleSolenoid.Value; +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 BrasTelescopique extends SubsystemBase { -<<<<<<< HEAD - ShuffleboardTab teb = Shuffleboard.getTab("teb"); ShuffleboardLayout layout = Shuffleboard.getTab("teb") .getLayout("layout", BuiltInLayouts.kList) .withSize(2, 2); @@ -27,9 +27,7 @@ public class BrasTelescopique extends SubsystemBase { ShuffleboardLayout bras = Shuffleboard.getTab("teb") .getLayout("bras", BuiltInLayouts.kList) .withSize(2, 2); -======= ShuffleboardTab teb = Shuffleboard.getTab("teb"); ->>>>>>> fc4607f3c6d7203a155182eded4626d37f75de5e /** Creates a new BrasTelescopique. */ public BrasTelescopique() { teb .add("photocell",0.1); diff --git a/src/main/java/frc/robot/subsystems/bras/Pivot.java b/src/main/java/frc/robot/subsystems/bras/Pivot.java index 0db4639..082ce2b 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -14,12 +14,9 @@ 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"); ->>>>>>> fc4607f3c6d7203a155182eded4626d37f75de5e // moteur private CANSparkMax pivot = new CANSparkMax(Constants.pivot,MotorType.kBrushless); private DigitalInput limitpivot = new DigitalInput(Constants.limitpivot); @@ -46,7 +43,6 @@ public class Pivot extends SubsystemBase { @Override public void periodic() { } -<<<<<<< HEAD @@ -55,7 +51,5 @@ public class Pivot extends SubsystemBase { teb.add ("encodeur pivot",0.1); } } -======= -} ->>>>>>> fc4607f3c6d7203a155182eded4626d37f75de5e + From 23806ebfa2db43d63673f9b4cfc37aa3b9b23491 Mon Sep 17 00:00:00 2001 From: EdwardFaucher Date: Wed, 8 Mar 2023 19:55:28 -0500 Subject: [PATCH 5/5] gb --- src/main/java/frc/robot/RobotContainer.java | 11 +---------- src/main/java/frc/robot/subsystems/Gratte.java | 3 --- src/main/java/frc/robot/subsystems/bras/Pivot.java | 3 --- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index de3edd1..96cd9b4 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -94,16 +94,7 @@ public RobotContainer() { 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)); - 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.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null)); + } diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java index 877a104..8b0a9a2 100644 --- a/src/main/java/frc/robot/subsystems/Gratte.java +++ b/src/main/java/frc/robot/subsystems/Gratte.java @@ -13,10 +13,7 @@ import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import frc.robot.Constants; public class Gratte extends SubsystemBase { -<<<<<<< HEAD -======= ->>>>>>> aabe9b40ae896a36acdc9cd17a508016a3660a0a ShuffleboardTab teb = Shuffleboard.getTab("teb"); ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") .getLayout("limitswitchsgratte", BuiltInLayouts.kList) diff --git a/src/main/java/frc/robot/subsystems/bras/Pivot.java b/src/main/java/frc/robot/subsystems/bras/Pivot.java index 0fe6788..082ce2b 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -14,10 +14,7 @@ import com.revrobotics.CANSparkMax; import com.revrobotics.CANSparkMaxLowLevel.MotorType; public class Pivot extends SubsystemBase { -<<<<<<< HEAD -======= ->>>>>>> aabe9b40ae896a36acdc9cd17a508016a3660a0a ShuffleboardTab teb = Shuffleboard.getTab("teb"); // moteur