This repository was archived by the owner on Jan 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-18
lines changed
src/main/java/frc/robot/robot_manager Expand file tree Collapse file tree 1 file changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ public RobotManager(
47
47
@ Override
48
48
protected void collectInputs () {}
49
49
50
- protected RobotState getNexState ( RobotState currentState ) {
51
- // state transition
50
+ @ Override
51
+ protected RobotState getNextState ( RobotState currentState ) {
52
52
switch (currentState ) {
53
53
case SPEAKER_WAITING ,
54
54
AMP_WAITING ,
@@ -117,7 +117,6 @@ protected RobotState getNexState(RobotState currentState) {
117
117
118
118
@ Override
119
119
protected void afterTransition (RobotState newState ) {
120
- // on state change
121
120
switch (newState ) {
122
121
case SPEAKER_PREPARE_TO_SCORE , SPEAKER_SCORING , SPEAKER_WAITING -> {
123
122
arm .setState (ArmState .SPEAKER_SHOT );
@@ -192,7 +191,7 @@ protected void afterTransition(RobotState newState) {
192
191
public void robotPeriodic () {
193
192
super .robotPeriodic ();
194
193
195
- // continous sate action
194
+ // Continuous state actions
196
195
switch (getState ()) {
197
196
case SPEAKER_PREPARE_TO_SCORE , SPEAKER_SCORING , SPEAKER_WAITING -> {
198
197
shooter .setDistanceToSpeaker (distanceToSpeaker );
@@ -202,20 +201,7 @@ public void robotPeriodic() {
202
201
shooter .setDistanceToFeedSpot (distanceToFeedSpot );
203
202
arm .setDistanceToFeedSpot (distanceToFeedSpot );
204
203
}
205
-
206
- case AMP_PREPARE_TO_SCORE ,
207
- PASS_PREPARE_TO_SHOOT ,
208
- AMP_SCORING ,
209
- PASS_SHOOTING ,
210
- UNJAM ,
211
- INTAKING ,
212
- OUTTAKING ,
213
- IDLE_NO_GP ,
214
- IDLE_WITH_GP ,
215
- CLIMBING_1_LINEUP ,
216
- CLIMBING_2_HANGING ,
217
- PASS_WAITING ,
218
- AMP_WAITING -> {}
204
+ default -> {}
219
205
}
220
206
}
221
207
}
You can’t perform that action at this time.
0 commit comments