Skip to content

Commit ebaaf64

Browse files
committed
fix state
1 parent 37a7016 commit ebaaf64

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/java/frc/robot/subsystems/robotState/RobotStateSubsystem.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ private boolean needSafeAlgaeTransfer(RobotStates nextState) {
171171
toStow();
172172
return true;
173173
}
174+
default -> {}
174175
}
175176
}
177+
default -> {}
176178
}
177179

178180
switch (curState) {
@@ -192,8 +194,10 @@ private boolean needSafeAlgaeTransfer(RobotStates nextState) {
192194
toStow();
193195
return true;
194196
}
197+
default -> {}
195198
}
196199
}
200+
default -> {}
197201
}
198202
}
199203

@@ -247,6 +251,7 @@ private void toReefAlign(boolean getAlgae, boolean drive) {
247251
biscuitSubsystem.setPosition(BiscuitConstants.kL3AlgaeSetpoint);
248252
elevatorSubsystem.setPosition(ElevatorConstants.kL3AlgaeSetpoint);
249253
}
254+
default -> logger.error("Invalid algae level: {}", getAlgaeLevel());
250255
}
251256
} else {
252257
if (!coralSubsystem.hasCoral()) {
@@ -474,6 +479,7 @@ public void periodic() {
474479
biscuitSubsystem.setPosition(BiscuitConstants.kL3AlgaeRemovalSetpoint);
475480
elevatorSubsystem.setPosition(ElevatorConstants.kL3AlgaeRemovalSetpoint);
476481
}
482+
default -> logger.error("Invalid algae level: {}", getAlgaeLevel());
477483
}
478484

479485
setState(RobotStates.REMOVE_ALGAE);
@@ -569,9 +575,10 @@ public void periodic() {
569575
toStow();
570576
}
571577
}
572-
case PRE_CLIMB -> {}
578+
case PREP_CLIMB -> {}
573579
case CLIMB -> {}
574580
case INTERRUPTED -> {}
581+
default -> logger.error("Unhandled state: {}", curState);
575582
}
576583
}
577584

0 commit comments

Comments
 (0)