From fb1d39160c19de5ded2c55c485c0c933135f7fc1 Mon Sep 17 00:00:00 2001 From: Allen Gregory Date: Thu, 9 Oct 2025 17:34:29 -0500 Subject: [PATCH 1/4] Javadoc formatting Co-authored-by: Project516 <138796702+Project516@users.noreply.github.com> --- build.gradle | 4 +- gradle.properties | 1 + .../wpilibj2/command/button/Trigger.java | 11 ++--- src/main/java/frc/reefscape/FieldHelpers.java | 41 ++++++++--------- .../java/frc/reefscape/TagProperties.java | 20 ++++----- src/main/java/frc/reefscape/Zones.java | 8 ++-- .../reefscape/offsets/StateChampsOffsets.java | 4 +- src/main/java/frc/robot/swerve/Swerve.java | 12 ++--- src/main/java/frc/robot/vision/Vision.java | 4 +- .../java/frc/spectrumLib/SpectrumState.java | 6 +-- .../frc/spectrumLib/gamepads/Gamepad.java | 17 ++++--- .../frc/spectrumLib/mechanism/Mechanism.java | 17 +++---- .../frc/spectrumLib/vision/Limelight.java | 17 +++---- .../spectrumLib/vision/LimelightHelpers.java | 44 ++++++++++--------- 14 files changed, 106 insertions(+), 100 deletions(-) create mode 100644 gradle.properties diff --git a/build.gradle b/build.gradle index 73efe7b9..06c6b6b4 100644 --- a/build.gradle +++ b/build.gradle @@ -202,9 +202,9 @@ tasks.spotbugsMain { } } -//Javadoc Gradle task configuation +// Javadoc Gradle task configuation javadoc { options.addStringOption('Xdoclint:none', '-quiet') - failOnError = false + //failOnError = false exclude '**/*.md' } diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..5f1ed7bb --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +org.gradle.caching=true \ No newline at end of file diff --git a/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java b/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java index e324d24d..74abc472 100644 --- a/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java +++ b/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java @@ -110,7 +110,7 @@ public void run() { /** * Starts the given commands whenever the condition changes from `false` to `true`. * - * @param command the command to start + * @param commands the commands to start * @return this trigger, so calls can be chained */ public Trigger onTrue(Command... commands) { @@ -276,7 +276,7 @@ public void run() { *

Doesn't re-start the command if it ends while the condition is still `true`. If the * command should restart, see {@link edu.wpi.first.wpilibj2.command.RepeatCommand}. * - * @param command the command to start + * @param commands the commands to start * @return this trigger, so calls can be chained */ public Trigger whileTrue(Command... commands) { @@ -422,9 +422,10 @@ public void run() { /** * Run a command while true. Also runs a command for a certain timeout when released. * - * @param trigger - * @param runCommand - * @param endCommand + * @param runCommand the command to run while the trigger is true + * @param endCommand the command to run when the trigger becomes false + * @param endTimeout the timeout for the end command + * @return this trigger, so calls can be chained */ public Trigger runWithEndSequence(Command runCommand, Command endCommand, double endTimeout) { this.whileTrue(runCommand); diff --git a/src/main/java/frc/reefscape/FieldHelpers.java b/src/main/java/frc/reefscape/FieldHelpers.java index d955aa71..332e0ffa 100644 --- a/src/main/java/frc/reefscape/FieldHelpers.java +++ b/src/main/java/frc/reefscape/FieldHelpers.java @@ -144,8 +144,8 @@ public static int indexOfSmallest(double[] array) { /** * Converts an index to a reef tag ID * - * @param index - * @return + * @param index The reef index (0-5) + * @return The corresponding reef tag ID (17-22) */ public static int indexToReefTagID(int index) { return index + 17; @@ -154,8 +154,8 @@ public static int indexToReefTagID(int index) { /** * Converts a given Reef Tag Id into index form for center faces to pull from * - * @param tagID - * @return + * @param tagID The blue reef tag ID (17-22) + * @return The reef index (0-5), or -1 if invalid */ public static int blueReefTagIDToIndex(int tagID) { @@ -170,8 +170,8 @@ public static int blueReefTagIDToIndex(int tagID) { /** * Converts a blue reef tag ID to a red reef tag ID * - * @param blueTagID - * @return + * @param blueTagID The blue alliance reef tag ID (17-22) + * @return The corresponding red alliance reef tag ID (6-11) */ public static int blueToRedTagID(int blueTagID) { switch (blueTagID) { @@ -214,8 +214,8 @@ public static int redToBlueTagID(int redTagID) { /** * Returns the reef tag ID based on the robot's pose * - * @param pose - * @return + * @param pose The robot's current pose on the field + * @return The reef tag ID corresponding to the robot's zone */ public static int getReefZoneTagID(Pose2d pose) { pose = flipIfRedSide(pose); @@ -235,8 +235,8 @@ public static int getReefZoneTagID(Pose2d pose) { * Returns the reef index zone based on the robot's pose changed to blue pose including the * center is consistently blue center * - * @param pose - * @return + * @param pose The robot's current pose on the field + * @return The reef zone index (0-5) */ public static int getReefZone(Pose2d pose) { Translation2d point = pose.getTranslation(); @@ -327,8 +327,9 @@ public static Pose2d getOffsetPosition(int tagID, double offsetMeters, double of * Converts a target angle into a reverse rotation if the back is closer; otherwise, returns the * original target angle for front heading. * - *

variable robotAngle The current angle of the robot in radians. variable reefRotation The - * rotation adjustment factor in radians. targetAngle The desired target angle in radians. + *

The method considers: robotAngle - The current angle of the robot in radians. reefRotation + * - The rotation adjustment factor in radians. targetAngle - The desired target angle in + * radians. * * @return true/false if robot heading is reversed to reef face */ @@ -370,7 +371,7 @@ public static boolean reverseRotationBlue() { /** * Returns the reef face pose based on the tag ID sent from either red or blue * - * @param tagID + * @param faceIndex The reef face index * @return Pose2d of reef side */ public static Pose2d getReefSideFromTagID(int faceIndex) { @@ -392,7 +393,7 @@ public static Pose2d getReefSideFromTagID(int faceIndex) { * * @param blueReefTagID may also be a red reef tag ID that will later be converted from a blue * reef tagID - * @return + * @return The calculated scoring pose for the robot */ public static Pose2d getScorePoseFromTagID(int blueReefTagID) { if (blueReefTagID < 0 || blueReefTagID > 22 || blueReefTagID == 16) { @@ -414,12 +415,12 @@ public static double getTagAngleOffset(int tagID) { } /** - * Method gets + * Gets the pose offset from a tag position * - * @param tagID - * @param distanceAway - * @param centerOffset - * @return + * @param tagID The AprilTag ID + * @param distanceAway The distance away from the tag in meters + * @param centerOffset The offset from the center in meters + * @return The calculated pose offset from the tag */ public static Pose2d getXYOffsetFromTag(int tagID, double distanceAway, double centerOffset) { Pose2d tagPose; @@ -456,7 +457,7 @@ public static double getReefOffsetFromTagY() { /** * Get the angle the robot should turn to based on the id the limelight is seeing. * - * @return + * @return The target angle in degrees */ public static double getReefTagAngle() { double[][] reefFrontAngles = { diff --git a/src/main/java/frc/reefscape/TagProperties.java b/src/main/java/frc/reefscape/TagProperties.java index 3bbc1923..1733854c 100644 --- a/src/main/java/frc/reefscape/TagProperties.java +++ b/src/main/java/frc/reefscape/TagProperties.java @@ -13,16 +13,16 @@ public class TagProperties { @Getter private final double angle; /** - * @param frontOffsetInchesLeft - * @param frontOffsetInchesRight - * @param rearOffsetInchesLeft - * @param rearOffsetInchesRight - * @param frontCenterOffsetInchesLeft - * @param frontCenterOffsetInchesRight - * @param rearCenterOffsetInchesLeft - * @param rearCenterOffsetInchesRight - * @param taGoal - * @param angle + * @param frontOffsetInchesLeft Front offset in inches for left side + * @param frontOffsetInchesRight Front offset in inches for right side + * @param rearOffsetInchesLeft Rear offset in inches for left side + * @param rearOffsetInchesRight Rear offset in inches for right side + * @param frontCenterOffsetInchesLeft Front center offset in inches for left side + * @param frontCenterOffsetInchesRight Front center offset in inches for right side + * @param rearCenterOffsetInchesLeft Rear center offset in inches for left side + * @param rearCenterOffsetInchesRight Rear center offset in inches for right side + * @param taGoal Target area goal + * @param angleDegrees Angle in degrees */ public TagProperties( double frontOffsetInchesLeft, diff --git a/src/main/java/frc/reefscape/Zones.java b/src/main/java/frc/reefscape/Zones.java index 1a586b53..05e3f3fc 100644 --- a/src/main/java/frc/reefscape/Zones.java +++ b/src/main/java/frc/reefscape/Zones.java @@ -69,11 +69,11 @@ public class Zones { /** * Depending on the offsets file used, change the tag offsets here. * - *

getTagOffset automatically checks if the offset taken is < 0 or greater than the given tag - * limit. If the tag is blue (> 16), it subtracts 17 from the given tag + *

getTagOffset automatically checks if the offset taken is < 0 or greater than the given + * tag limit. If the tag is blue (> 16), it subtracts 17 from the given tag * - * @param tag - * @return + * @param tag The AprilTag ID + * @return The distance offset for the tag in meters */ public double getTagOffset(int tag) { return offsets.getReefTagDistanceOffset(tag); diff --git a/src/main/java/frc/reefscape/offsets/StateChampsOffsets.java b/src/main/java/frc/reefscape/offsets/StateChampsOffsets.java index 3ebea1a8..ab3347bb 100644 --- a/src/main/java/frc/reefscape/offsets/StateChampsOffsets.java +++ b/src/main/java/frc/reefscape/offsets/StateChampsOffsets.java @@ -58,8 +58,8 @@ public class StateChampsOffsets { /** * Converts inches to meters and adds half the robot length to the offset * - * @param offsetInches - * @return + * @param offsetInches The offset distance in inches + * @return The offset distance in meters including half robot length */ private static double meterConverter(double offsetInches) { double meterConversion = Units.inchesToMeters(offsetInches); diff --git a/src/main/java/frc/robot/swerve/Swerve.java b/src/main/java/frc/robot/swerve/Swerve.java index 3860e281..724e814d 100644 --- a/src/main/java/frc/robot/swerve/Swerve.java +++ b/src/main/java/frc/robot/swerve/Swerve.java @@ -213,9 +213,9 @@ public Trigger inYzone(double minYmeter, double maxYmeter) { * This method is used to check if the robot is in the X zone of the field flips the values if * Red Alliance * - * @param minXmeter - * @param maxXmeter - * @return + * @param minXmeter Minimum X coordinate in meters + * @param maxXmeter Maximum X coordinate in meters + * @return Trigger that is true when robot is within the X zone */ public Trigger inXzoneAlliance(double minXmeter, double maxXmeter) { return new Trigger( @@ -230,9 +230,9 @@ public Trigger inXzoneAlliance(double minXmeter, double maxXmeter) { * This method is used to check if the robot is in the Y zone of the field flips the values if * Red Alliance * - * @param minYmeter - * @param maxYmeter - * @return + * @param minYmeter Minimum Y coordinate in meters + * @param maxYmeter Maximum Y coordinate in meters + * @return Trigger that is true when robot is within the Y zone */ public Trigger inYzoneAlliance(double minYmeter, double maxYmeter) { return new Trigger( diff --git a/src/main/java/frc/robot/vision/Vision.java b/src/main/java/frc/robot/vision/Vision.java index 12bf16fd..e8728fb4 100644 --- a/src/main/java/frc/robot/vision/Vision.java +++ b/src/main/java/frc/robot/vision/Vision.java @@ -645,7 +645,7 @@ private boolean rejectionCheck(Pose2d pose, double targetSize) { /** * Choose the limelight with the best view of multiple tags * - * @return + * @return The Limelight with the best scoring view */ public Limelight getBestLimelight() { Limelight bestLimelight = frontLL; @@ -732,7 +732,7 @@ public boolean resetPoseToVision( /** * If at least one LL has an accurate pose * - * @return + * @return True if at least one Limelight has an accurate pose */ public boolean hasAccuratePose() { for (Limelight limelight : allLimelights) { diff --git a/src/main/java/frc/spectrumLib/SpectrumState.java b/src/main/java/frc/spectrumLib/SpectrumState.java index 53e5ca00..9d0f6b83 100644 --- a/src/main/java/frc/spectrumLib/SpectrumState.java +++ b/src/main/java/frc/spectrumLib/SpectrumState.java @@ -108,7 +108,7 @@ public Command toggleToTrue() { * Command to set state to true, and then to false, ensuring your state will trigger change to * false actions * - * @return + * @return Command that toggles state to false */ public Command toggleToFalse() { return setTrue() @@ -119,8 +119,8 @@ public Command toggleToFalse() { } /** - * @param value - * @return + * @param value The boolean value to set the state to + * @return Command that sets the state */ public Command set(boolean value) { return Commands.runOnce(() -> setState(value)).ignoringDisable(true); diff --git a/src/main/java/frc/spectrumLib/gamepads/Gamepad.java b/src/main/java/frc/spectrumLib/gamepads/Gamepad.java index 34eed6ec..16f8a6a0 100644 --- a/src/main/java/frc/spectrumLib/gamepads/Gamepad.java +++ b/src/main/java/frc/spectrumLib/gamepads/Gamepad.java @@ -104,11 +104,16 @@ public Config(String name, int port) { /** * Constructs a Gamepad object with the specified configuration. * + *

The constructor initializes the following: + * + *

+ * * @param config the configuration object containing settings for the gamepad - *

The constructor initializes the following: - Superclass with port and attachment - * status from the configuration. - Curve objects for left stick, right stick, and triggers - * using exponential curves. - If the gamepad is attached, initializes the Xbox controller - * and its buttons, triggers, sticks, and D-pad. */ protected Gamepad(Config config) { this.config = config; @@ -283,7 +288,7 @@ public double getRightStickMagnitude() { /** * Get proper stick angles for each alliance * - * @return + * @return The cardinal direction angle in radians */ public double chooseCardinalDirections() { // hotfix @@ -319,7 +324,7 @@ else if (stickAngle < -Math.PI / 8 && stickAngle >= -3 * Math.PI / 8) { /** * Flips the stick direction for the red alliance. * - * @return + * @return The cardinal direction angle in radians for red alliance */ public double getRedAllianceStickCardinals() { double stickAngle = getRightStickDirection().getRadians(); diff --git a/src/main/java/frc/spectrumLib/mechanism/Mechanism.java b/src/main/java/frc/spectrumLib/mechanism/Mechanism.java index 6f8c3187..bd269290 100644 --- a/src/main/java/frc/spectrumLib/mechanism/Mechanism.java +++ b/src/main/java/frc/spectrumLib/mechanism/Mechanism.java @@ -39,7 +39,7 @@ /** * Control Modes Docs: * https://pro.docs.ctr-electronics.com/en/latest/docs/migration/migration-guide/control-requests-guide.html - * Closed-loop & Motion Magic Docs: + * Closed-loop and Motion Magic Docs: * https://pro.docs.ctr-electronics.com/en/latest/docs/migration/migration-guide/closed-loop-guide.html */ public abstract class Mechanism implements NTSendable, SpectrumSubsystem { @@ -232,7 +232,7 @@ public Trigger aboveCurrent(DoubleSupplier target, DoubleSupplier tolerance) { /** * Update the value of the stator current for the motor * - * @return + * @return The current stator current value in amps */ public double updateCurrent() { if (config.attached) { @@ -259,7 +259,8 @@ public double getVoltage() { /** * Percentage to Rotations * - * @return + * @param percent The percentage value supplier + * @return The equivalent rotation count */ public double percentToRotations(DoubleSupplier percent) { return (percent.getAsDouble() / 100) * config.maxRotations; @@ -268,8 +269,8 @@ public double percentToRotations(DoubleSupplier percent) { /** * Rotations to Percentage * - * @param rotations - * @return + * @param rotations The rotation count supplier + * @return The equivalent percentage value */ public double rotationsToPercent(DoubleSupplier rotations) { return (rotations.getAsDouble() / config.maxRotations) * 100; @@ -361,8 +362,8 @@ public Command runVelocity(DoubleSupplier velocityRPM) { /** * Run the mechanism at given velocity rpm in TorqueCurrentFOC mode * - * @param velocityRPM - * @return + * @param velocityRPM The target velocity in RPM + * @return Command that runs the mechanism at the specified velocity */ public Command runVelocityTcFocRpm(DoubleSupplier velocityRPM) { return run(() -> setVelocityTorqueCurrentFOC(() -> Conversions.RPMtoRPS(velocityRPM))) @@ -509,7 +510,7 @@ protected void setVelocityTorqueCurrentFOC(DoubleSupplier velocityRPS) { /** * Closed-loop Velocity with torque control (requires Pro) * - * @param velocity rotations per second + * @param velocityRPS rotations per second */ protected void setVelocityTCFOCrpm(DoubleSupplier velocityRPS) { if (isAttached()) { diff --git a/src/main/java/frc/spectrumLib/vision/Limelight.java b/src/main/java/frc/spectrumLib/vision/Limelight.java index 4864d6c1..35104d62 100644 --- a/src/main/java/frc/spectrumLib/vision/Limelight.java +++ b/src/main/java/frc/spectrumLib/vision/Limelight.java @@ -4,7 +4,6 @@ import edu.wpi.first.math.geometry.Pose3d; import edu.wpi.first.math.util.Units; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; -import frc.robot.vision.Vision.VisionConfig; import frc.spectrumLib.vision.LimelightHelpers.LimelightResults; import frc.spectrumLib.vision.LimelightHelpers.PoseEstimate; import frc.spectrumLib.vision.LimelightHelpers.RawFiducial; @@ -36,7 +35,7 @@ public LimelightConfig(String name) { * @param forward (meters) forward from center of robot * @param right (meters) right from center of robot * @param up (meters) up from center of robot - * @return + * @return This LimelightConfig for method chaining */ public LimelightConfig withTranslation(double forward, double right, double up) { this.forward = forward; @@ -49,7 +48,7 @@ public LimelightConfig withTranslation(double forward, double right, double up) * @param roll (degrees) roll of limelight || positive is rotated right * @param pitch (degrees) pitch of limelight || positive is camera tilted up * @param yaw (yaw) yaw of limelight || positive is rotated left - * @return + * @return This LimelightConfig for method chaining */ public LimelightConfig withRotation(double roll, double pitch, double yaw) { this.roll = roll; @@ -299,8 +298,8 @@ public double getPoseLatency() { /** * get distance in meters to a target * - * @param targetHeight meters - * @return + * @param targetHeight Height of target in meters + * @return Distance to target in meters */ public double getDistanceToTarget(double targetHeight) { if (!isAttached()) { @@ -335,7 +334,7 @@ private LimelightResults retrieveJSON() { } /** - * @param pipelineIndex use pipeline indexes in {@link VisionConfig} + * @param pipelineIndex use pipeline indexes in {@link frc.robot.vision.Vision.VisionConfig} */ public void setLimelightPipeline(int pipelineIndex) { if (!isAttached()) { @@ -423,11 +422,7 @@ public void setLEDMode(boolean enabled) { } } - /** - * Set LL LED's to blink - * - * @return - */ + /** Set LL LED's to blink */ public void blinkLEDs() { if (!isAttached()) { return; diff --git a/src/main/java/frc/spectrumLib/vision/LimelightHelpers.java b/src/main/java/frc/spectrumLib/vision/LimelightHelpers.java index 754cc338..9a967f37 100644 --- a/src/main/java/frc/spectrumLib/vision/LimelightHelpers.java +++ b/src/main/java/frc/spectrumLib/vision/LimelightHelpers.java @@ -593,7 +593,7 @@ public IMUData(double[] imuData) { static boolean profileJSON = false; static final String sanitizeName(String name) { - if (name == "" || name == null) { + if (name == null || name.equals("")) { return "limelight"; } return name; @@ -1114,8 +1114,8 @@ public static String getJSONDump(String limelightName) { /** * Switch to getBotPose * - * @param limelightName - * @return + * @param limelightName Name of the Limelight camera + * @return Array containing robot pose data [x, y, z, roll, pitch, yaw] */ @Deprecated public static double[] getBotpose(String limelightName) { @@ -1125,8 +1125,9 @@ public static double[] getBotpose(String limelightName) { /** * Switch to getBotPose_wpiRed * - * @param limelightName - * @return + * @param limelightName Name of the Limelight camera + * @return Array containing robot pose data in WPI Red alliance coordinates [x, y, z, roll, + * pitch, yaw] */ @Deprecated public static double[] getBotpose_wpiRed(String limelightName) { @@ -1136,8 +1137,9 @@ public static double[] getBotpose_wpiRed(String limelightName) { /** * Switch to getBotPose_wpiBlue * - * @param limelightName - * @return + * @param limelightName Name of the Limelight camera + * @return Array containing robot pose data in WPI Blue alliance coordinates [x, y, z, roll, + * pitch, yaw] */ @Deprecated public static double[] getBotpose_wpiBlue(String limelightName) { @@ -1283,8 +1285,8 @@ public static Pose3d getCameraPose3d_RobotSpace(String limelightName) { /** * Gets the Pose2d for easy use with Odometry vision pose estimator (addVisionMeasurement) * - * @param limelightName - * @return + * @param limelightName Name of the Limelight camera + * @return Robot Pose2d in WPI Blue alliance coordinates */ public static Pose2d getBotPose2d_wpiBlue(String limelightName) { @@ -1296,8 +1298,8 @@ public static Pose2d getBotPose2d_wpiBlue(String limelightName) { * Gets the MegaTag1 Pose2d and timestamp for use with WPILib pose estimator * (addVisionMeasurement) in the WPILib Blue alliance coordinate system. * - * @param limelightName - * @return + * @param limelightName Name of the Limelight camera + * @return PoseEstimate containing pose and timestamp in WPI Blue coordinates */ public static PoseEstimate getBotPoseEstimate_wpiBlue(String limelightName) { return getBotPoseEstimate(limelightName, "botpose_wpiblue", false); @@ -1308,8 +1310,8 @@ public static PoseEstimate getBotPoseEstimate_wpiBlue(String limelightName) { * (addVisionMeasurement) in the WPILib Blue alliance coordinate system. Make sure you are * calling setRobotOrientation() before calling this method. * - * @param limelightName - * @return + * @param limelightName Name of the Limelight camera + * @return PoseEstimate containing MegaTag2 pose and timestamp in WPI Blue coordinates */ public static PoseEstimate getBotPoseEstimate_wpiBlue_MegaTag2(String limelightName) { return getBotPoseEstimate(limelightName, "botpose_orb_wpiblue", true); @@ -1318,8 +1320,8 @@ public static PoseEstimate getBotPoseEstimate_wpiBlue_MegaTag2(String limelightN /** * Gets the Pose2d for easy use with Odometry vision pose estimator (addVisionMeasurement) * - * @param limelightName - * @return + * @param limelightName Name of the Limelight camera + * @return Robot Pose2d in WPI Red alliance coordinates */ public static Pose2d getBotPose2d_wpiRed(String limelightName) { @@ -1331,8 +1333,8 @@ public static Pose2d getBotPose2d_wpiRed(String limelightName) { * Gets the Pose2d and timestamp for use with WPILib pose estimator (addVisionMeasurement) when * you are on the RED alliance * - * @param limelightName - * @return + * @param limelightName Name of the Limelight camera + * @return PoseEstimate containing pose and timestamp in WPI Red coordinates */ public static PoseEstimate getBotPoseEstimate_wpiRed(String limelightName) { return getBotPoseEstimate(limelightName, "botpose_wpired", false); @@ -1342,8 +1344,8 @@ public static PoseEstimate getBotPoseEstimate_wpiRed(String limelightName) { * Gets the Pose2d and timestamp for use with WPILib pose estimator (addVisionMeasurement) when * you are on the RED alliance * - * @param limelightName - * @return + * @param limelightName Name of the Limelight camera + * @return PoseEstimate containing MegaTag2 pose and timestamp in WPI Red coordinates */ public static PoseEstimate getBotPoseEstimate_wpiRed_MegaTag2(String limelightName) { return getBotPoseEstimate(limelightName, "botpose_orb_wpired", true); @@ -1352,8 +1354,8 @@ public static PoseEstimate getBotPoseEstimate_wpiRed_MegaTag2(String limelightNa /** * Gets the Pose2d for easy use with Odometry vision pose estimator (addVisionMeasurement) * - * @param limelightName - * @return + * @param limelightName Name of the Limelight camera + * @return Robot Pose2d in field coordinates */ public static Pose2d getBotPose2d(String limelightName) { From 999842af634205cb62f8d62ab5e03582545b824a Mon Sep 17 00:00:00 2001 From: Spectrum3847 Date: Thu, 9 Oct 2025 17:41:15 -0500 Subject: [PATCH 2/4] uncommit failOnError = false --- .github/workflows/main.yml | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f07d3241..1af3cc12 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest # This grabs the WPILib docker container - container: wpilib/roborio-cross-ubuntu:2024-22.04 + container: wpilib/roborio-cross-ubuntu:2025-24.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: diff --git a/build.gradle b/build.gradle index 06c6b6b4..743253df 100644 --- a/build.gradle +++ b/build.gradle @@ -205,6 +205,6 @@ tasks.spotbugsMain { // Javadoc Gradle task configuation javadoc { options.addStringOption('Xdoclint:none', '-quiet') - //failOnError = false + failOnError = false exclude '**/*.md' } From 15416f0ef8c3d66d36f3a9f6b49396b5d6b69ff3 Mon Sep 17 00:00:00 2001 From: Allen Gregory Date: Thu, 9 Oct 2025 17:44:10 -0500 Subject: [PATCH 3/4] Update src/main/java/frc/spectrumLib/vision/LimelightHelpers.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/main/java/frc/spectrumLib/vision/LimelightHelpers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/spectrumLib/vision/LimelightHelpers.java b/src/main/java/frc/spectrumLib/vision/LimelightHelpers.java index 9a967f37..87fb4e75 100644 --- a/src/main/java/frc/spectrumLib/vision/LimelightHelpers.java +++ b/src/main/java/frc/spectrumLib/vision/LimelightHelpers.java @@ -593,7 +593,7 @@ public IMUData(double[] imuData) { static boolean profileJSON = false; static final String sanitizeName(String name) { - if (name == null || name.equals("")) { + if (name == null || "".equals(name)) { return "limelight"; } return name; From 126557a9e24bf9c5bafa22968ffbedb33c711d86 Mon Sep 17 00:00:00 2001 From: Allen Gregory Date: Thu, 9 Oct 2025 17:44:35 -0500 Subject: [PATCH 4/4] Update src/main/java/frc/reefscape/FieldHelpers.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/main/java/frc/reefscape/FieldHelpers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/reefscape/FieldHelpers.java b/src/main/java/frc/reefscape/FieldHelpers.java index 332e0ffa..62c7bd2f 100644 --- a/src/main/java/frc/reefscape/FieldHelpers.java +++ b/src/main/java/frc/reefscape/FieldHelpers.java @@ -371,7 +371,7 @@ public static boolean reverseRotationBlue() { /** * Returns the reef face pose based on the tag ID sent from either red or blue * - * @param faceIndex The reef face index + * @param tagID The reef tag ID * @return Pose2d of reef side */ public static Pose2d getReefSideFromTagID(int faceIndex) {