@@ -22,13 +22,10 @@ public class CoralPlacingCommands {
22
22
static final ReefChooser REEF_CHOOSER = OperatorConstants .REEF_CHOOSER ;
23
23
24
24
public static Command getScoreInReefCommand (boolean shouldScoreRight ) {
25
- return new SequentialCommandGroup (
26
- CoralCollectionCommands .getLoadCoralCommand (),
27
- new ConditionalCommand (
28
- getAutonomouslyScoreCommand (shouldScoreRight ),
29
- getScoreCommand (shouldScoreRight ),
30
- () -> SHOULD_SCORE_AUTONOMOUSLY && REEF_CHOOSER .getScoringLevel () != ScoringLevel .L1
31
- )
25
+ return new ConditionalCommand (
26
+ getAutonomouslyScoreCommand (shouldScoreRight ),
27
+ getScoreCommand (shouldScoreRight ),
28
+ () -> SHOULD_SCORE_AUTONOMOUSLY && REEF_CHOOSER .getScoringLevel () != ScoringLevel .L1
32
29
).onlyIf (CoralCollectionCommands ::hasCoral );
33
30
}
34
31
@@ -44,6 +41,7 @@ private static Command getAutonomouslyScoreCommand(boolean shouldScoreRight) {
44
41
45
42
private static Command getScoreCommand (boolean shouldScoreRight ) {
46
43
return new SequentialCommandGroup (
44
+ CoralCollectionCommands .getLoadCoralCommand (),
47
45
getPrepareArmElevatorIfWontHitReef (shouldScoreRight ).until (OperatorConstants .CONTINUE_TRIGGER ),
48
46
new ParallelCommandGroup (
49
47
GeneralCommands .getFlippableOverridableArmCommand (REEF_CHOOSER ::getArmElevatorState , false , CoralPlacingCommands ::shouldReverseScore ),
@@ -54,7 +52,9 @@ private static Command getScoreCommand(boolean shouldScoreRight) {
54
52
55
53
private static Command getAutonomouslyPrepareScoreCommand (boolean shouldScoreRight ) {
56
54
return new ParallelCommandGroup (
57
- getPrepareArmElevatorIfWontHitReef (shouldScoreRight ),
55
+ new SequentialCommandGroup (
56
+ CoralCollectionCommands .getLoadCoralCommand (),
57
+ getPrepareArmElevatorIfWontHitReef (shouldScoreRight )),
58
58
new SequentialCommandGroup (
59
59
getAutonomousDriveToNoHitReefPose (shouldScoreRight ).asProxy ().until (CoralPlacingCommands ::isPrepareArmAngleAboveCurrentArmAngle ),
60
60
new WaitUntilCommand (CoralPlacingCommands ::isPrepareArmAngleAboveCurrentArmAngle ),
0 commit comments