Skip to content

Commit

Permalink
Merge pull request #172 from frc937/javadoc-fixes
Browse files Browse the repository at this point in the history
Javadoc fixes
  • Loading branch information
quackitsquinn authored Mar 28, 2024
2 parents 01e0889 + bf64181 commit de35519
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 8 deletions.
8 changes: 7 additions & 1 deletion src/main/java/frc/robot/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@

import edu.wpi.first.wpilibj.RobotBase;

/* Probably don't put code here, most likely put it in 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.
*
* @param args The args passed from the RoboRIO
*/
public static void main(String... args) {
RobotBase.startRobot(Robot::new);
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
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. */
/* 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;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

/*
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/commands/AimWithLimelight.java
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/frc/robot/commands/StartCamera.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

/** 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. */
public SetDrivePerspectiveFieldOrientedHeadingSnapping() {
this.drive = RobotContainer.drive;
addRequirements(drive);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

/** Sets the current drive perspective to robot oriented. */
public class SetDrivePerspectiveRobotOriented extends Command {
/** Creates a new SetDrivePerspectiveFieldOriented. */
private Drive drive;

/** Creates a new SetDrivePerspectiveRobotOriented */
public SetDrivePerspectiveRobotOriented() {
this.drive = RobotContainer.drive;
addRequirements(drive);
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/frc/robot/subsystems/Drive.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit de35519

Please sign in to comment.