Merge branch 'main' of https://git.demerso.net/pls5618/2024/robot
This commit is contained in:
		| @@ -48,5 +48,5 @@ public class Constants { | |||||||
|     public static int photocellacc = 2; |     public static int photocellacc = 2; | ||||||
|  |  | ||||||
|     //piston |     //piston | ||||||
|     public static int pistondroiteouvre= 7; |     public static int pistondroite= 7; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -75,7 +75,7 @@ public class RobotContainer { | |||||||
|     .withPosition(7,0);  |     .withPosition(7,0);  | ||||||
|  |  | ||||||
|     dashboard.addCamera("USB Camera 0", "USB Camera 0","http://roborio-5618-frc.local:1181/?action=stream") |     dashboard.addCamera("USB Camera 0", "USB Camera 0","http://roborio-5618-frc.local:1181/?action=stream") | ||||||
|     .withSize(4, 4) |     .withSize(4, 3) | ||||||
|     .withPosition(3, 0); |     .withPosition(3, 0); | ||||||
|  |  | ||||||
|     CameraServer.startAutomaticCapture(); |     CameraServer.startAutomaticCapture(); | ||||||
| @@ -95,6 +95,7 @@ public class RobotContainer { | |||||||
|     joystick.button(4).whileTrue(new ParallelCommandGroup(new Lancer(lanceur,limelight),new Limelight_tracker(limelight,drive))); |     joystick.button(4).whileTrue(new ParallelCommandGroup(new Lancer(lanceur,limelight),new Limelight_tracker(limelight,drive))); | ||||||
|     joystick.button(2).whileTrue(new ParallelCommandGroup(new Lancerampli(lanceur,limelight),new Limelight_tracker(limelight,drive))); |     joystick.button(2).whileTrue(new ParallelCommandGroup(new Lancerampli(lanceur,limelight),new Limelight_tracker(limelight,drive))); | ||||||
|     joystick.button(6).whileTrue(new LancerTrape(lanceur, accumulateur)); |     joystick.button(6).whileTrue(new LancerTrape(lanceur, accumulateur)); | ||||||
|  |     joystick.button(7).whileTrue(new Limelight_tracker(limelight, drive)); | ||||||
|     // deplacement |     // deplacement | ||||||
|     configureBindings(); |     configureBindings(); | ||||||
|       drive.setDefaultCommand(new RunCommand(()->{ |       drive.setDefaultCommand(new RunCommand(()->{ | ||||||
| @@ -108,8 +109,8 @@ public class RobotContainer { | |||||||
|     ,grimpeur)); |     ,grimpeur)); | ||||||
|        |        | ||||||
|       dashboard.add("autochooser",autoChooser) |       dashboard.add("autochooser",autoChooser) | ||||||
|       .withSize(2,1) |       .withSize(1,1) | ||||||
|       .withPosition(1,1); |       .withPosition(2,2); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   private void configureBindings() {} |   private void configureBindings() {} | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ public class Accumulateur extends SubsystemBase { | |||||||
|    private GenericEntry vitesse = |    private GenericEntry vitesse = | ||||||
|       dashboard.add("vitesseacc", 0.5) |       dashboard.add("vitesseacc", 0.5) | ||||||
|       .withSize(1, 1) |       .withSize(1, 1) | ||||||
|       .withPosition(2, 2) |       .withPosition(0, 0) | ||||||
|       .getEntry();  |       .getEntry();  | ||||||
|   final WPI_TalonSRX Moteuracc2 = new WPI_TalonSRX(Constants.Moteuracc2); |   final WPI_TalonSRX Moteuracc2 = new WPI_TalonSRX(Constants.Moteuracc2); | ||||||
|   final WPI_TalonSRX Moteuracc = new WPI_TalonSRX(Constants.Moteuracc); |   final WPI_TalonSRX Moteuracc = new WPI_TalonSRX(Constants.Moteuracc); | ||||||
| @@ -34,7 +34,7 @@ public class Accumulateur extends SubsystemBase { | |||||||
|      |      | ||||||
|     dashboard.addBoolean("limitacc", this::limitswitch) |     dashboard.addBoolean("limitacc", this::limitswitch) | ||||||
|     .withSize(1, 1) |     .withSize(1, 1) | ||||||
|     .withPosition(2, 0); |     .withPosition(0, 1); | ||||||
|   } |   } | ||||||
|   public void Accumuler(double vitesse){ |   public void Accumuler(double vitesse){ | ||||||
|     Moteuracc.set(-vitesse); |     Moteuracc.set(-vitesse); | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ public class Grimpeur extends SubsystemBase { | |||||||
|   final CANSparkMax grimpeurd = new CANSparkMax(Constants.grimpeurd,MotorType.kBrushless); |   final CANSparkMax grimpeurd = new CANSparkMax(Constants.grimpeurd,MotorType.kBrushless); | ||||||
|   final CANSparkMax grimpeurg = new CANSparkMax(Constants.grimpeurg,MotorType.kBrushless);  |   final CANSparkMax grimpeurg = new CANSparkMax(Constants.grimpeurg,MotorType.kBrushless);  | ||||||
|   // limit switch |   // limit switch | ||||||
|   final Solenoid pistondroite= new Solenoid(PneumaticsModuleType.REVPH, Constants.pistondroiteouvre); |   final Solenoid pistondroite= new Solenoid(PneumaticsModuleType.REVPH, Constants.pistondroite); | ||||||
|   //fonction |   //fonction | ||||||
|   public Grimpeur() { |   public Grimpeur() { | ||||||
|     pistonouvre(); |     pistonouvre(); | ||||||
|   | |||||||
| @@ -23,10 +23,10 @@ public class Guideur extends SubsystemBase { | |||||||
|       public Guideur() { |       public Guideur() { | ||||||
|         dashboard.addBoolean("limitguideurhaut", guideurhaut::get) |         dashboard.addBoolean("limitguideurhaut", guideurhaut::get) | ||||||
|         .withSize(1,1) |         .withSize(1,1) | ||||||
|         .withPosition(0,0); |         .withPosition(1,1); | ||||||
|         dashboard.addBoolean("limitguideurbas", guideurbas::get) |         dashboard.addBoolean("limitguideurbas", guideurbas::get) | ||||||
|         .withSize(1,1) |         .withSize(1,1) | ||||||
|         .withPosition(1,0);         |         .withPosition(2,1);         | ||||||
|       } |       } | ||||||
|       public void guider(double vitesse){ |       public void guider(double vitesse){ | ||||||
|         guideur.set(vitesse); |         guideur.set(vitesse); | ||||||
|   | |||||||
| @@ -12,7 +12,6 @@ import edu.wpi.first.units.Measure; | |||||||
| import edu.wpi.first.units.MutableMeasure; | import edu.wpi.first.units.MutableMeasure; | ||||||
| import edu.wpi.first.units.Velocity; | import edu.wpi.first.units.Velocity; | ||||||
| import edu.wpi.first.units.Voltage; | import edu.wpi.first.units.Voltage; | ||||||
| import edu.wpi.first.wpilibj.RobotController; |  | ||||||
| import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; | import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; | ||||||
| import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; | import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; | ||||||
| import edu.wpi.first.wpilibj2.command.Command; | import edu.wpi.first.wpilibj2.command.Command; | ||||||
| @@ -29,12 +28,12 @@ public class Lanceur extends SubsystemBase { | |||||||
|    private GenericEntry vitesse = |    private GenericEntry vitesse = | ||||||
|       dashboard.add("vitesse", 0.8) |       dashboard.add("vitesse", 0.8) | ||||||
|       .withSize(1, 1) |       .withSize(1, 1) | ||||||
|       .withPosition(2,1) |       .withPosition(2,0) | ||||||
|          .getEntry();          |          .getEntry();          | ||||||
|           private GenericEntry vitesseamp = |           private GenericEntry vitesseamp = | ||||||
|             dashboard.add("vitesseamp", 0.1) |             dashboard.add("vitesseamp", 0.1) | ||||||
|             .withSize(1, 1) |             .withSize(1, 1) | ||||||
|             .withPosition(2,3) |             .withPosition(1,0) | ||||||
|               .getEntry(); |               .getEntry(); | ||||||
|   public Lanceur() { |   public Lanceur() { | ||||||
|      |      | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user