Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Use Java 17 switch statement in Arm (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
prawny-boy authored Jul 24, 2024
1 parent 7b00f57 commit 95140c1
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/main/java/frc/robot/subsystems/Arm.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,10 @@ public Command goToSetpoint(Setpoint setpoint) {
log_setpoint.append(setpoint.name());

switch (setpoint) {
case kAmp:
position = 5.34;
break;

case kIntake:
position = 3.7;
break;

case kSpeaker:
position = 3.7;
break;

case kStowed:
position = 3.7;
break;
case kAmp -> position = 5.34;
case kIntake -> position = 3.7;
case kSpeaker -> position = 3.7;
case kStowed -> position = 3.7;
}

return moveToPosition(position);
Expand Down

0 comments on commit 95140c1

Please sign in to comment.