Skip to content

Commit

Permalink
Raise arm to halfway prepare prepare setpoint with driver x
Browse files Browse the repository at this point in the history
  • Loading branch information
suryatho committed Mar 7, 2024
1 parent f917e74 commit 79c8996
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
14 changes: 2 additions & 12 deletions src/main/java/org/littletonrobotics/frc2024/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -546,18 +546,8 @@ private void configureButtonBindings() {
&& superstructure.getCurrentGoal() != Superstructure.Goal.CANCEL_PREPARE_CLIMB)
.whileTrue(
Commands.either(
ClimbingCommands.autoDrive(
false,
drive,
() -> -driver.getLeftY(),
() -> -driver.getLeftX(),
autoDriveDisable),
ClimbingCommands.autoDrive(
true,
drive,
() -> -driver.getLeftY(),
() -> -driver.getLeftX(),
autoDriveDisable),
superstructure.setGoalCommand(Superstructure.Goal.PREPARE_PREPARE_TRAP_CLIMB),
Commands.none(),
() -> trapScoreMode));

// ------------- Operator Controls -------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ClimbingCommands {
private static final LoggedTunableNumber climbedXOffset =
new LoggedTunableNumber("ClimbingCommands/ClimbedXOffset", 0.16);
private static final LoggedTunableNumber chainToBack =
new LoggedTunableNumber("ClimbingCommands/ChainToBackOffset", 0.65);
new LoggedTunableNumber("ClimbingCommands/ChainToBackOffset", 0.3);
private static final LoggedTunableNumber chainToFront =
new LoggedTunableNumber("ClimbingCommands/ChainToFrontOffset", 0.9);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public enum Goal {
SUBWOOFER,
PODIUM,
RESET_CLIMB,
PREPARE_PREPARE_TRAP_CLIMB,
PREPARE_CLIMB,
CANCEL_PREPARE_CLIMB,
CLIMB,
Expand Down Expand Up @@ -123,6 +124,11 @@ public void periodic() {
climber.setGoal(Climber.Goal.IDLE);
backpackActuator.setGoal(BackpackActuator.Goal.RETRACT);
}
case PREPARE_PREPARE_TRAP_CLIMB -> {
arm.setGoal(Arm.Goal.PREPARE_PREPARE_TRAP_CLIMB);
climber.setGoal(Climber.Goal.EXTEND);
backpackActuator.setGoal(BackpackActuator.Goal.RETRACT);
}
case PREPARE_CLIMB -> {
arm.setGoal(Arm.Goal.PREPARE_CLIMB);
climber.setGoal(Climber.Goal.EXTEND);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public enum Goal {
AMP(new LoggedTunableNumber("Arm/AmpDegrees", 110.0)),
SUBWOOFER(new LoggedTunableNumber("Arm/SubwooferDegrees", 55.0)),
PODIUM(new LoggedTunableNumber("Arm/PodiumDegrees", 30.0)),
PREPARE_PREPARE_TRAP_CLIMB(new LoggedTunableNumber("Arm/PreparePrepareTrapClimbDegrees", 40.0)),
PREPARE_CLIMB(new LoggedTunableNumber("Arm/PrepareClimbDegrees", 105.0)),
CLIMB(new LoggedTunableNumber("Arm/ClimbDegrees", 90.0)),
CUSTOM(new LoggedTunableNumber("Arm/CustomSetpoint", 20.0));
Expand Down

0 comments on commit 79c8996

Please sign in to comment.