From: iefomit Date: Fri, 6 Feb 2026 00:24:14 +0000 (-0800) Subject: few bug fixes X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=03e07dcf138132de386c23a462c87eed5026919f;p=FRC2026.git few bug fixes --- 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)) {