touche
This commit is contained in:
		| @@ -4,10 +4,16 @@ | |||||||
|  |  | ||||||
| package frc.robot; | package frc.robot; | ||||||
|  |  | ||||||
|  | import edu.wpi.first.math.MathUtil; | ||||||
| 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; | ||||||
| import edu.wpi.first.wpilibj2.command.Commands; | import edu.wpi.first.wpilibj2.command.Commands; | ||||||
|  | import edu.wpi.first.wpilibj2.command.RunCommand; | ||||||
|  | import edu.wpi.first.wpilibj2.command.button.CommandXboxController; | ||||||
|  | import frc.robot.Commands.Desaccumuler; | ||||||
|  | import frc.robot.Commands.FollowAprilTag; | ||||||
|  | import frc.robot.Commands.Lancer; | ||||||
| import frc.robot.Subsystems.Accumulateur; | import frc.robot.Subsystems.Accumulateur; | ||||||
| import frc.robot.Subsystems.Drive; | import frc.robot.Subsystems.Drive; | ||||||
| import frc.robot.Subsystems.Lanceur; | import frc.robot.Subsystems.Lanceur; | ||||||
| @@ -19,6 +25,7 @@ public class RobotContainer { | |||||||
|   Limelight3G limelight3G = new Limelight3G(); |   Limelight3G limelight3G = new Limelight3G(); | ||||||
|   Drive drive = new Drive(); |   Drive drive = new Drive(); | ||||||
|   ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard"); |   ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard"); | ||||||
|  |   CommandXboxController manette = new CommandXboxController(0); | ||||||
|   public RobotContainer() { |   public RobotContainer() { | ||||||
|     dashboard.addCamera("limelight3G", "limelight3G","limelight.local:5800") |     dashboard.addCamera("limelight3G", "limelight3G","limelight.local:5800") | ||||||
|     .withSize(3,4) |     .withSize(3,4) | ||||||
| @@ -27,9 +34,16 @@ public class RobotContainer { | |||||||
|     .withSize(3,4) |     .withSize(3,4) | ||||||
|     .withPosition(3,0);   |     .withPosition(3,0);   | ||||||
|     configureBindings(); |     configureBindings(); | ||||||
|  |     drive.setDefaultCommand(new RunCommand(()->{ | ||||||
|  |      drive.drive(-MathUtil.applyDeadband(manette.getRightX(),0.2), MathUtil.applyDeadband(-manette.getRightY(),0.2), MathUtil.applyDeadband(-manette.getRightX(), 0.2)); | ||||||
|  |     },drive)); | ||||||
|  |   } | ||||||
|  |    | ||||||
|  |   private void configureBindings() { | ||||||
|  |     Lancer lancer= new Lancer(lanceur); | ||||||
|  |     Desaccumuler desaccumuler = new Desaccumuler(accumulateur); | ||||||
|  |     FollowAprilTag aprilTag = new FollowAprilTag(limelight3G, lanceur); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   private void configureBindings() {} |  | ||||||
|  |  | ||||||
|   public Command getAutonomousCommand() { |   public Command getAutonomousCommand() { | ||||||
|     return Commands.print("No autonomous command configured"); |     return Commands.print("No autonomous command configured"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user