E
This commit is contained in:
parent
be5abb84bd
commit
1cd730c588
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
package frc.robot;
|
package frc.robot;
|
||||||
|
|
||||||
//import com.pathplanner.lib.auto.AutoBuilder;
|
import com.pathplanner.lib.auto.AutoBuilder;
|
||||||
//import com.pathplanner.lib.auto.NamedCommands;
|
import com.pathplanner.lib.auto.NamedCommands;
|
||||||
|
|
||||||
import edu.wpi.first.math.MathUtil;
|
import edu.wpi.first.math.MathUtil;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
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.FollowAprilTag;
|
||||||
import frc.robot.Commands.Lancer;
|
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;
|
||||||
import frc.robot.Subsystems.Limelight3G;
|
import frc.robot.Subsystems.Limelight3G;
|
||||||
|
|
||||||
public class RobotContainer {
|
public class RobotContainer {
|
||||||
// private final SendableChooser<Command> autoChooser;
|
private final SendableChooser<Command> autoChooser;
|
||||||
Lanceur lanceur= new Lanceur();
|
Lanceur lanceur= new Lanceur();
|
||||||
Accumulateur accumulateur = new Accumulateur();
|
Accumulateur accumulateur = new Accumulateur();
|
||||||
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);
|
CommandXboxController manette = new CommandXboxController(0);
|
||||||
public RobotContainer() {
|
public RobotContainer() {
|
||||||
// NamedCommands.registerCommand("lancer", new Lancer(lanceur, accumulateur));
|
NamedCommands.registerCommand("lancer", new Lancer(lanceur, accumulateur));
|
||||||
// autoChooser = AutoBuilder.buildAutoChooser();
|
autoChooser = AutoBuilder.buildAutoChooser();
|
||||||
dashboard.addCamera("limelight3G", "limelight3G","limelight.local:5800")
|
dashboard.addCamera("limelight3G", "limelight3G","limelight.local:5800")
|
||||||
.withSize(3,4)
|
.withSize(3,4)
|
||||||
.withPosition(5,0);
|
.withPosition(5,0);
|
||||||
@ -40,12 +40,12 @@ public class RobotContainer {
|
|||||||
.withSize(3,4)
|
.withSize(3,4)
|
||||||
.withPosition(2,0);
|
.withPosition(2,0);
|
||||||
configureBindings();
|
configureBindings();
|
||||||
drive.setDefaultCommand(new RunCommand(()->{
|
//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.drive(-MathUtil.applyDeadband(manette.getRightX(),0.2), MathUtil.applyDeadband(-manette.getRightY(),0.2), MathUtil.applyDeadband(-manette.getRightX(), 0.2));
|
||||||
},drive));
|
//},drive));
|
||||||
// dashboard.add("autochooser",autoChooser)
|
dashboard.add("autochooser",autoChooser)
|
||||||
// .withSize(1,1)
|
.withSize(1,1)
|
||||||
// .withPosition(8,0);
|
.withPosition(8,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void configureBindings() {
|
private void configureBindings() {
|
||||||
@ -56,6 +56,6 @@ public class RobotContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Command getAutonomousCommand() {
|
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
|
// 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.
|
// 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.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import com.ctre.phoenix6.hardware.Pigeon2;
|
import com.ctre.phoenix6.hardware.Pigeon2;
|
||||||
@ -45,4 +45,4 @@ public class Drive extends SubsystemBase {
|
|||||||
public void periodic() {
|
public void periodic() {
|
||||||
// This method will be called once per scheduler run
|
// This method will be called once per scheduler run
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user