diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index d52b23e..4131d4b 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -94,14 +94,16 @@ public class RobotContainer { } /** - * Add your docs here. + * Used for analog inputs like triggers and axises. + * @return IHandController interface for the Driver Controller. */ public IHandController getDriverController() { return m_driverXbox; } /** - * Add your docs here. + * Used for analog inputs like triggers and axises. + * @return The IHandController interface for the Operator Controller. */ public IHandController getOperatorController() { @@ -109,7 +111,9 @@ public class RobotContainer { } /** - * Add your docs here. + * Gets the {@link edu.wpi.first.wpilibj.GenericHID#GenericHID(int) Generic HID} for the Operator Xbox Controller. + * Generic HIDs/Joysticks can be used to set up JoystickButtons. + * @return The IHandController interface for the Operator Controller. */ public Joystick getOperatorJoystick() { @@ -117,7 +121,9 @@ public class RobotContainer { } /** - * Add your docs here. + * Gets the {@link edu.wpi.first.wpilibj.GenericHID#GenericHID(int) Generic HID} for the Driver Xbox Controller. + * Generic HIDs/Joysticks can be used to set up JoystickButtons. + * @return The IHandController interface for the Driver Controller. */ public Joystick getDriverJoystick() { diff --git a/src/main/java/frc4388/robot/commands/DriveWithJoystick.java b/src/main/java/frc4388/robot/commands/DriveWithJoystick.java index 2b31457..e663fdb 100644 --- a/src/main/java/frc4388/robot/commands/DriveWithJoystick.java +++ b/src/main/java/frc4388/robot/commands/DriveWithJoystick.java @@ -16,7 +16,12 @@ public class DriveWithJoystick extends CommandBase { private IHandController m_controller; /** - * Creates a new DriveWithJoystick. + * Creates a new DriveWithJoystick to control the drivetrain with an Xbox controller. + * Applies a curved ramp to the input from the controllers to make the robot less "touchy". + * @param subsystem pass the Drive subsystem from {@link frc4388.robot.RobotContainer#RobotContainer() RobotContainer} + * @param controller pass the Driver {@link frc4388.utility.controller.IHandController#getClass() IHandController} using the + * {@link frc4388.robot.RobotContainer#getDriverJoystick() getDriverJoystick()} method in + * {@link frc4388.robot.RobotContainer#RobotContainer() RobotContainer} */ public DriveWithJoystick(Drive subsystem, IHandController controller) { // Use addRequirements() here to declare subsystem dependencies. diff --git a/src/main/java/frc4388/robot/commands/RunIntakeWithTriggers.java b/src/main/java/frc4388/robot/commands/RunIntakeWithTriggers.java index 359ea0e..bb7cef2 100644 --- a/src/main/java/frc4388/robot/commands/RunIntakeWithTriggers.java +++ b/src/main/java/frc4388/robot/commands/RunIntakeWithTriggers.java @@ -16,9 +16,12 @@ public class RunIntakeWithTriggers extends CommandBase { private IHandController m_controller; /** - * Uses input from opperator triggers to control intake motor - * @param subsystem the intake subsystem - * @param controller the operator controller + * Uses input from opperator triggers to control intake motor. + * The right trigger will run the intake in and the left trigger will run it out. + * @param subsystem pass the Intake subsystem from {@link frc4388.robot.RobotContainer#RobotContainer() RobotContainer} + * @param controller pass the Operator {@link frc4388.utility.controller.IHandController#getClass() IHandController} using the + * {@link frc4388.robot.RobotContainer#getOperatorJoystick() getOperatorJoystick()} method in + * {@link frc4388.robot.RobotContainer#RobotContainer() RobotContainer} */ public RunIntakeWithTriggers(Intake subsystem, IHandController controller) { // Use addRequirements() here to declare subsystem dependencies. @@ -43,7 +46,7 @@ public class RunIntakeWithTriggers extends CommandBase { output = rightTrigger; } if (leftTrigger > rightTrigger) { - output = leftTrigger; + output = -leftTrigger; } } else { output = rightTrigger; diff --git a/src/main/java/frc4388/robot/subsystems/Intake.java b/src/main/java/frc4388/robot/subsystems/Intake.java index f718cb6..ea2ba9c 100644 --- a/src/main/java/frc4388/robot/subsystems/Intake.java +++ b/src/main/java/frc4388/robot/subsystems/Intake.java @@ -28,7 +28,7 @@ public class Intake extends SubsystemBase { /** * Runs intake motor - * @param input the voltage to run motor at + * @param input the percent output to run motor at */ public void runIntake(double input) { m_intakeMotor.set(input); diff --git a/src/main/java/frc4388/robot/subsystems/LED.java b/src/main/java/frc4388/robot/subsystems/LED.java index a68c124..6ef70e5 100644 --- a/src/main/java/frc4388/robot/subsystems/LED.java +++ b/src/main/java/frc4388/robot/subsystems/LED.java @@ -14,17 +14,14 @@ import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc4388.robot.Constants.LEDConstants; import frc4388.utility.LEDPatterns; -/** - * Allows for the control of a 5v LED Strip using a Rev Robotics Blinkin LED - * Driver - */ public class LED extends SubsystemBase { public static float currentLED; public static Spark LEDController; /** - * Add your docs here. + * Creates a new LED to run a 5v LED Strip using a Rev + * Robotics Blinkin LED Driver */ public LED(){ LEDController = new Spark(LEDConstants.LED_SPARK_ID); @@ -34,14 +31,17 @@ public class LED extends SubsystemBase { } /** - * Add your docs here. + * Sends an update to the LED Driver with the current LED value. + * This method should be run continously to keep the lights on. */ public void updateLED(){ LEDController.set(currentLED); } /** - * Add your docs here. + * Sets the current LED pattern. This method should only be run + * whenever you want to change the current LED. + * @param pattern LEDPattern to set the Blinkin to. */ public void setPattern(LEDPatterns pattern){ currentLED = pattern.getValue(); diff --git a/src/main/java/frc4388/utility/LEDPatterns.java b/src/main/java/frc4388/utility/LEDPatterns.java index 6df032c..8c98acc 100644 --- a/src/main/java/frc4388/utility/LEDPatterns.java +++ b/src/main/java/frc4388/utility/LEDPatterns.java @@ -1,7 +1,8 @@ package frc4388.utility; /** - * Add your docs here. + * Enum to hold all the different patterns for a Blinkin LED Driver. + * Use in place of a double when setting the Blinkin output. */ public enum LEDPatterns { /* PALLETTE PATTERNS */ diff --git a/src/main/java/frc4388/utility/controller/IHandController.java b/src/main/java/frc4388/utility/controller/IHandController.java index 13aa763..b54333c 100644 --- a/src/main/java/frc4388/utility/controller/IHandController.java +++ b/src/main/java/frc4388/utility/controller/IHandController.java @@ -1,7 +1,7 @@ package frc4388.utility.controller; /** - * Add your docs here. + * Interface for the {@link XboxController}. */ public interface IHandController { diff --git a/src/main/java/frc4388/utility/controller/XboxController.java b/src/main/java/frc4388/utility/controller/XboxController.java index 8b8f0f8..4353d1e 100644 --- a/src/main/java/frc4388/utility/controller/XboxController.java +++ b/src/main/java/frc4388/utility/controller/XboxController.java @@ -3,7 +3,7 @@ package frc4388.utility.controller; import edu.wpi.first.wpilibj.Joystick; /** - * This is a wrapper for the WPILib Joystick class that represents an XBox + * This is a wrapper for the WPILib Joystick class that represents an Xbox * controller. * @author frc1675 */ @@ -53,14 +53,15 @@ public class XboxController implements IHandController private Joystick m_stick; /** - * Add your docs here. - */ + * Creates a new Xbox Controller + * @param portNumber ID of Xbox Controller + */ public XboxController(int portNumber){ m_stick = new Joystick(portNumber); } /** - * Add your docs here. + * @return Joystick for Xbox Controller */ public Joystick getJoyStick() { return m_stick; diff --git a/src/main/java/frc4388/utility/controller/XboxTriggerButton.java b/src/main/java/frc4388/utility/controller/XboxTriggerButton.java index 26372c2..9c3cb2c 100644 --- a/src/main/java/frc4388/utility/controller/XboxTriggerButton.java +++ b/src/main/java/frc4388/utility/controller/XboxTriggerButton.java @@ -5,7 +5,7 @@ import frc4388.utility.controller.XboxController; /** * Mapping for the Xbox controller triggers to allow triggers to be defined as - * buttons in {@link frc4388.robot.OI}. Checks to see if the given trigger + * buttons in {@link frc4388.robot.RobotContainer RobotContainer}. Checks to see if the given trigger * exceeds a tolerance defined in {@link XboxController}. */ public class XboxTriggerButton extends Button { @@ -31,7 +31,6 @@ public class XboxTriggerButton extends Button { m_trigger = trigger; } - /** {@inheritDoc} */ @Override public boolean get() { if (m_trigger == RIGHT_TRIGGER) {