mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +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:
@@ -25,6 +25,8 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
* and derivative calculations. Therefore, the sample rate affects the controller's behavior for a
|
||||
* given set of PID constants.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated All APIs which use this have been deprecated.
|
||||
*/
|
||||
@Deprecated(since = "2020", forRemoval = true)
|
||||
|
||||
@@ -16,6 +16,8 @@ import edu.wpi.first.util.sendable.SendableBuilder;
|
||||
* and derivative calculations. Therefore, the sample rate affects the controller's behavior for a
|
||||
* given set of PID constants.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use {@link edu.wpi.first.math.controller.PIDController} instead.
|
||||
*/
|
||||
@Deprecated(since = "2020", forRemoval = true)
|
||||
|
||||
@@ -4,6 +4,13 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
/**
|
||||
* Interface for PID Controller.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated All APIs which use this have been deprecated.
|
||||
*/
|
||||
@Deprecated(since = "2020", forRemoval = true)
|
||||
@SuppressWarnings("SummaryJavadoc")
|
||||
public interface PIDInterface {
|
||||
|
||||
@@ -7,6 +7,8 @@ package edu.wpi.first.wpilibj;
|
||||
/**
|
||||
* This interface allows PIDController to write it's results to its output.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use DoubleConsumer and new PIDController class.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
|
||||
@@ -7,6 +7,8 @@ package edu.wpi.first.wpilibj;
|
||||
/**
|
||||
* This interface allows for PIDController to automatically read from this object.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use DoubleSupplier and new PIDController class.
|
||||
*/
|
||||
@Deprecated(since = "2020", forRemoval = true)
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
/** A description for the type of output value to provide to a PIDController. */
|
||||
/**
|
||||
* A description for the type of output value to provide to a PIDController.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
@Deprecated(since = "2020", forRemoval = true)
|
||||
public enum PIDSourceType {
|
||||
kDisplacement,
|
||||
|
||||
@@ -15,6 +15,8 @@ import edu.wpi.first.wpilibj.command.Command;
|
||||
* <p>This class represents a subclass of Trigger that is specifically aimed at buttons on an
|
||||
* operator interface as a common use case of the more generalized Trigger objects. This is a simple
|
||||
* wrapper around Trigger with the method names renamed to fit the Button object use.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
public abstract class Button extends Trigger {
|
||||
/**
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
package edu.wpi.first.wpilibj.buttons;
|
||||
|
||||
/**
|
||||
* This class is intended to be used within a program. The programmer can manually set its value.
|
||||
* Also includes a setting for whether or not it should invert its value.
|
||||
* This {@link Button} is intended to be used within a program. The programmer can manually set its
|
||||
* value. * Also includes a setting for whether or not it should invert its value.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
public class InternalButton extends Button {
|
||||
private boolean m_pressed;
|
||||
|
||||
@@ -6,7 +6,11 @@ package edu.wpi.first.wpilibj.buttons;
|
||||
|
||||
import edu.wpi.first.wpilibj.GenericHID;
|
||||
|
||||
/** A {@link Button} that gets its state from a {@link GenericHID}. */
|
||||
/**
|
||||
* A {@link Button} that gets its state from a {@link GenericHID}.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
public class JoystickButton extends Button {
|
||||
private final GenericHID m_joystick;
|
||||
private final int m_buttonNumber;
|
||||
|
||||
@@ -8,7 +8,11 @@ import edu.wpi.first.networktables.NetworkTable;
|
||||
import edu.wpi.first.networktables.NetworkTableEntry;
|
||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||
|
||||
/** A {@link Button} that uses a {@link NetworkTable} boolean field. */
|
||||
/**
|
||||
* A {@link Button} that uses a {@link NetworkTable} boolean field.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
public class NetworkButton extends Button {
|
||||
private final NetworkTableEntry m_entry;
|
||||
|
||||
|
||||
@@ -6,7 +6,11 @@ package edu.wpi.first.wpilibj.buttons;
|
||||
|
||||
import edu.wpi.first.wpilibj.GenericHID;
|
||||
|
||||
/** A {@link Button} that gets its state from a POV on a {@link GenericHID}. */
|
||||
/**
|
||||
* A {@link Button} that gets its state from a POV on a {@link GenericHID}.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
public class POVButton extends Button {
|
||||
private final GenericHID m_joystick;
|
||||
private final int m_angle;
|
||||
|
||||
@@ -19,6 +19,8 @@ import edu.wpi.first.wpilibj.command.Scheduler;
|
||||
* (for instance, if they want to react to the user holding a button while the robot is reading a
|
||||
* certain sensor input). For this, they only have to write the {@link Trigger#get()} method to get
|
||||
* the full functionality of the Trigger class.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
public abstract class Trigger implements Sendable {
|
||||
private volatile boolean m_sendablePressed;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -12,6 +12,8 @@ import edu.wpi.first.wpilibj.PIDSourceType;
|
||||
/**
|
||||
* Wrapper so that PIDSource is implemented for AnalogAccelerometer for old PIDController.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use {@link edu.wpi.first.math.controller.PIDController} which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,8 @@ import edu.wpi.first.wpilibj.PIDSourceType;
|
||||
/**
|
||||
* Wrapper so that PIDSource is implemented for AnalogGyro for old PIDController.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use {@link edu.wpi.first.math.controller.PIDController} which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -11,6 +11,8 @@ import edu.wpi.first.wpilibj.PIDSourceType;
|
||||
/**
|
||||
* Wrapper so that PIDSource is implemented for AnalogInput for old PIDController.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use {@link edu.wpi.first.math.controller.PIDController} which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,8 @@ import edu.wpi.first.wpilibj.PIDSourceType;
|
||||
/**
|
||||
* Wrapper so that PIDSource is implemented for AnalogPotentiometer for old PIDController.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use {@link edu.wpi.first.math.controller.PIDController} which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,8 @@ import edu.wpi.first.wpilibj.PIDSourceType;
|
||||
/**
|
||||
* Wrapper so that PIDSource is implemented for Encoder for old PIDController.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use {@link edu.wpi.first.math.controller.PIDController} which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,8 @@ import edu.wpi.first.wpilibj.motorcontrol.MotorController;
|
||||
/**
|
||||
* Wrapper so that PIDOutput is implemented for MotorController for old PIDController.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use {@link edu.wpi.first.math.controller.PIDController} which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,8 @@ import edu.wpi.first.wpilibj.Ultrasonic;
|
||||
/**
|
||||
* Wrapper so that PIDSource is implemented for Ultrasonic for old PIDController.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use {@link edu.wpi.first.math.controller.PIDController} which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user