E
This commit is contained in:
		| @@ -4,8 +4,8 @@ | ||||
|  | ||||
| package frc.robot; | ||||
|  | ||||
| //import com.pathplanner.lib.auto.AutoBuilder; | ||||
| //import com.pathplanner.lib.auto.NamedCommands; | ||||
| import com.pathplanner.lib.auto.AutoBuilder; | ||||
| import com.pathplanner.lib.auto.NamedCommands; | ||||
|  | ||||
| import edu.wpi.first.math.MathUtil; | ||||
| import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; | ||||
| @@ -18,21 +18,21 @@ import frc.robot.Commands.Desaccumuler; | ||||
| import frc.robot.Commands.FollowAprilTag; | ||||
| import frc.robot.Commands.Lancer; | ||||
| import frc.robot.Subsystems.Accumulateur; | ||||
| import frc.robot.Subsystems.Drive; | ||||
| //import frc.robot.Subsystems.Drive; | ||||
| import frc.robot.Subsystems.Lanceur; | ||||
| import frc.robot.Subsystems.Limelight3G; | ||||
|  | ||||
| public class RobotContainer { | ||||
| //  private final SendableChooser<Command> autoChooser; | ||||
|   private final SendableChooser<Command> autoChooser; | ||||
|   Lanceur lanceur= new Lanceur(); | ||||
|   Accumulateur accumulateur = new Accumulateur(); | ||||
|   Limelight3G limelight3G = new Limelight3G(); | ||||
|   Drive drive = new Drive(); | ||||
|   //Drive drive = new Drive(); | ||||
|   ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard"); | ||||
|   CommandXboxController manette = new CommandXboxController(0); | ||||
|   public RobotContainer() { | ||||
|   // NamedCommands.registerCommand("lancer", new Lancer(lanceur, accumulateur)); | ||||
|    // autoChooser = AutoBuilder.buildAutoChooser(); | ||||
|    NamedCommands.registerCommand("lancer", new Lancer(lanceur, accumulateur)); | ||||
|    autoChooser = AutoBuilder.buildAutoChooser(); | ||||
|     dashboard.addCamera("limelight3G", "limelight3G","limelight.local:5800") | ||||
|     .withSize(3,4) | ||||
|     .withPosition(5,0); | ||||
| @@ -40,12 +40,12 @@ public class RobotContainer { | ||||
|     .withSize(3,4) | ||||
|     .withPosition(2,0);   | ||||
|     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)); | ||||
|    // dashboard.add("autochooser",autoChooser) | ||||
|    //   .withSize(1,1) | ||||
|     //  .withPosition(8,0); | ||||
|     //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)); | ||||
|    dashboard.add("autochooser",autoChooser) | ||||
|      .withSize(1,1) | ||||
|      .withPosition(8,0); | ||||
|   } | ||||
|    | ||||
|   private void configureBindings() { | ||||
| @@ -56,6 +56,6 @@ public class RobotContainer { | ||||
|   } | ||||
|  | ||||
|   public Command getAutonomousCommand() { | ||||
|     return null; | ||||
|     return autoChooser.getSelected(); | ||||
|   } | ||||
| } | ||||
| @@ -2,7 +2,7 @@ | ||||
| // Open Source Software; you can modify and/or share it under the terms of | ||||
| // the WPILib BSD license file in the root directory of this project. | ||||
|  | ||||
| package frc.robot.Subsystems; | ||||
| /*package frc.robot.Subsystems; | ||||
| import java.io.File; | ||||
| import java.io.IOException; | ||||
| import com.ctre.phoenix6.hardware.Pigeon2; | ||||
| @@ -45,4 +45,4 @@ public class Drive extends SubsystemBase { | ||||
|   public void periodic() { | ||||
|     // This method will be called once per scheduler run | ||||
|   } | ||||
| } | ||||
| }*/ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user