mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +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.
|
||||
*/
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace frc {
|
||||
* in the integral and derivative calculations. Therefore, the sample rate
|
||||
* affects the controller's behavior for a given set of PID constants.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated All APIs which use this have been deprecated.
|
||||
*/
|
||||
class PIDBase : public PIDInterface,
|
||||
|
||||
@@ -30,6 +30,8 @@ class PIDOutput;
|
||||
* in the integral and derivative calculations. Therefore, the sample rate
|
||||
* affects the controller's behavior for a given set of PID constants.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use frc2::PIDController class instead.
|
||||
*/
|
||||
class PIDController : public PIDBase, public Controller {
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace frc {
|
||||
/**
|
||||
* Interface for PID Control Loop.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated All APIs which use this have been deprecated.
|
||||
*/
|
||||
class PIDInterface {
|
||||
|
||||
@@ -9,8 +9,10 @@ namespace frc {
|
||||
/**
|
||||
* PIDOutput interface is a generic output for the PID class.
|
||||
*
|
||||
* PWMs use this class. Users implement this interface to allow for a
|
||||
* PIDController to read directly from the inputs.
|
||||
* MotorControllers use this class. Users implement this interface to allow for
|
||||
* a PIDController to read directly from the inputs.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class PIDOutput {
|
||||
public:
|
||||
|
||||
@@ -13,6 +13,8 @@ enum class PIDSourceType { kDisplacement, kRate };
|
||||
*
|
||||
* All sensors that can be used with the PID class will implement the PIDSource
|
||||
* that returns a standard value that will be used in the PID code.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class PIDSource {
|
||||
public:
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace frc {
|
||||
* 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.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class Button : public Trigger {
|
||||
public:
|
||||
|
||||
@@ -8,6 +8,13 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* This 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.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class InternalButton : public Button {
|
||||
public:
|
||||
InternalButton() = default;
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* A Button} that gets its state from a GenericHID.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class JoystickButton : public Button {
|
||||
public:
|
||||
JoystickButton(GenericHID* joystick, int buttonNumber);
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* A that uses a NetworkTable boolean field.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class NetworkButton : public Button {
|
||||
public:
|
||||
NetworkButton(std::string_view tableName, std::string_view field);
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
#include "frc/buttons/Button.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* A Button that gets its state from a POV on a GenericHID.
|
||||
*
|
||||
* <p>This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class POVButton : public Button {
|
||||
public:
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,8 @@ class Command;
|
||||
* a button while the robot is reading a certain sensor input). For this, they
|
||||
* only have to write the Trigger::Get() method to get the full functionality of
|
||||
* the Trigger class.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class Trigger : public wpi::Sendable, public wpi::SendableHelper<Trigger> {
|
||||
public:
|
||||
|
||||
@@ -40,6 +40,8 @@ class CommandGroup;
|
||||
* other one will not even be started, and the active one will continue
|
||||
* functioning.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
* *
|
||||
* @see CommandGroup
|
||||
* @see Subsystem
|
||||
*/
|
||||
|
||||
@@ -28,6 +28,8 @@ namespace frc {
|
||||
* CommandGroups can also execute commands in parallel, simply by adding them
|
||||
* using AddParallel().
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @see Command
|
||||
* @see Subsystem
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace frc {
|
||||
* A ConditionalCommand will require the superset of subsystems of the onTrue
|
||||
* and onFalse commands.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @see Command
|
||||
* @see Scheduler
|
||||
*/
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace frc {
|
||||
* This command will execute once, then finish immediately afterward.
|
||||
*
|
||||
* Subclassing InstantCommand is shorthand for returning true from IsFinished().
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class InstantCommand : public Command {
|
||||
public:
|
||||
|
||||
@@ -14,6 +14,15 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* This class defines aCommand which interacts heavily with a PID loop.
|
||||
*
|
||||
* It provides some convenience methods to run an internal PIDController . It
|
||||
* will also start and stop said PIDController when the PIDCommand is first
|
||||
* initialized and ended/interrupted.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class PIDCommand : public Command, public PIDOutput, public PIDSource {
|
||||
public:
|
||||
PIDCommand(std::string_view name, double p, double i, double d);
|
||||
|
||||
@@ -22,6 +22,8 @@ namespace frc {
|
||||
* It provides some convenience methods to run an internal PIDController. It
|
||||
* also allows access to the internal PIDController in order to give total
|
||||
* control to the programmer.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class PIDSubsystem : public Subsystem, public PIDOutput, public PIDSource {
|
||||
public:
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* A PrintCommand is a command which prints out a string when it is initialized,
|
||||
* and then immediately finishes. It is useful if you want a CommandGroup to
|
||||
* print out a string when it reaches a certain point.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class PrintCommand : public InstantCommand {
|
||||
public:
|
||||
explicit PrintCommand(std::string_view message);
|
||||
|
||||
@@ -15,6 +15,18 @@ class ButtonScheduler;
|
||||
class Command;
|
||||
class Subsystem;
|
||||
|
||||
/**
|
||||
* The Scheduler is a singleton which holds the top-level running commands. It
|
||||
* is in charge of both calling the command's run() method and to make sure that
|
||||
* there are no two commands with conflicting requirements running.
|
||||
*
|
||||
* It is fine if teams wish to take control of the Scheduler themselves, all
|
||||
* that needs to be done is to call frc::Scheduler::getInstance()->run() often
|
||||
* to have Commands function correctly. However, this is already done for you if
|
||||
* you use the CommandBased Robot template.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class Scheduler : public nt::NTSendable, public wpi::SendableHelper<Scheduler> {
|
||||
public:
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,13 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* A PrintCommand is a command which prints out a string when it is initialized,
|
||||
* and then immediately finishes. It is useful if you want a CommandGroup to
|
||||
* print out a string when it reaches a certain point.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class StartCommand : public InstantCommand {
|
||||
public:
|
||||
explicit StartCommand(Command* commandToStart);
|
||||
|
||||
@@ -15,6 +15,22 @@ namespace frc {
|
||||
|
||||
class Command;
|
||||
|
||||
/**
|
||||
* This class defines a major component of the robot.
|
||||
*
|
||||
* A good example of a subsystem is the drivetrain, or a claw if the robot has
|
||||
* one.
|
||||
*
|
||||
* All motors should be a part of a subsystem. For instance, all the wheel
|
||||
* motors should be a part of some kind of "Drivetrain" subsystem.
|
||||
*
|
||||
* Subsystems are used within the command system as requirements for 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.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class Subsystem : public wpi::Sendable, public wpi::SendableHelper<Subsystem> {
|
||||
friend class Scheduler;
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace frc {
|
||||
* A TimedCommand will wait for a timeout before finishing.
|
||||
*
|
||||
* TimedCommand is used to execute a command for a given amount of time.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class TimedCommand : public Command {
|
||||
public:
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* A WaitCommand will wait for a certain amount of time before finishing. It is
|
||||
* useful if you want a CommandGroup to pause for a moment.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class WaitCommand : public TimedCommand {
|
||||
public:
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,18 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* This command will only finish if whatever CommandGroup it is in has no active
|
||||
* children. If it is not a part of a CommandGroup, then it will finish
|
||||
* immediately. If it is itself an active child, then the CommandGroup will
|
||||
* never end.
|
||||
*
|
||||
* This class is useful for the situation where you want to allow anything
|
||||
* running in parallel to finish, before continuing in the main CommandGroup
|
||||
* sequence.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*/
|
||||
class WaitForChildren : public Command {
|
||||
public:
|
||||
explicit WaitForChildren(units::second_t timeout);
|
||||
|
||||
@@ -12,16 +12,18 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* A WaitCommand will wait until a certain match time before finishing.
|
||||
*
|
||||
* This will wait until the game clock reaches some value, then continue to
|
||||
* the next command.
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @see CommandGroup
|
||||
*/
|
||||
class WaitUntilCommand : public Command {
|
||||
public:
|
||||
/**
|
||||
* A WaitCommand will wait until a certain match time before finishing.
|
||||
*
|
||||
* This will wait until the game clock reaches some value, then continue to
|
||||
* the next command.
|
||||
*
|
||||
* @see CommandGroup
|
||||
*/
|
||||
explicit WaitUntilCommand(units::second_t time);
|
||||
|
||||
WaitUntilCommand(std::string_view name, units::second_t time);
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace frc {
|
||||
* Wrapper so that PIDSource is implemented for AnalogAccelerometer for old
|
||||
* PIDController
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use frc2::PIDController class instead which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace frc {
|
||||
/**
|
||||
* Wrapper so that PIDSource is implemented for AnalogGyro for old PIDController
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use frc2::PIDController class instead which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace frc {
|
||||
* Wrapper so that PIDSource is implemented for AnalogInput for old
|
||||
* PIDController
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use frc2::PIDController class instead which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace frc {
|
||||
* Wrapper so that PIDSource is implemented for AnalogPotentiometer for old
|
||||
* PIDController
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use frc2::PIDController class instead which doesn't require this
|
||||
* wrapper.
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace frc {
|
||||
/**
|
||||
* Wrapper so that PIDSource is implemented for Encoder for old PIDController
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use frc2::PIDController class instead which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace frc {
|
||||
* Wrapper so that PIDOutput is implemented for MotorController for old
|
||||
* PIDController
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use frc2::PIDController class instead which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace frc {
|
||||
/**
|
||||
* Wrapper so that PIDSource is implemented for Ultrasonic for old PIDController
|
||||
*
|
||||
* This class is provided by the OldCommands VendorDep
|
||||
*
|
||||
* @deprecated Use frc2::PIDController class instead which doesn't require this
|
||||
* wrapper.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user