Skip to content
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.Filesystem;
import edu.wpi.first.wpilibj.DriverStation.Alliance;

/**
* The Constants class provides a convenient place for teams to hold robot-wide
* numerical or boolean
Expand Down Expand Up @@ -92,6 +91,7 @@ public static final class DriveConstants {
public static final double GLOBAL_kA = 0.135; // V/(m/ss)



// TODO: UPDATE BASED ON REAL ROBOT. DONE: FALSE
public static final double TRACK_WIDTH = Units.inchesToMeters(19.675);
public static final double WHEEL_BASE = Units.inchesToMeters(19.675);
Expand Down
36 changes: 33 additions & 3 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,22 @@
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup;
import edu.wpi.first.wpilibj2.command.Subsystem;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.button.Trigger;

import frc.robot.Constants.ControllerConstants;
import frc.robot.commands.DriveCommand;
import frc.robot.commands.IntakeCommand;
import frc.robot.subsystems.SwerveSubsystem;
import frc.robot.util.AllianceFlipUtil;
import frc.robot.subsystems.Limelight.LimelightType;
import frc.robot.util.LimelightContainer;
import frc.robot.subsystems.IntakeSubsystem.IntakePresets;
import frc.robot.subsystems.IntakeSubsystem;
import frc.robot.subsystems.Limelight;

/**
Expand Down Expand Up @@ -59,6 +66,8 @@ public class RobotContainer {
@Logged
private final DriveCommand normalDrive = new DriveCommand(swerveDriveSubsystem, driverXbox.getHID());

private final IntakeSubsystem intakeSubsystem = new IntakeSubsystem();

/*
* The container for the robot. Contains subsystems, OI devices, and commands.
*/
Expand All @@ -75,10 +84,28 @@ public RobotContainer() {

// NamedCommands.registerCommand(null, getAutonomousCommand());
}

private boolean intakeDown = false;

//TODO: Fix this with grouped commands
private Command getIntakingCommand() {
//if (!intakeDown){
intakeDown = true;
return new ParallelCommandGroup(
new IntakeCommand(intakeSubsystem)
//intake down here
);
//}




}


private Command getShootingCommand() {
return new ParallelCommandGroup(
//putting up shooting, turret, and indexer commands here
);
}
/**
* Use this method to define your trigger->command mappings. Triggers can be
* created via the
Expand All @@ -95,7 +122,9 @@ public RobotContainer() {
*/
private void configureBindings() {
//This is ment for operator controls

operatorXbox.leftTrigger().whileTrue(getIntakingCommand());
operatorXbox.rightTrigger().whileTrue(getShootingCommand());

}

/**
Expand All @@ -119,3 +148,4 @@ public CommandXboxController getOperatorXbox() {
return operatorXbox;
}
}