Named Commands
This commit is contained in:
@@ -4,7 +4,12 @@
|
||||
|
||||
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.smartdashboard.SendableChooser;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.Commands;
|
||||
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||
@@ -24,8 +29,10 @@ import frc.robot.subsystems.Elevateur;
|
||||
import frc.robot.subsystems.Pince;
|
||||
|
||||
public class RobotContainer {
|
||||
|
||||
CommandXboxController manette1 = new CommandXboxController(0);
|
||||
CommandXboxController manette2 = new CommandXboxController(0);
|
||||
private final SendableChooser<Command> autoChooser;
|
||||
Pince pince = new Pince();
|
||||
Elevateur elevateur = new Elevateur();
|
||||
ElevateurManuel elevateurManuel = new ElevateurManuel(elevateur, manette2::getLeftY);
|
||||
@@ -34,6 +41,13 @@ public class RobotContainer {
|
||||
elevateur.setDefaultCommand(new RunCommand(()->{
|
||||
elevateur.vitesse(MathUtil.applyDeadband(manette2.getLeftY(), 0.2));
|
||||
}, elevateur));
|
||||
NamedCommands.registerCommand("Station",new StationPince(pince, elevateur));
|
||||
NamedCommands.registerCommand("L4", new L4(elevateur, pince));
|
||||
NamedCommands.registerCommand("L3", new L3(elevateur, pince));
|
||||
NamedCommands.registerCommand("CoralExpire",new CoralExpire(pince));
|
||||
NamedCommands.registerCommand("CoralInspire", new CoralInspire(pince));
|
||||
NamedCommands.registerCommand("CoraletAlgue", new CoralAlgueInspire(pince));
|
||||
autoChooser = AutoBuilder.buildAutoChooser();
|
||||
}
|
||||
|
||||
private void configureBindings() {
|
||||
|
Reference in New Issue
Block a user