diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 7d923ce..cc30449 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -19,7 +19,13 @@ import edu.wpi.first.wpilibj2.command.button.JoystickButton; import edu.wpi.first.wpilibj2.command.button.Trigger; import frc.robot.Constants.OperatorConstants; +import frc.robot.commands.ConveyorCommand; +import frc.robot.commands.DumpControl; +import frc.robot.commands.IntakeCommand; import frc.robot.commands.swervedrive.drivebase.AbsoluteDriveAdv; +import frc.robot.subsystems.Conveyor; +import frc.robot.subsystems.Dump; +import frc.robot.subsystems.Intake; import frc.robot.subsystems.swervedrive.SwerveSubsystem; import java.io.File; @@ -41,9 +47,18 @@ public class RobotContainer { // CommandJoystick driverController = new // CommandJoystick(3);//(OperatorConstants.DRIVER_CONTROLLER_PORT); XboxController driverXbox = new XboxController(0); + //Connect + private final Intake intake = new Intake(); + private final Dump dump = new Dump(); + private final Conveyor conveyor = new Conveyor(); /** The container for the robot. Contains subsystems, OI devices, and commands. */ public RobotContainer() { + + intake.setDefaultCommand(new IntakeCommand(intake)); + dump.setDefaultCommand(new DumpControl(dump)); + conveyor.setDefaultCommand(new ConveyorCommand(conveyor)); + // Configure the trigger bindings configureBindings(); diff --git a/src/main/java/frc/robot/commands/DumpControl.java b/src/main/java/frc/robot/commands/DumpControl.java index 2ca574f..31737e5 100644 --- a/src/main/java/frc/robot/commands/DumpControl.java +++ b/src/main/java/frc/robot/commands/DumpControl.java @@ -29,8 +29,10 @@ public void initialize() {} // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { + //TODO: Change this to the correct button if (Controller.getRawButton(1)) { DumpSubsystem.open(); + //TODO: Change this to the correct button } else if (Controller.getRawButton(2)) { DumpSubsystem.close(); }