Skip to content

Commit 94e4b5b

Browse files
committed
2 parents 247c198 + 98f9216 commit 94e4b5b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/main/java/frc/trigon/robot/commands/commandfactories/AlgaeManipulationCommands.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private static Command getCollectAlgaeFromLollipopSequenceCommand() {
195195
.onlyIf(() -> OperatorConstants.SHOULD_FLIP_ARM_OVERRIDE)
196196
.until(() -> !OperatorConstants.SHOULD_FLIP_ARM_OVERRIDE)
197197
.repeatedly()
198-
);
198+
).finallyDo(() -> SHOULD_COLLECT_FROM_LOLLIPOP = false);
199199
}
200200

201201
private static Command getCollectAlgaeFromFloorSequenceCommand() {

src/main/java/frc/trigon/robot/commands/commandfactories/CoralPlacingCommands.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ public class CoralPlacingCommands {
2222
static final ReefChooser REEF_CHOOSER = OperatorConstants.REEF_CHOOSER;
2323

2424
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
3229
).onlyIf(CoralCollectionCommands::hasCoral);
3330
}
3431

@@ -44,6 +41,7 @@ private static Command getAutonomouslyScoreCommand(boolean shouldScoreRight) {
4441

4542
private static Command getScoreCommand(boolean shouldScoreRight) {
4643
return new SequentialCommandGroup(
44+
CoralCollectionCommands.getLoadCoralCommand(),
4745
getPrepareArmElevatorIfWontHitReef(shouldScoreRight).until(OperatorConstants.CONTINUE_TRIGGER),
4846
new ParallelCommandGroup(
4947
GeneralCommands.getFlippableOverridableArmCommand(REEF_CHOOSER::getArmElevatorState, false, CoralPlacingCommands::shouldReverseScore),
@@ -54,7 +52,9 @@ private static Command getScoreCommand(boolean shouldScoreRight) {
5452

5553
private static Command getAutonomouslyPrepareScoreCommand(boolean shouldScoreRight) {
5654
return new ParallelCommandGroup(
57-
getPrepareArmElevatorIfWontHitReef(shouldScoreRight),
55+
new SequentialCommandGroup(
56+
CoralCollectionCommands.getLoadCoralCommand(),
57+
getPrepareArmElevatorIfWontHitReef(shouldScoreRight)),
5858
new SequentialCommandGroup(
5959
getAutonomousDriveToNoHitReefPose(shouldScoreRight).asProxy().until(CoralPlacingCommands::isPrepareArmAngleAboveCurrentArmAngle),
6060
new WaitUntilCommand(CoralPlacingCommands::isPrepareArmAngleAboveCurrentArmAngle),

0 commit comments

Comments
 (0)