From ee18ab2b35f6f916b714641d74b8d7089ffd7651 Mon Sep 17 00:00:00 2001 From: QuackitsQuinn Date: Tue, 20 Feb 2024 15:55:53 -0600 Subject: [PATCH 1/2] add the doc of the java variety to auto drive commands --- .../frc/robot/commands/auto/DriveAutoFieldOriented.java | 8 +++++++- .../frc/robot/commands/auto/DriveAutoRobotOriented.java | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/commands/auto/DriveAutoFieldOriented.java b/src/main/java/frc/robot/commands/auto/DriveAutoFieldOriented.java index 589b8b09..6b7d5a0f 100644 --- a/src/main/java/frc/robot/commands/auto/DriveAutoFieldOriented.java +++ b/src/main/java/frc/robot/commands/auto/DriveAutoFieldOriented.java @@ -16,12 +16,18 @@ 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. */ + /** + * Creates a new DriveAutoFieldOriented. + * + * @param destination The destination for the robot. + * @param rotation The rotation of the robot. + */ public DriveAutoFieldOriented(Translation2d destination, double rotation) { this.drive = RobotContainer.drive; addRequirements(this.drive); diff --git a/src/main/java/frc/robot/commands/auto/DriveAutoRobotOriented.java b/src/main/java/frc/robot/commands/auto/DriveAutoRobotOriented.java index e54b7601..77c7b1e9 100644 --- a/src/main/java/frc/robot/commands/auto/DriveAutoRobotOriented.java +++ b/src/main/java/frc/robot/commands/auto/DriveAutoRobotOriented.java @@ -16,12 +16,18 @@ 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. */ + /** + * Creates a new DriveAutoFieldOriented. + * + * @param destination The destination for the robot. + * @param rotation The rotation of the robot. + */ public DriveAutoRobotOriented(Translation2d destination, double rotation) { this.drive = RobotContainer.drive; addRequirements(this.drive); From 62b10d878fab226b3a4ba32d0a2501e904263b36 Mon Sep 17 00:00:00 2001 From: QuackitsQuinn Date: Tue, 20 Feb 2024 16:03:23 -0600 Subject: [PATCH 2/2] fix java of the doc wording --- .../robot/commands/auto/DriveAutoFieldOriented.java | 8 ++++---- .../robot/commands/auto/DriveAutoRobotOriented.java | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/frc/robot/commands/auto/DriveAutoFieldOriented.java b/src/main/java/frc/robot/commands/auto/DriveAutoFieldOriented.java index 6b7d5a0f..e42a6fdb 100644 --- a/src/main/java/frc/robot/commands/auto/DriveAutoFieldOriented.java +++ b/src/main/java/frc/robot/commands/auto/DriveAutoFieldOriented.java @@ -25,13 +25,13 @@ public class DriveAutoFieldOriented extends Command { /** * Creates a new DriveAutoFieldOriented. * - * @param destination The destination for the robot. - * @param rotation The rotation of the robot. + * @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 destination, double rotation) { + 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. } diff --git a/src/main/java/frc/robot/commands/auto/DriveAutoRobotOriented.java b/src/main/java/frc/robot/commands/auto/DriveAutoRobotOriented.java index 77c7b1e9..1cb65085 100644 --- a/src/main/java/frc/robot/commands/auto/DriveAutoRobotOriented.java +++ b/src/main/java/frc/robot/commands/auto/DriveAutoRobotOriented.java @@ -23,15 +23,15 @@ public class DriveAutoRobotOriented extends Command { private double rotation; /** - * Creates a new DriveAutoFieldOriented. + * Creates a new DriveAutoRobotOriented. * - * @param destination The destination for the robot. - * @param rotation The rotation of the robot. + * @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 destination, double rotation) { + 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. }