7
7
import frc .robot .elevator .Elevator ;
8
8
9
9
public abstract class L4MultiAuto extends AutoMode {
10
- protected final String name ;
11
- protected final CoralRoller coralRoller ;
12
- protected final Elevator elevator ;
10
+ protected final String name ;
11
+ protected final CoralRoller coralRoller ;
12
+ protected final Elevator elevator ;
13
+
14
+ public L4MultiAuto (String name , Drivetrain drivetrain , Elevator elevatorSystem ) {
15
+ super (drivetrain );
16
+ this .name = name ;
17
+ elevator = elevatorSystem ;
18
+ coralRoller = elevator .getCoralRoller ();
19
+ }
13
20
14
- public L4MultiAuto (String name , Drivetrain drivetrain , Elevator elevatorSystem ) {
15
- super (drivetrain );
16
- this .name = name ;
17
- elevator = elevatorSystem ;
18
- coralRoller = elevator .getCoralRoller ();
19
- }
21
+ @ Override
22
+ public String getName () {
23
+ return name ;
24
+ }
20
25
21
- @ Override
22
- public String getName () {
23
- return name ;
24
- }
25
-
26
- /**
26
+ /**
27
27
* Attempts to score a coral at L4 height when the provided trajectory finishes.
28
28
*
29
29
* <p>As the robot approaches the scoring position, the elevator is raised. The coral is jiggled
@@ -50,13 +50,7 @@ protected void scoreToL4Then(
50
50
* @param nextAction an action to perform after the coral is grabbed
51
51
*/
52
52
protected void grabSomeCoralThen (AutoTrajectory sourceTrajectory , Command nextAction ) {
53
- sourceTrajectory
54
- .done ()
55
- .onTrue (coralRoller .intake ().until (coralRoller .hasCoral ));
56
- sourceTrajectory
57
- .doneDelayed (1.0 )
58
- .onTrue (nextAction );
53
+ sourceTrajectory .done ().onTrue (coralRoller .intake ().until (coralRoller .hasCoral ));
54
+ sourceTrajectory .doneDelayed (1.0 ).onTrue (nextAction );
59
55
}
60
-
61
-
62
56
}
0 commit comments