This commit is contained in:
parent
c257411505
commit
a708aac700
@ -19,7 +19,7 @@ import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
|||||||
// Manettes
|
// Manettes
|
||||||
import edu.wpi.first.wpilibj2.command.button.CommandJoystick;
|
import edu.wpi.first.wpilibj2.command.button.CommandJoystick;
|
||||||
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
|
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
|
||||||
|
import frc.robot.command.AllumeLED;
|
||||||
// Commands
|
// Commands
|
||||||
import frc.robot.command.Balayer;
|
import frc.robot.command.Balayer;
|
||||||
import frc.robot.command.GrimpeurDroit;
|
import frc.robot.command.GrimpeurDroit;
|
||||||
@ -35,6 +35,7 @@ import frc.robot.subsystem.Balayeuse;
|
|||||||
import frc.robot.subsystem.Drive;
|
import frc.robot.subsystem.Drive;
|
||||||
import frc.robot.subsystem.Grimpeur;
|
import frc.robot.subsystem.Grimpeur;
|
||||||
import frc.robot.subsystem.Guideur;
|
import frc.robot.subsystem.Guideur;
|
||||||
|
import frc.robot.subsystem.LED;
|
||||||
import frc.robot.subsystem.Lanceur;
|
import frc.robot.subsystem.Lanceur;
|
||||||
|
|
||||||
|
|
||||||
@ -56,6 +57,8 @@ public class RobotContainer {
|
|||||||
CommandXboxController manette = new CommandXboxController(1);
|
CommandXboxController manette = new CommandXboxController(1);
|
||||||
GrimpeurDroit grimpeurDroit = new GrimpeurDroit(grimpeur, manette::getLeftX);
|
GrimpeurDroit grimpeurDroit = new GrimpeurDroit(grimpeur, manette::getLeftX);
|
||||||
GrimpeurGauche grimpeurGauche = new GrimpeurGauche(grimpeur, manette::getLeftY);
|
GrimpeurGauche grimpeurGauche = new GrimpeurGauche(grimpeur, manette::getLeftY);
|
||||||
|
LED LED = new LED();
|
||||||
|
AllumeLED allumeLED = new AllumeLED(LED, accumulateur);
|
||||||
public RobotContainer() {
|
public RobotContainer() {
|
||||||
NamedCommands.registerCommand("balayer",new Balayer(balayeuse, accumulateur));
|
NamedCommands.registerCommand("balayer",new Balayer(balayeuse, accumulateur));
|
||||||
NamedCommands.registerCommand("lancer", new LancerNote(lanceur, accumulateur));
|
NamedCommands.registerCommand("lancer", new LancerNote(lanceur, accumulateur));
|
||||||
@ -69,7 +72,10 @@ public class RobotContainer {
|
|||||||
drive.setDefaultCommand(new RunCommand(()->{
|
drive.setDefaultCommand(new RunCommand(()->{
|
||||||
drive.drive(-MathUtil.applyDeadband(joystick.getY(),0.2), MathUtil.applyDeadband(-joystick.getX(),0.2), MathUtil.applyDeadband(-joystick.getZ(), 0.2));
|
drive.drive(-MathUtil.applyDeadband(joystick.getY(),0.2), MathUtil.applyDeadband(-joystick.getX(),0.2), MathUtil.applyDeadband(-joystick.getZ(), 0.2));
|
||||||
},drive));
|
},drive));
|
||||||
|
grimpeur.setDefaultCommand(new RunCommand(()->{
|
||||||
|
grimpeur.droit(manette.getLeftX());}
|
||||||
|
,grimpeur));
|
||||||
|
LED.setDefaultCommand(allumeLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void configureBindings() {
|
private void configureBindings() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user