From 03e07dcf138132de386c23a462c87eed5026919f Mon Sep 17 00:00:00 2001 From: iefomit Date: Thu, 5 Feb 2026 16:24:14 -0800 Subject: [PATCH] few bug fixes --- gradlew | 0 src/main/java/frc/robot/util/ShooterPhysics.java | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 gradlew diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/src/main/java/frc/robot/util/ShooterPhysics.java b/src/main/java/frc/robot/util/ShooterPhysics.java index 40fec43..7335b9d 100644 --- a/src/main/java/frc/robot/util/ShooterPhysics.java +++ b/src/main/java/frc/robot/util/ShooterPhysics.java @@ -57,7 +57,7 @@ public class ShooterPhysics { // the only reason this is empty is if the highest posible trajectory is too low // to intersect the goal - Optional withMaxPitchOpt = withAngle(robotVelocity, robotToTarget, constraints.minPitch()); + Optional withMaxPitchOpt = withAngle(robotVelocity, robotToTarget, constraints.maxPitch()); if (withMaxPitchOpt.isEmpty()) return Optional.empty(); TurretState withMaxPitch = withMaxPitchOpt.get(); @@ -91,7 +91,7 @@ public class ShooterPhysics { // now we binary search the new range TurretState lastValid = newRange.getFirst(); // use a 5cm tolerance - while (Math.abs(newRange.getFirst().height() - newRange.getSecond().height()) < .05) { + while (Math.abs(newRange.getFirst().height() - newRange.getSecond().height()) > .05) { double avgHeight = (newRange.getFirst().height() + newRange.getSecond().height()) / 2; TurretState guess = cvtShot(getRequiredExitVelocity(robotVelocity, robotToTarget, avgHeight), avgHeight); if (guess.satisfies(constraints)) { -- 2.39.5