diff --git a/bin/main/frc/robot/subsystems/BasePilotable.class b/bin/main/frc/robot/subsystems/BasePilotable.class index 87950cb..9d83fb8 100644 Binary files a/bin/main/frc/robot/subsystems/BasePilotable.class and b/bin/main/frc/robot/subsystems/BasePilotable.class differ diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 0dadcab..6d6e398 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -10,7 +10,11 @@ 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 4157ed0..b9a7dd2 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -69,7 +69,6 @@ public RobotContainer() { 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.b().toggleOnTrue(Commands.startEnd(gratte::baiser, gratte::Lever,gratte)); 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)); @@ -79,7 +78,12 @@ 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/GratteBaisser.java b/src/main/java/frc/robot/commands/GratteBaisser.java index de68b8f..8984475 100644 --- a/src/main/java/frc/robot/commands/GratteBaisser.java +++ b/src/main/java/frc/robot/commands/GratteBaisser.java @@ -41,7 +41,9 @@ 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/subsystems/BasePilotable.java b/src/main/java/frc/robot/subsystems/BasePilotable.java index ac6eaca..4cbec8e 100644 --- a/src/main/java/frc/robot/subsystems/BasePilotable.java +++ b/src/main/java/frc/robot/subsystems/BasePilotable.java @@ -66,9 +66,8 @@ public void BrakeFerme(){ brakegauche.set(Value.kReverse); } public void resetGyro(){ - try {gyroscope.reset();} catch(Exception e){DriverStation.reportError("bye bye",true); + {gyroscope.reset();} } - } /** Creates a new BasePilotable. */ public BasePilotable() { droit.setInverted(true); diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java index 2fc91db..7176d4f 100644 --- a/src/main/java/frc/robot/subsystems/Gratte.java +++ b/src/main/java/frc/robot/subsystems/Gratte.java @@ -14,7 +14,11 @@ 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); @@ -24,6 +28,7 @@ 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 hautd(){ return limithd.get(); @@ -33,7 +38,7 @@ ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") return limithg.get(); } - public boolean basd(){ + public boolean basd(int i, String string){ return limitbd.get(); } public boolean basg(){ @@ -60,4 +65,8 @@ ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb") limitswitchgratte.add ("limithd", 0.1); limitswitchgratte.add ("limitbg", 0.1); } + +public boolean basd() { + return false; +} } diff --git a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java index ffe1dd0..cb92af3 100644 --- a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java +++ b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java @@ -24,9 +24,16 @@ 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 a252b7b..e82eecc 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -14,7 +14,11 @@ 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); @@ -39,7 +43,14 @@ ShuffleboardTab teb = Shuffleboard.getTab("teb"); teb .add("encodeur", 0.1); teb .add ("encodeur pivot",0.1); } +<<<<<<< HEAD } +======= + { + teb.add ("encodeur pivot",0.1); + } +} +>>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0