From fa29e0de6aec582f68e476676f6778525ed87167 Mon Sep 17 00:00:00 2001 From: QuackitsQuinn Date: Wed, 27 Mar 2024 10:46:37 -0500 Subject: [PATCH 1/4] javadoc fix + javadoc mainly add javadoc so that javadoc doesn't yell. --- src/main/java/frc/robot/Main.java | 10 +++++++++- src/main/java/frc/robot/Robot.java | 5 ++++- src/main/java/frc/robot/commands/AimWithLimelight.java | 4 ++-- src/main/java/frc/robot/subsystems/Drive.java | 5 +++++ 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/main/java/frc/robot/Main.java b/src/main/java/frc/robot/Main.java index 6baf2d57..74624cbd 100644 --- a/src/main/java/frc/robot/Main.java +++ b/src/main/java/frc/robot/Main.java @@ -13,10 +13,18 @@ import edu.wpi.first.wpilibj.RobotBase; -/* Probably don't put code here, most likely put it in RobotContainer. */ +/** + * The robots entrypoint. You Probably don't want to put code here. You might be looking for {@link + * frc.robot.RobotContainer} + */ public final class Main { private Main() {} + /** + * The entrypoint for the robot. You almost certainly don't want to put code here are. + * + * @param args The args passed from the RoboRIO + */ public static void main(String... args) { RobotBase.startRobot(Robot::new); } diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index 16163a80..e03b25eb 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -15,7 +15,10 @@ import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; -/* Don't put code here, most likely put it in RobotContainer. */ +/** + * The core of robot code. You Probably don't want to put code here. You might be looking for {@link + * frc.robot.RobotContainer} + */ public class Robot extends TimedRobot { private Command autonomousCommand; diff --git a/src/main/java/frc/robot/commands/AimWithLimelight.java b/src/main/java/frc/robot/commands/AimWithLimelight.java index 691e047b..c04d3c8d 100644 --- a/src/main/java/frc/robot/commands/AimWithLimelight.java +++ b/src/main/java/frc/robot/commands/AimWithLimelight.java @@ -57,7 +57,7 @@ public class AimWithLimelight extends Command { public AimWithLimelight( Limelight limelight, double steerStrength, - double distanceFromTarget, + double desiredDistanceFromTarget, double mountHeight, double mountAngle, double driveStrength, @@ -67,7 +67,7 @@ public AimWithLimelight( double targetHeight, double pipelineNumber) { this.steerStrength = steerStrength; - this.desiredDistanceFromTarget = distanceFromTarget; + this.desiredDistanceFromTarget = desiredDistanceFromTarget; this.mountHeight = mountHeight; this.mountAngle = mountAngle; this.driveStrength = driveStrength; diff --git a/src/main/java/frc/robot/subsystems/Drive.java b/src/main/java/frc/robot/subsystems/Drive.java index 09566a09..8a2f87f5 100644 --- a/src/main/java/frc/robot/subsystems/Drive.java +++ b/src/main/java/frc/robot/subsystems/Drive.java @@ -182,6 +182,11 @@ public void setDriveMode(String driveMode) { driveLabelEntry.setString(driveMode); } + /** + * Returns the heading of the robot + * + * @return the heading of the robot + */ public Rotation2d getHeading() { return drive.getPose().getRotation(); } From 5a1586242386b39ff8809be4fad9dd0426320429 Mon Sep 17 00:00:00 2001 From: QuackitsQuinn Date: Wed, 27 Mar 2024 10:51:02 -0500 Subject: [PATCH 2/4] more javadoc --- src/main/java/frc/robot/RobotContainer.java | 2 +- src/main/java/frc/robot/commands/StartCamera.java | 6 +++++- .../commands/drive/SetDrivePerspectiveFieldOriented.java | 1 + .../SetDrivePerspectiveFieldOrientedHeadingSnapping.java | 1 + .../commands/drive/SetDrivePerspectiveRobotOriented.java | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index dc023519..a459616a 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -54,8 +54,8 @@ import frc.robot.subsystems.mailbox.MailboxBelts; import frc.robot.subsystems.mailbox.MailboxPneumatics; -@SuppressWarnings("unused") /** Singleton class that contains all the robot's subsystems, commands, and button bindings. */ +@SuppressWarnings("unused") public class RobotContainer { /* diff --git a/src/main/java/frc/robot/commands/StartCamera.java b/src/main/java/frc/robot/commands/StartCamera.java index f4240bc0..04a3bf5f 100644 --- a/src/main/java/frc/robot/commands/StartCamera.java +++ b/src/main/java/frc/robot/commands/StartCamera.java @@ -18,7 +18,11 @@ public class StartCamera extends Command { private Camera camera; - /** Creates a new StartCamera. */ + /** + * Creates a new StartCamera. + * + * @param camera The camera to start. + */ public StartCamera(Camera camera) { this.camera = camera; addRequirements(camera); diff --git a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOriented.java b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOriented.java index d8dc305f..c15e25cb 100644 --- a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOriented.java +++ b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOriented.java @@ -21,6 +21,7 @@ public class SetDrivePerspectiveFieldOriented extends Command { /** Creates a new SetDrivePerspectiveFieldOriented. */ private Drive drive; + /** Creates a new SetDrivePerspectiveFieldOriented */ public SetDrivePerspectiveFieldOriented() { this.drive = RobotContainer.drive; addRequirements(drive); diff --git a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOrientedHeadingSnapping.java b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOrientedHeadingSnapping.java index 1bb55177..db7eff2b 100644 --- a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOrientedHeadingSnapping.java +++ b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOrientedHeadingSnapping.java @@ -21,6 +21,7 @@ public class SetDrivePerspectiveFieldOrientedHeadingSnapping extends Command { /** Creates a new SetDrivePerspectiveFieldOriented. */ private Drive drive; + /** Creates a new SetDrivePerspectiveFieldOrientedHeadingSnapping. */ public SetDrivePerspectiveFieldOrientedHeadingSnapping() { this.drive = RobotContainer.drive; addRequirements(drive); diff --git a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java index 5397fd26..2475d5a3 100644 --- a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java +++ b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java @@ -21,6 +21,7 @@ public class SetDrivePerspectiveRobotOriented extends Command { /** Creates a new SetDrivePerspectiveFieldOriented. */ private Drive drive; + /** Creates a new SetDrivePerspectiveRobotOriented */ public SetDrivePerspectiveRobotOriented() { this.drive = RobotContainer.drive; addRequirements(drive); From 96ad7f9b30831744ac5c0269bd9d77dd4fe3b71b Mon Sep 17 00:00:00 2001 From: QuackitsQuinn Date: Wed, 27 Mar 2024 12:04:17 -0500 Subject: [PATCH 3/4] javadoc fixes --- src/main/java/frc/robot/Main.java | 8 +++----- src/main/java/frc/robot/Robot.java | 6 ++---- .../SetDrivePerspectiveFieldOrientedHeadingSnapping.java | 1 - .../commands/drive/SetDrivePerspectiveRobotOriented.java | 1 - src/main/java/frc/robot/subsystems/Drive.java | 4 ++-- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/main/java/frc/robot/Main.java b/src/main/java/frc/robot/Main.java index 74624cbd..102f1b00 100644 --- a/src/main/java/frc/robot/Main.java +++ b/src/main/java/frc/robot/Main.java @@ -13,15 +13,13 @@ import edu.wpi.first.wpilibj.RobotBase; -/** - * The robots entrypoint. You Probably don't want to put code here. You might be looking for {@link - * frc.robot.RobotContainer} - */ +// Hey! You probably don't want to put code here! Your might looking for RobotContainer. +/** The robot's entrypoint. */ public final class Main { private Main() {} /** - * The entrypoint for the robot. You almost certainly don't want to put code here are. + * The entrypoint for the robot. * * @param args The args passed from the RoboRIO */ diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index e03b25eb..6c074a7e 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -15,10 +15,8 @@ import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; -/** - * The core of robot code. You Probably don't want to put code here. You might be looking for {@link - * frc.robot.RobotContainer} - */ +// Hey! You probably don't want to put code here! Your might looking for RobotContainer. +/** The core of robot code. Runs our command based robot structure. */ public class Robot extends TimedRobot { private Command autonomousCommand; diff --git a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOrientedHeadingSnapping.java b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOrientedHeadingSnapping.java index db7eff2b..61faf250 100644 --- a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOrientedHeadingSnapping.java +++ b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveFieldOrientedHeadingSnapping.java @@ -18,7 +18,6 @@ /** Sets the current drive perspective to field oriented with heading snapping. */ public class SetDrivePerspectiveFieldOrientedHeadingSnapping extends Command { - /** Creates a new SetDrivePerspectiveFieldOriented. */ private Drive drive; /** Creates a new SetDrivePerspectiveFieldOrientedHeadingSnapping. */ diff --git a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java index 2475d5a3..8c9da91e 100644 --- a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java +++ b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java @@ -18,7 +18,6 @@ /** Sets the current drive perspective to robot oriented. */ public class SetDrivePerspectiveRobotOriented extends Command { - /** Creates a new SetDrivePerspectiveFieldOriented. */ private Drive drive; /** Creates a new SetDrivePerspectiveRobotOriented */ diff --git a/src/main/java/frc/robot/subsystems/Drive.java b/src/main/java/frc/robot/subsystems/Drive.java index 8a2f87f5..fbc40b11 100644 --- a/src/main/java/frc/robot/subsystems/Drive.java +++ b/src/main/java/frc/robot/subsystems/Drive.java @@ -183,9 +183,9 @@ public void setDriveMode(String driveMode) { } /** - * Returns the heading of the robot + * Returns the heading of the robot. * - * @return the heading of the robot + * @return The heading of the robot. */ public Rotation2d getHeading() { return drive.getPose().getRotation(); From bf641813bd60039f81719650a2a7e033bf772098 Mon Sep 17 00:00:00 2001 From: QuackitsQuinn Date: Wed, 27 Mar 2024 17:16:21 -0500 Subject: [PATCH 4/4] fix comments --- src/main/java/frc/robot/Main.java | 2 +- src/main/java/frc/robot/Robot.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/Main.java b/src/main/java/frc/robot/Main.java index 102f1b00..9b6b5655 100644 --- a/src/main/java/frc/robot/Main.java +++ b/src/main/java/frc/robot/Main.java @@ -13,7 +13,7 @@ import edu.wpi.first.wpilibj.RobotBase; -// Hey! You probably don't want to put code here! Your might looking for RobotContainer. +/* Hey! You probably don't want to put code here! Your might looking for RobotContainer. */ /** The robot's entrypoint. */ public final class Main { private Main() {} diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index 6c074a7e..ff284345 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -15,7 +15,7 @@ import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; -// Hey! You probably don't want to put code here! Your might looking for RobotContainer. +/* Hey! You probably don't want to put code here! Your might looking for RobotContainer. */ /** The core of robot code. Runs our command based robot structure. */ public class Robot extends TimedRobot { private Command autonomousCommand;