PathGroupLoader.loadPathGroups();
// Load the auto command
try {
- String leftSideAuto = "Right Week V1";
+ String leftSideAuto = "Left Week V1";
// String leftSideAuto = "Right Week V1";
- // String leftSideAuto = "Right Week V1";
- // String rightSideAuto = "Right(2) - Under Trench";
+ // String leftSideAuto = "Depot Outpost Left Week V1";
+ // String rightSideAuto = "Shoot Only Left Week V1";
+
// String testing = "Straight Test";
PathPlannerAuto.getPathGroupFromAutoFile(leftSideAuto);
auto = new PathPlannerAuto(leftSideAuto);
import edu.wpi.first.math.filter.Debouncer;
import edu.wpi.first.math.filter.Debouncer.DebounceType;
import edu.wpi.first.wpilibj2.command.Command;
+import frc.robot.subsystems.hood.Hood;
import frc.robot.subsystems.spindexer.Spindexer;
import frc.robot.subsystems.spindexer.SpindexerConstants;
import frc.robot.subsystems.turret.Turret;
public class RunSpindexer extends Command {
private Spindexer spindexer;
private Turret turret;
+ private Hood hood;
private Debouncer jam_debouncer = new Debouncer(SpindexerConstants.JAM_DEBOUNCE_TIME, DebounceType.kRising); // if their is jam I would think this is 0 -> 1
private Debouncer reversing_debouncer = new Debouncer(SpindexerConstants.REVERSE_DEBOUNCE_TIME, DebounceType.kFalling); // if there is a release in time Idk what it would be (kfalling vs krising)
private boolean reversing = false;
- public RunSpindexer(Spindexer spindexer, Turret turret) {
+ public RunSpindexer(Spindexer spindexer, Turret turret, Hood hood) {
this.spindexer = spindexer;
this.turret = turret;
- addRequirements(spindexer);
+ this.hood = hood;
+
+ addRequirements(spindexer, hood);
}
// public RunSpindexer(Spindexer spindexer) {
@Override
public void execute() {
- if (!turret.atSetpoint()) {
+ if (!turret.atSetpoint() || hood.getHoodForcedDown()) {
spindexer.stopSpindexer();
reversing = false;
return; // this is so the balls don't fly out when unaligned
public static final double BLUE_BORDER = FIELD_LENGTH/2 - Units.inchesToMeters(167.0);
public static final double LEFT_SIDE_TARGET = FIELD_WIDTH * 0.167;
public static final double RIGHT_SIDE_TARGET = FIELD_WIDTH * 0.833;
+ // public static final double LEFT_SIDE_TARGET = FIELD_WIDTH * 0.225;
+ // public static final double RIGHT_SIDE_TARGET = FIELD_WIDTH * 0.775;
/**The coordinate of the climb position */
public static final Pose2d BLUE_CLIMB_LOCATION = new Pose2d(1.5, FIELD_WIDTH/2 - 2.0, new Rotation2d()); // TODO: find this