From 6cbf6a9b5db03519a834222f5e1ad16ce3953712 Mon Sep 17 00:00:00 2001 From: HFocus Date: Sun, 7 Jul 2019 11:14:24 -0600 Subject: [PATCH] added some class comments --- .../main/java/org/usfirst/frc4388/robot/Constants.java | 6 ++---- 2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java | 8 ++++---- .../src/main/java/org/usfirst/frc4388/robot/Robot.java | 5 ++++- .../src/main/java/org/usfirst/frc4388/robot/RobotMap.java | 5 +++-- .../java/org/usfirst/frc4388/robot/subsystems/Arm.java | 5 +++++ .../org/usfirst/frc4388/robot/subsystems/BallIntake.java | 4 +--- .../org/usfirst/frc4388/robot/subsystems/Climber.java | 5 +++-- 7 files changed, 22 insertions(+), 16 deletions(-) diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/Constants.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/Constants.java index d86f53c..66259b1 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/Constants.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/Constants.java @@ -1,12 +1,10 @@ - package org.usfirst.frc4388.robot; - /** * A list of constants used by the rest of the robot code. This include physics - * constants as well as constants determined through calibrations. + * constants as well as constants determined through calibrations. Most late stage ajustments + * ideally should be made here. */ - public class Constants { public static double kLooperDt = 0.01; public static double kDriveWheelDiameterInches = 6.04; diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java index e439dc6..f7a68f7 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java @@ -1,6 +1,3 @@ - - - package org.usfirst.frc4388.robot; import buttons.XBoxTriggerButton; @@ -28,7 +25,10 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import jaci.pathfinder.Pathfinder; - +/** + * Maps controler buttons to specific commands. Any controller will work but we + * use Xbox One controllers for our naming scheme. + */ public class OI { private static OI instance; diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/Robot.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/Robot.java index 2171131..31c3ad2 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/Robot.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/Robot.java @@ -1,4 +1,3 @@ - package org.usfirst.frc4388.robot; import edu.wpi.first.wpilibj.IterativeRobot; @@ -24,6 +23,10 @@ import org.usfirst.frc4388.robot.subsystems.Drive; import org.usfirst.frc4388.robot.subsystems.Drive.DriveControlMode;; +/** + * Initialises all the subsystems and directs which processes to + * run during autonomous and periodic modes + */ public class Robot extends TimedRobot { diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/RobotMap.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/RobotMap.java index e7a1a21..f13fd84 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/RobotMap.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/RobotMap.java @@ -1,7 +1,8 @@ - package org.usfirst.frc4388.robot; - +/** + * Defines each input/output id on the robot. + */ public class RobotMap { // USB Port IDs public static final int DRIVER_JOYSTICK_1_USB_ID = 0; diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Arm.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Arm.java index 44027e0..b908bdd 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Arm.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Arm.java @@ -1,4 +1,5 @@ package org.usfirst.frc4388.robot.subsystems; + import java.util.ArrayList; import org.usfirst.frc4388.robot.Constants; @@ -37,6 +38,10 @@ import edu.wpi.first.wpilibj.command.Subsystem; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj.Timer; +/** + * Controls a single joint arm. Uses a joystick to change a MM or PID target position for the arm, + * and uses the d-pad on the opperator controller to move the arm and wrist to preset positions. + */ public class Arm extends Subsystem implements ControlLoopable { private static Arm instance; diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/BallIntake.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/BallIntake.java index 483cc62..a238e3e 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/BallIntake.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/BallIntake.java @@ -12,10 +12,8 @@ import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; import com.ctre.phoenix.motorcontrol.ControlMode; import com.ctre.phoenix.motorcontrol.FeedbackDevice; - - /** - * + * Configuires the commands for a wheel based ball intake. */ public class BallIntake extends Subsystem { diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java index ed8966d..5a2d143 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java @@ -32,9 +32,10 @@ import com.ctre.phoenix.motorcontrol.NeutralMode; import com.ctre.phoenix.motorcontrol.SensorCollection; import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; - /** - * + * Controls an extending leg based climber. Buttons control the flipping of the + * rachets and the safety switch that keeps the legs from moving unexpectedly. + * The right trigger controls the speed of the climb. */ public class Climber extends Subsystem{