Skip to content

Commit

Permalink
Fixed ground pick command
Browse files Browse the repository at this point in the history
  • Loading branch information
miyac22 committed Sep 22, 2023
1 parent 98a04ff commit 2b03776
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,10 @@ public static final class Ports {
}

public static final class Setpoints {
public static final ElevatorState STOWED = ElevatorState(0, 0);
public static final ElevatorState HANDOFF = ElevatorState(10, 10);
public static final ElevatorState SHELF_INTAKE = ElevatorState(20, 20);
public static final ElevatorState STOWED = new ElevatorState(20, 0);
public static final ElevatorState HANDOFF = new ElevatorState(10, 10);
public static final ElevatorState SHELF_INTAKE = new ElevatorState(20, 20);
public static final ElevatorState GROUND_INTAKE = new Elevator(0, 0);
}

public static final double MAX_HEIGHT = 10;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import java.util.Optional;
import java.util.function.DoubleSupplier;


/**
* This class is where the bulk of the robot should be declared. Since Command-based is a
* "declarative" paradigm, very little robot logic should actually be handled in the {@link Robot}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/frc/robot/commands/GroundPickupCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ public GroundPickupCommand(
// Add your commands in the addCommands() call, e.g.
// addCommands(new FooCommand(), new BarCommand());
addCommands(
new IntakeModeCommand(intakeSubsystem, IntakeMode.INTAKE)
.deadlineWith(
new ElevatorPositionCommand(elevatorSubsystem, Elevator.Setpoints.HANDOFF))
new ElevatorPositionCommand(elevatorSubsystem, Elevator.Setpoints.GROUND_INTAKE)
.andThen(
new IntakeModeCommand(intakeSubsystem, IntakeMode.INTAKE))
.andThen(
new ElevatorPositionCommand(elevatorSubsystem, Elevator.Setpoints.STOWED)
.alongWith(new IntakeModeCommand(intakeSubsystem, IntakeMode.HOLD))));
// hold???


}
}

0 comments on commit 2b03776

Please sign in to comment.