mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
[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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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}. */
|
||||
|
||||
@@ -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}. */
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user