Skip to content

Commit

Permalink
Connected Them
Browse files Browse the repository at this point in the history
  • Loading branch information
Kendialouge committed Feb 1, 2024
1 parent b12e2e1 commit 6248438
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/frc/robot/commands/DumpControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 6248438

Please sign in to comment.