diff --git a/src/main/java/org/team1540/robot2023/commands/drivetrain/Drivetrain.java b/src/main/java/org/team1540/robot2023/commands/drivetrain/Drivetrain.java index 7e47f0f..d61d4f8 100644 --- a/src/main/java/org/team1540/robot2023/commands/drivetrain/Drivetrain.java +++ b/src/main/java/org/team1540/robot2023/commands/drivetrain/Drivetrain.java @@ -122,7 +122,12 @@ public boolean updateWithScoringApriltags() { public Command updateOdometryAnd(Command cmd) { return new ParallelCommandGroup( - new InstantCommand(this::updateWithScoringApriltags).andThen(new InstantCommand(this::zeroFieldOrientation)), + new InstantCommand(() -> { + boolean isGood = this.updateWithScoringApriltags(); + if (isGood) { + this.zeroFieldOrientation(); + } + }), cmd ); }