Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
JayK445 committed Nov 11, 2023
1 parent 8123b57 commit 2316772
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 33 deletions.
20 changes: 6 additions & 14 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,19 +324,11 @@ private void configureButtonBindings() {

anthony
.povDown()
.onTrue(
new GroundPickupCommand(
intakeSubsystem,
elevatorSubsystem,
anthony.rightBumper()));
.onTrue(new GroundPickupCommand(intakeSubsystem, elevatorSubsystem, anthony.rightBumper()));

jacob
.a()
.onTrue(
new GroundPickupCommand(
intakeSubsystem,
elevatorSubsystem,
jacob.leftBumper()));
.onTrue(new GroundPickupCommand(intakeSubsystem, elevatorSubsystem, jacob.leftBumper()));

jacobLayer
.off(jacob.povUp())
Expand Down Expand Up @@ -398,13 +390,13 @@ private void configureButtonBindings() {
intakeSubsystem,
elevatorSubsystem,
Constants.SCORE_STEP_MAP.get(scoreType),
// jacob.b()));
anthony.povRight()));
// jacob.b()));
anthony.povRight()));

anthony
.povRight()
// jacob
// .b()
// jacob
// .b()
.onTrue(
new HashMapCommand<>(
scoreCommandMap, () -> currentNodeSelection.get().getScoreTypeIdentifier()));
Expand Down
31 changes: 15 additions & 16 deletions src/main/java/frc/robot/commands/GroundIntakeElevatorCommand.java
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
package frc.robot.commands;

import java.util.function.BooleanSupplier;

import edu.wpi.first.wpilibj2.command.CommandBase;
import frc.robot.Constants;
import frc.robot.subsystems.ElevatorSubsystem;
import java.util.function.BooleanSupplier;

public class GroundIntakeElevatorCommand extends CommandBase {

private ElevatorSubsystem elevatorSubsystem;
private BooleanSupplier isCube;
private ElevatorSubsystem elevatorSubsystem;
private BooleanSupplier isCube;

public GroundIntakeElevatorCommand(ElevatorSubsystem elevatorSubsystem, BooleanSupplier isCube) {
this.elevatorSubsystem = elevatorSubsystem;
this.isCube = isCube;
public GroundIntakeElevatorCommand(ElevatorSubsystem elevatorSubsystem, BooleanSupplier isCube) {
this.elevatorSubsystem = elevatorSubsystem;
this.isCube = isCube;

addRequirements(this.elevatorSubsystem);
}
addRequirements(this.elevatorSubsystem);
}

@Override
public void execute() {
if(isCube.getAsBoolean()) {
elevatorSubsystem.setTargetState(Constants.Elevator.Setpoints.GROUND_INTAKE_CUBE);
} else {
elevatorSubsystem.setTargetState(Constants.Elevator.Setpoints.GROUND_INTAKE_CONE);
}
@Override
public void execute() {
if (isCube.getAsBoolean()) {
elevatorSubsystem.setTargetState(Constants.Elevator.Setpoints.GROUND_INTAKE_CUBE);
} else {
elevatorSubsystem.setTargetState(Constants.Elevator.Setpoints.GROUND_INTAKE_CONE);
}
}
}
3 changes: 0 additions & 3 deletions src/main/java/frc/robot/commands/GroundPickupCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@

package frc.robot.commands;

import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import frc.robot.Constants.Elevator;
import frc.robot.subsystems.ElevatorSubsystem;
import frc.robot.subsystems.ElevatorSubsystem.ElevatorState;
import frc.robot.subsystems.IntakeSubsystem;
import frc.robot.subsystems.IntakeSubsystem.Modes;
import java.util.function.BooleanSupplier;
import java.util.function.Supplier;

// NOTE: Consider using this command inline, rather than writing a subclass. For more
// information, see:
Expand Down

0 comments on commit 2316772

Please sign in to comment.