diff --git a/choreolib/src/main/java/choreo/Choreo.java b/choreolib/src/main/java/choreo/Choreo.java index dcedd71b1..ec4b4901c 100644 --- a/choreolib/src/main/java/choreo/Choreo.java +++ b/choreolib/src/main/java/choreo/Choreo.java @@ -300,10 +300,10 @@ public void clear() { * robot. * @param controller A function that receives the current {@link SampleType} and controls the * robot. - * @param mirrorTrajectory If this returns empty your auto routines and trajectories will do nothing, - * if this returns true then path will be mirrored to the opposite side, - * while keeping the same coordinate system origin. This will be called multiple times - * every loop while auto routines are running. + * @param mirrorTrajectory If this returns empty your auto routines and trajectories will do + * nothing, if this returns true then path will be mirrored to the opposite side, while + * keeping the same coordinate system origin. This will be called multiple times every loop + * while auto routines are running. * @param driveSubsystem The drive {@link Subsystem} to require for {@link AutoTrajectory} {@link * Command}s. * @param bindings Universal trajectory event bindings. diff --git a/choreolib/src/main/java/choreo/auto/AutoFactory.java b/choreolib/src/main/java/choreo/auto/AutoFactory.java index 0a7ad6125..93868ac32 100644 --- a/choreolib/src/main/java/choreo/auto/AutoFactory.java +++ b/choreolib/src/main/java/choreo/auto/AutoFactory.java @@ -212,7 +212,8 @@ public > AutoTrajectory trajecto // type solidify everything final Trajectory solidTrajectory = trajectory; final Consumer solidController = (Consumer) this.controller; - final Optional> solidLogger = this.trajectoryLogger.map(logger -> (TrajectoryLogger) logger); + final Optional> solidLogger = + this.trajectoryLogger.map(logger -> (TrajectoryLogger) logger); return new AutoTrajectory( trajectory.name(), solidTrajectory, diff --git a/choreolib/src/main/java/choreo/auto/AutoTrajectory.java b/choreolib/src/main/java/choreo/auto/AutoTrajectory.java index d824d9894..bf81cb1d1 100644 --- a/choreolib/src/main/java/choreo/auto/AutoTrajectory.java +++ b/choreolib/src/main/java/choreo/auto/AutoTrajectory.java @@ -137,7 +137,9 @@ private void cmdInitialize() { @SuppressWarnings("unchecked") private void cmdExecute() { - if (!isActive) { return; } + if (!isActive) { + return; + } var sample = trajectory.sampleAt(timer.get(), mirrorTrajectory.getAsBoolean()); if (sample instanceof SwerveSample swerveSample) { var swerveController = (Consumer) this.controller; @@ -149,7 +151,9 @@ private void cmdExecute() { } private void cmdEnd(boolean interrupted) { - if (!isActive) { return; } + if (!isActive) { + return; + } timer.stop(); isActive = false; isCompleted = !interrupted; @@ -158,9 +162,7 @@ private void cmdEnd(boolean interrupted) { } private boolean cmdIsFinished() { - return timer.get() > trajectory.getTotalTime() - || routine.isKilled - || !isActive; + return timer.get() > trajectory.getTotalTime() || routine.isKilled || !isActive; } /**