From 08f19272253f34e5a6e4096d64aae623cf86d37d Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Tue, 23 Jan 2024 18:41:48 -0500 Subject: [PATCH] debut robot container --- src/main/java/frc/robot/RobotContainer.java | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index de2c9d0..b22c47b 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -4,12 +4,45 @@ package frc.robot; +import edu.wpi.first.cameraserver.CameraServer; +import edu.wpi.first.math.MathUtil; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; +import edu.wpi.first.wpilibj2.command.RunCommand; + +// Manette +import edu.wpi.first.wpilibj2.command.button.CommandJoystick; +import edu.wpi.first.wpilibj2.command.button.CommandXboxController; + +// Subsystem +import frc.robot.subsystem.Accumulateur; +import frc.robot.subsystem.Balayeuse; +import frc.robot.subsystem.Drive; +import frc.robot.subsystem.Grimpeur; +import frc.robot.subsystem.Guideur; +import frc.robot.subsystem.Lanceur; + public class RobotContainer { + + Drive drive = new Drive(); + Accumulateur accumulateur = new Accumulateur(); + Balayeuse balayeuse = new Balayeuse(); + Grimpeur grimpeur = new Grimpeur(); + Guideur guideur = new Guideur(); + Lanceur lanceur = new Lanceur(); + + CommandJoystick joystick = new CommandJoystick(0); + CommandXboxController manette = new CommandXboxController(1); + public RobotContainer() { + + CameraServer.startAutomaticCapture(); + configureBindings(); + 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)); } private void configureBindings() {}