diff --git a/.classpath b/.classpath
index d0fbb01..2285bed 100644
--- a/.classpath
+++ b/.classpath
@@ -9,10 +9,5 @@
Miscellaneous functions that are needed for PARTsLib. + */ public class RobotUtils { private static Alliance alliance; + /** + * Check if the robot is on the blue alliance. + * + * @return True if the robot is on the blue alliance, else false. + */ public static boolean isBlue() { return alliance == Alliance.Blue; } + /** + * Check if the robot is real or in sim. + * + * @return True if real, else false. + */ public static boolean isReal() { RuntimeType runtimeType = RobotBase.getRuntimeType(); return runtimeType == RuntimeType.kRoboRIO || runtimeType == RuntimeType.kRoboRIO2; } + /** Get the alliance the robot is currently on. */ public void getAlliance() { if (DriverStation.getAlliance().isPresent()) { alliance = DriverStation.getAlliance().get(); diff --git a/src/org/parts3492/partslib/command/IPARTsSubsystem.java b/src/org/parts3492/partslib/command/IPARTsSubsystem.java index 555a5f9..cdf5b1f 100644 --- a/src/org/parts3492/partslib/command/IPARTsSubsystem.java +++ b/src/org/parts3492/partslib/command/IPARTsSubsystem.java @@ -7,6 +7,7 @@ import edu.wpi.first.util.sendable.Sendable; import edu.wpi.first.wpilibj2.command.Subsystem; +/** PARTsSubsystem Interface. The base subsystem class for PARTs. */ public interface IPARTsSubsystem extends Subsystem, Sendable { public void outputTelemetry(); diff --git a/src/org/parts3492/partslib/command/PARTsCommandUtils.java b/src/org/parts3492/partslib/command/PARTsCommandUtils.java index beafdc5..e54c507 100644 --- a/src/org/parts3492/partslib/command/PARTsCommandUtils.java +++ b/src/org/parts3492/partslib/command/PARTsCommandUtils.java @@ -6,9 +6,16 @@ import edu.wpi.first.wpilibj2.command.Command; -/** Add your docs here. */ +/** Command Utilities for PARTs. */ public class PARTsCommandUtils { + /** + * Set the given command's name. + * + * @param name The name to set the command. + * @param c The target command. + * @return The modified command with the given name. + */ public static Command setCommandName(String name, Command c) { c.setName(name); return c; diff --git a/src/org/parts3492/partslib/command/PARTsSubsystem.java b/src/org/parts3492/partslib/command/PARTsSubsystem.java index d539c33..6b80d60 100644 --- a/src/org/parts3492/partslib/command/PARTsSubsystem.java +++ b/src/org/parts3492/partslib/command/PARTsSubsystem.java @@ -37,8 +37,8 @@ public PARTsSubsystem() { * *
Comes with instances of PARTs tools that use the "Generic" name. * - * @param enableLogging Enable the {@link org.parts3492.partslib.PARTsLogger} instance for this - * subsystem. + * @param enableLogging Enable the {@link org.parts3492.partslib.PARTsLogger PARTsLogger} + * instance for this subsystem. */ public PARTsSubsystem(boolean enableLogging) { partsNT = new PARTsNT(this.getName()); @@ -65,8 +65,8 @@ public PARTsSubsystem(Object o) { *
Comes with instances of PARTs tools that use given class name. * * @param o The object that the subsystem will use for the name. - * @param enableLogging Enable the {@link org.parts3492.partslib.PARTsLogger} instance for this - * subsystem. + * @param enableLogging Enable the {@link org.parts3492.partslib.PARTsLogger PARTsLogger} + * instance for this subsystem. */ public PARTsSubsystem(Object o, boolean enableLogging) { partsNT = new PARTsNT(o); @@ -93,8 +93,8 @@ public PARTsSubsystem(String className) { *
Comes with instances of PARTs tools that use given class name. * * @param className The name that this subsystem should use as it's name. - * @param enableLogging Enable the {@link org.parts3492.partslib.PARTsLogger} instance for this - * subsystem. + * @param enableLogging Enable the {@link org.parts3492.partslib.PARTsLogger PARTsLogger} + * instance for this subsystem. */ public PARTsSubsystem(String className, boolean enableLogging) { partsNT = new PARTsNT(className); diff --git a/src/org/parts3492/partslib/input/PARTsCommandController.java b/src/org/parts3492/partslib/input/PARTsCommandController.java index 33bde2c..27fbe07 100644 --- a/src/org/parts3492/partslib/input/PARTsCommandController.java +++ b/src/org/parts3492/partslib/input/PARTsCommandController.java @@ -24,6 +24,15 @@ public class PARTsCommandController { private CommandJoystick joystick; private String err_msg = ""; + /** + * Create a new PARTsCommandController + * + * @param port The controller port. + * @param disableAutomaticDetection This will default the controller to {@link + * PARTsController.ControllerType#OTHER ControllerType.OTHER} if disabled. Refer to {@link + * #PARTsCommandController(int, ControllerType) PARTsCommandController(port, + * ControllerType)} for setting the desired controller type. + */ public PARTsCommandController(int port, boolean disableAutomaticDetection) { if (!disableAutomaticDetection) { if (DriverStation.getJoystickIsXbox(port)) { @@ -42,6 +51,12 @@ public PARTsCommandController(int port, boolean disableAutomaticDetection) { initialize(port); } + /** + * Create a new PARTsCommandController + * + * @param port The controller port. + * @param controllerType The desired controller type. + */ public PARTsCommandController(int port, ControllerType controllerType) { this.controllerType = controllerType; initialize(port);