[commands] Update Command documentation (NFC) (#3881)

Add reference to which VendorDep the class is included in.
Add missing OldCommands C++ Documentation (copied from Java).
This commit is contained in:
sciencewhiz
2022-01-08 11:11:34 -08:00
committed by GitHub
parent b3707cca0b
commit 8ac45f20bb
146 changed files with 413 additions and 25 deletions

View File

@@ -32,6 +32,8 @@ import java.util.Enumeration;
* active command is not interruptible, the other one will not even be started, and the active one
* will continue functioning.
*
* <p>This class is provided by the OldCommands VendorDep
*
* @see Subsystem
* @see CommandGroup
* @see IllegalUseOfCommandException

View File

@@ -24,6 +24,8 @@ import java.util.Vector;
* <p>CommandGroups can also execute commands in parallel, simply by adding them using {@link
* CommandGroup#addParallel(Command) addParallel(...)}.
*
* <p>This class is provided by the OldCommands VendorDep
*
* @see Command
* @see Subsystem
* @see IllegalUseOfCommandException

View File

@@ -22,6 +22,8 @@ import java.util.Enumeration;
* <p>A ConditionalCommand will require the superset of subsystems of the onTrue and onFalse
* commands.
*
* <p>This class is provided by the OldCommands VendorDep
*
* @see Command
* @see Scheduler
*/

View File

@@ -13,6 +13,8 @@ package edu.wpi.first.wpilibj.command;
* <p>This exception should be thrown if (after a command has been locked) its requirements change,
* it is put into multiple command groups, it is started from outside its command group, or it adds
* a new child.
*
* <p>This class is provided by the OldCommands VendorDep
*/
@SuppressWarnings("serial")
public class IllegalUseOfCommandException extends RuntimeException {

View File

@@ -9,6 +9,8 @@ package edu.wpi.first.wpilibj.command;
*
* <p>Subclassing {@link InstantCommand} is shorthand for returning true from {@link Command
* isFinished}.
*
* <p>This class is provided by the OldCommands VendorDep
*/
public class InstantCommand extends Command {
private Runnable m_func;

View File

@@ -4,7 +4,11 @@
package edu.wpi.first.wpilibj.command;
/** An element that is in a LinkedList. */
/**
* An element that is in a LinkedList.
*
* <p>This class is provided by the OldCommands VendorDep
*/
class LinkedListElement {
private LinkedListElement m_next;
private LinkedListElement m_previous;

View File

@@ -16,6 +16,8 @@ import edu.wpi.first.wpilibj.PIDSourceType;
* <p>It provides some convenience methods to run an internal {@link PIDController} . It will also
* start and stop said {@link PIDController} when the {@link PIDCommand} is first initialized and
* ended/interrupted.
*
* <p>This class is provided by the OldCommands VendorDep
*/
public abstract class PIDCommand extends Command {
/** The internal {@link PIDController}. */

View File

@@ -16,6 +16,8 @@ import edu.wpi.first.wpilibj.PIDSourceType;
*
* <p>It provides some convenience methods to run an internal {@link PIDController} . It also allows
* access to the internal {@link PIDController} in order to give total control to the programmer.
*
* <p>This class is provided by the OldCommands VendorDep
*/
public abstract class PIDSubsystem extends Subsystem {
/** The internal {@link PIDController}. */

View File

@@ -8,6 +8,8 @@ package edu.wpi.first.wpilibj.command;
* A {@link PrintCommand} is a command which prints out a string when it is initialized, and then
* immediately finishes. It is useful if you want a {@link CommandGroup} to print out a string when
* it reaches a certain point.
*
* <p>This class is provided by the OldCommands VendorDep
*/
public class PrintCommand extends InstantCommand {
/** The message to print out. */

View File

@@ -28,6 +28,8 @@ import java.util.Vector;
* Scheduler#run() run()} often to have {@link Command Commands} function correctly. However, this
* is already done for you if you use the CommandBased Robot template.
*
* <p>This class is provided by the OldCommands VendorDep
*
* @see Command
*/
public final class Scheduler implements NTSendable, AutoCloseable {

View File

@@ -8,7 +8,11 @@ import java.util.Enumeration;
import java.util.Vector;
@SuppressWarnings("all")
/** A set. */
/**
* A set.
*
* <p>This class is provided by the OldCommands VendorDep
*/
class Set {
private Vector m_set = new Vector();

View File

@@ -7,6 +7,8 @@ package edu.wpi.first.wpilibj.command;
/**
* A {@link StartCommand} will call the {@link Command#start() start()} method of another command
* when it is initialized and will finish immediately.
*
* <p>This class is provided by the OldCommands VendorDep
*/
public class StartCommand extends InstantCommand {
/** The command to fork. */

View File

@@ -12,15 +12,17 @@ import java.util.Collections;
/**
* This class defines a major component of the robot.
*
* <p>A good example of a subsystem is the driveline, or a claw if the robot has one.
* <p>A good example of a subsystem is the drivetrain, or a claw if the robot has one.
*
* <p>All motors should be a part of a subsystem. For instance, all the wheel motors should be a
* part of some kind of "Driveline" subsystem.
* part of some kind of "Drivetrain" subsystem.
*
* <p>Subsystems are used within the command system as requirements for {@link Command}. Only one
* command which requires a subsystem can run at a time. Also, subsystems can have default commands
* which are started if there is no command running which requires this subsystem.
*
* <p>This class is provided by the OldCommands VendorDep
*
* @see Command
*/
public abstract class Subsystem implements Sendable, AutoCloseable {

View File

@@ -7,6 +7,8 @@ package edu.wpi.first.wpilibj.command;
/**
* A {@link TimedCommand} will wait for a timeout before finishing. {@link TimedCommand} is used to
* execute a command for a given amount of time.
*
* <p>This class is provided by the OldCommands VendorDep
*/
public class TimedCommand extends Command {
/**

View File

@@ -8,6 +8,8 @@ package edu.wpi.first.wpilibj.command;
* A {@link WaitCommand} will wait for a certain amount of time before finishing. It is useful if
* you want a {@link CommandGroup} to pause for a moment.
*
* <p>This class is provided by the OldCommands VendorDep
*
* @see CommandGroup
*/
public class WaitCommand extends TimedCommand {

View File

@@ -11,6 +11,8 @@ package edu.wpi.first.wpilibj.command;
*
* <p>This class is useful for the situation where you want to allow anything running in parallel to
* finish, before continuing in the main {@link CommandGroup} sequence.
*
* <p>This class is provided by the OldCommands VendorDep
*/
public class WaitForChildren extends Command {
@Override

View File

@@ -9,6 +9,8 @@ import edu.wpi.first.wpilibj.Timer;
/**
* WaitUntilCommand - waits until an absolute game time. This will wait until the game clock reaches
* some value, then continue to the next command.
*
* <p>This class is provided by the OldCommands VendorDep
*/
public class WaitUntilCommand extends Command {
private final double m_time;