Skip to content

Commit

Permalink
Merge pull request #71 from frc937/auto-drive-javadoc
Browse files Browse the repository at this point in the history
Add the doc of the java variety to auto drive commands
  • Loading branch information
quackitsquinn authored Feb 20, 2024
2 parents 743ee72 + 62b10d8 commit 6a52f55
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,22 @@
import frc.robot.RobotContainer;
import frc.robot.subsystems.Drive;

/** Drives the robot field oriented autonomously. */
public class DriveAutoFieldOriented extends Command {
private Drive drive;
private Translation2d destination;
private double rotation;

/** Creates a new DriveAuto. */
public DriveAutoFieldOriented(Translation2d destination, double rotation) {
/**
* Creates a new DriveAutoFieldOriented.
*
* @param translation The velocities for the robot to drive while the command is running
* @param rotation The rotation velocity of the robot while the command is running.
*/
public DriveAutoFieldOriented(Translation2d translation, double rotation) {
this.drive = RobotContainer.drive;
addRequirements(this.drive);
this.destination = destination;
this.destination = translation;
this.rotation = rotation;
// Use addRequirements() here to declare subsystem dependencies.
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,22 @@
import frc.robot.RobotContainer;
import frc.robot.subsystems.Drive;

/** Drives the robot field robot autonomously. */
public class DriveAutoRobotOriented extends Command {
private Drive drive;
private Translation2d destination;
private double rotation;

/** Creates a new DriveAuto. */
public DriveAutoRobotOriented(Translation2d destination, double rotation) {
/**
* Creates a new DriveAutoRobotOriented.
*
* @param translation The velocities for the robot to drive while the command is running
* @param rotation The rotation velocity of the robot while the command is running.
*/
public DriveAutoRobotOriented(Translation2d translation, double rotation) {
this.drive = RobotContainer.drive;
addRequirements(this.drive);
this.destination = destination;
this.destination = translation;
this.rotation = rotation;
// Use addRequirements() here to declare subsystem dependencies.
}
Expand Down

0 comments on commit 6a52f55

Please sign in to comment.