Skip to content

Commit

Permalink
fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchen20 committed Apr 11, 2024
1 parent f287239 commit 5ce2f3b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 27 deletions.
2 changes: 0 additions & 2 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ public static class PivotConstants {
public static final double CLIMB_SETPOINT_ONE_DEG = 50;
public static final double CLIMB_SETPOINT_TWO_DEG = 95;

public static final double TRAP_SETPOINT_DEG = 75;

public static final double THRESHOLD = 1.5;

public static final double[] PID = {0, 0, 0};
Expand Down
22 changes: 0 additions & 22 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ private boolean isAimbot() {

private Command goBackClimbCommands;

private final Command intakeReleaseCommands;

/**
* The container for the robot. Contains subsystems, OI devices, and commands.
*/
Expand Down Expand Up @@ -248,26 +246,6 @@ public RobotContainer() {
// led))),
// this::isAutoAlign);

intakeReleaseCommands = new SelectCommand<>(
Map.ofEntries(
Map.entry(
false,
new InstantCommand(() -> led.setState(LED_STATE.BLUE))
.andThen(new InstantCommand(shooter::stopFeeders))
.andThen(
new SetPivotTarget(Constants.PivotConstants.STOW_SETPOINT_DEG, pivot))),
Map.entry(
true,
new InstantCommand(() -> led.setState(LED_STATE.BLUE))
.andThen(
new InstantCommand(() -> shooter.setFeedersRPM(500))
.andThen(new WaitCommand(0.15))
.andThen(new InstantCommand(shooter::stopFeeders)))
.andThen(
new SetPivotTarget(
Constants.PivotConstants.STOW_SETPOINT_DEG, pivot)))),
shooter::inTimeThreshold);

shootCommands = new SelectCommand<>(
Map.ofEntries(
Map.entry(false, new InstantCommand(() -> shooter.setFeedersRPM(1000))),
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/AlignToNoteTele.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void initialize() {
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
if (shooter.seesNote()) {
if (shooter.seesNote() == NoteState.CURRENT || shooter.seesNote() == NoteState.SENSOR) {
end(true);
}
pathCommand.execute();
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/commands/DriveCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import frc.robot.Constants.LED_STATE;
import frc.robot.Constants.NoteState;
import frc.robot.subsystems.drive.Drive;
import frc.robot.subsystems.intake.Intake;
import frc.robot.subsystems.led.LED;
Expand All @@ -50,7 +51,7 @@ public static Command intakeCommand(
DoubleSupplier ySupplier,
DoubleSupplier omegaSupplier) {

if (shooter.seesNote()) {
if (shooter.seesNote() == NoteState.CURRENT || shooter.seesNote() == NoteState.SENSOR) {
return joystickDrive(drive, xSupplier, ySupplier, omegaSupplier);
} else {

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/IntakeNote.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void initialize() {
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
if (shooter.seesNote()) end(true);
if (shooter.seesNote() == NoteState.CURRENT || shooter.seesNote() == NoteState.SENSOR) end(true);
}

// Called once the command ends or is interrupted.
Expand Down

0 comments on commit 5ce2f3b

Please sign in to comment.