mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Spelling and grammar cleanups (#4849)
This commit is contained in:
@@ -13,7 +13,7 @@ import java.util.function.BooleanSupplier;
|
||||
/**
|
||||
* A state machine representing a complete action to be performed by the robot. Commands are run by
|
||||
* the {@link CommandScheduler}, and can be composed into CommandGroups to allow users to build
|
||||
* complicated multi-step actions without the need to roll the state machine logic themselves.
|
||||
* complicated multistep actions without the need to roll the state machine logic themselves.
|
||||
*
|
||||
* <p>Commands are run synchronously from the main robot loop; no multithreading is used, unless
|
||||
* specified explicitly from the command implementation.
|
||||
@@ -299,7 +299,7 @@ public interface Command {
|
||||
/**
|
||||
* Decorates this command to only run if this condition is not met. If the command is already
|
||||
* running and the condition changes to true, the command will not stop running. The requirements
|
||||
* of this command will be kept for the new conditonal command.
|
||||
* of this command will be kept for the new conditional command.
|
||||
*
|
||||
* @param condition the condition that will prevent the command from running
|
||||
* @return the decorated command
|
||||
@@ -390,8 +390,8 @@ public interface Command {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the command is currently scheduled. Note that this does not detect whether the
|
||||
* command is in a composition, only whether it is directly being run by the scheduler.
|
||||
* Whether the command is currently scheduled. Note that this does not detect whether the command
|
||||
* is in a composition, only whether it is directly being run by the scheduler.
|
||||
*
|
||||
* @return Whether the command is scheduled.
|
||||
*/
|
||||
|
||||
@@ -218,7 +218,7 @@ public class MecanumControllerCommand extends CommandBase {
|
||||
* trajectory. The user should implement a velocity PID on the desired output wheel velocities.
|
||||
*
|
||||
* <p>Note: The controllers will *not* set the outputVolts to zero upon completion of the path -
|
||||
* this is left to the user, since it is not appropriate for paths with non-stationary end-states.
|
||||
* this is left to the user, since it is not appropriate for paths with nonstationary end-states.
|
||||
*
|
||||
* @param trajectory The trajectory to follow.
|
||||
* @param pose A function that supplies the robot pose - use one of the odometry classes to
|
||||
@@ -286,7 +286,7 @@ public class MecanumControllerCommand extends CommandBase {
|
||||
* trajectory. The user should implement a velocity PID on the desired output wheel velocities.
|
||||
*
|
||||
* <p>Note: The controllers will *not* set the outputVolts to zero upon completion of the path -
|
||||
* this is left to the user, since it is not appropriate for paths with non-stationary end-states.
|
||||
* this is left to the user, since it is not appropriate for paths with nonstationary end-states.
|
||||
*
|
||||
* <p>Note 2: The final rotation of the robot will be set to the rotation of the final pose in the
|
||||
* trajectory. The robot will not follow the rotations from the poses at each timestep. If
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Set;
|
||||
/**
|
||||
* Schedules the given commands when this command is initialized, and ends when all the commands are
|
||||
* no longer scheduled. Useful for forking off from CommandGroups. If this command is interrupted,
|
||||
* it will cancel all of the commands.
|
||||
* it will cancel all the commands.
|
||||
*
|
||||
* <p>This class is provided by the NewCommands VendorDep
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SelectCommand extends CommandBase {
|
||||
private InterruptionBehavior m_interruptBehavior = InterruptionBehavior.kCancelIncoming;
|
||||
|
||||
/**
|
||||
* Creates a new selectcommand.
|
||||
* Creates a new SelectCommand.
|
||||
*
|
||||
* @param commands the map of commands to choose from
|
||||
* @param selector the selector to determine which command to run
|
||||
@@ -53,7 +53,7 @@ public class SelectCommand extends CommandBase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new selectcommand.
|
||||
* Creates a new SelectCommand.
|
||||
*
|
||||
* @param toRun a supplier providing the command to run
|
||||
* @deprecated Replace with {@link ProxyCommand}
|
||||
|
||||
@@ -6,7 +6,7 @@ package edu.wpi.first.wpilibj2.command;
|
||||
|
||||
/**
|
||||
* A robot subsystem. Subsystems are the basic unit of robot organization in the Command-based
|
||||
* framework; they encapsulate low-level hardware objects (motor controllers, sensors, etc) and
|
||||
* framework; they encapsulate low-level hardware objects (motor controllers, sensors, etc.) and
|
||||
* provide methods through which they can be used by {@link Command}s. Subsystems are used by the
|
||||
* {@link CommandScheduler}'s resource management system to ensure multiple robot actions are not
|
||||
* "fighting" over the same hardware; Commands that use a subsystem should include that subsystem in
|
||||
|
||||
@@ -45,8 +45,9 @@ public class SwerveControllerCommand extends CommandBase {
|
||||
* trajectory. This command will not return output voltages but rather raw module states from the
|
||||
* position controllers which need to be put into a velocity PID.
|
||||
*
|
||||
* <p>Note: The controllers will *not* set the outputVolts to zero upon completion of the path-
|
||||
* this is left to the user, since it is not appropriate for paths with nonstationary endstates.
|
||||
* <p>Note: The controllers will *not* set the outputVolts to zero upon completion of the path.
|
||||
* This is left to the user to do since it is not appropriate for paths with nonstationary
|
||||
* endstates.
|
||||
*
|
||||
* @param trajectory The trajectory to follow.
|
||||
* @param pose A function that supplies the robot pose - use one of the odometry classes to
|
||||
@@ -88,8 +89,8 @@ public class SwerveControllerCommand extends CommandBase {
|
||||
* trajectory. This command will not return output voltages but rather raw module states from the
|
||||
* position controllers which need to be put into a velocity PID.
|
||||
*
|
||||
* <p>Note: The controllers will *not* set the outputVolts to zero upon completion of the path-
|
||||
* this is left to the user, since it is not appropriate for paths with nonstationary endstates.
|
||||
* <p>Note: The controllers will *not* set the outputVolts to zero upon completion of the path.
|
||||
* This is left to the user since it is not appropriate for paths with nonstationary endstates.
|
||||
*
|
||||
* <p>Note 2: The final rotation of the robot will be set to the rotation of the final pose in the
|
||||
* trajectory. The robot will not follow the rotations from the poses at each timestep. If
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Button extends Trigger {
|
||||
/**
|
||||
* Creates a new button with the given condition determining whether it is pressed.
|
||||
*
|
||||
* @param isPressed returns whether or not the trigger should be active
|
||||
* @param isPressed returns whether the trigger should be active
|
||||
* @deprecated Replace with Trigger.
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -141,8 +141,8 @@ public class Button extends Trigger {
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the command whenever the button is pressed (on then off then on). The command is set to
|
||||
* be interruptible.
|
||||
* Toggles the command whenever the button is pressed (on, then off, then on). The command is set
|
||||
* to be interruptible.
|
||||
*
|
||||
* @param command the command to start
|
||||
* @return this button, so calls can be chained
|
||||
|
||||
@@ -62,7 +62,7 @@ public class CommandGenericHID {
|
||||
* attached to {@link CommandScheduler#getDefaultButtonLoop() the default command scheduler button
|
||||
* loop}.
|
||||
*
|
||||
* <p>The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90,
|
||||
* <p>The POV angles start at 0 in the up direction, and increase clockwise (e.g. right is 90,
|
||||
* upper-left is 315).
|
||||
*
|
||||
* @param angle POV angle in degrees, or -1 for the center / not pressed.
|
||||
@@ -75,7 +75,7 @@ public class CommandGenericHID {
|
||||
/**
|
||||
* Constructs a Trigger instance based around this angle of a POV on the HID.
|
||||
*
|
||||
* <p>The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90,
|
||||
* <p>The POV angles start at 0 in the up direction, and increase clockwise (e.g. right is 90,
|
||||
* upper-left is 315).
|
||||
*
|
||||
* @param pov index of the POV to read (starting at 0). Defaults to 0.
|
||||
@@ -89,88 +89,88 @@ public class CommandGenericHID {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Trigger instance based around the 0-degree angle (up) of the default (index 0) POV
|
||||
* Constructs a Trigger instance based around the 0 degree angle (up) of the default (index 0) POV
|
||||
* on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default command
|
||||
* scheduler button loop}.
|
||||
*
|
||||
* @return a Trigger instance based around the 0-degree angle of a POV on the HID.
|
||||
* @return a Trigger instance based around the 0 degree angle of a POV on the HID.
|
||||
*/
|
||||
public Trigger povUp() {
|
||||
return pov(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Trigger instance based around the 45-degree angle (right up) of the default (index
|
||||
* Constructs a Trigger instance based around the 45 degree angle (right up) of the default (index
|
||||
* 0) POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default
|
||||
* command scheduler button loop}.
|
||||
*
|
||||
* @return a Trigger instance based around the 45-degree angle of a POV on the HID.
|
||||
* @return a Trigger instance based around the 45 degree angle of a POV on the HID.
|
||||
*/
|
||||
public Trigger povUpRight() {
|
||||
return pov(45);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Trigger instance based around the 90-degree angle (right) of the default (index 0)
|
||||
* Constructs a Trigger instance based around the 90 degree angle (right) of the default (index 0)
|
||||
* POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default command
|
||||
* scheduler button loop}.
|
||||
*
|
||||
* @return a Trigger instance based around the 90-degree angle of a POV on the HID.
|
||||
* @return a Trigger instance based around the 90 degree angle of a POV on the HID.
|
||||
*/
|
||||
public Trigger povRight() {
|
||||
return pov(90);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Trigger instance based around the 135-degree angle (right down) of the default
|
||||
* Constructs a Trigger instance based around the 135 degree angle (right down) of the default
|
||||
* (index 0) POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the
|
||||
* default command scheduler button loop}.
|
||||
*
|
||||
* @return a Trigger instance based around the 135-degree angle of a POV on the HID.
|
||||
* @return a Trigger instance based around the 135 degree angle of a POV on the HID.
|
||||
*/
|
||||
public Trigger povDownRight() {
|
||||
return pov(135);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Trigger instance based around the 180-degree angle (down) of the default (index 0)
|
||||
* Constructs a Trigger instance based around the 180 degree angle (down) of the default (index 0)
|
||||
* POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default command
|
||||
* scheduler button loop}.
|
||||
*
|
||||
* @return a Trigger instance based around the 180-degree angle of a POV on the HID.
|
||||
* @return a Trigger instance based around the 180 degree angle of a POV on the HID.
|
||||
*/
|
||||
public Trigger povDown() {
|
||||
return pov(180);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Trigger instance based around the 225-degree angle (down left) of the default
|
||||
* Constructs a Trigger instance based around the 225 degree angle (down left) of the default
|
||||
* (index 0) POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the
|
||||
* default command scheduler button loop}.
|
||||
*
|
||||
* @return a Trigger instance based around the 225-degree angle of a POV on the HID.
|
||||
* @return a Trigger instance based around the 225 degree angle of a POV on the HID.
|
||||
*/
|
||||
public Trigger povDownLeft() {
|
||||
return pov(225);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Trigger instance based around the 270-degree angle (left) of the default (index 0)
|
||||
* Constructs a Trigger instance based around the 270 degree angle (left) of the default (index 0)
|
||||
* POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default command
|
||||
* scheduler button loop}.
|
||||
*
|
||||
* @return a Trigger instance based around the 270-degree angle of a POV on the HID.
|
||||
* @return a Trigger instance based around the 270 degree angle of a POV on the HID.
|
||||
*/
|
||||
public Trigger povLeft() {
|
||||
return pov(270);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Trigger instance based around the 315-degree angle (left up) of the default (index
|
||||
* Constructs a Trigger instance based around the 315 degree angle (left up) of the default (index
|
||||
* 0) POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default
|
||||
* command scheduler button loop}.
|
||||
*
|
||||
* @return a Trigger instance based around the 315-degree angle of a POV on the HID.
|
||||
* @return a Trigger instance based around the 315 degree angle of a POV on the HID.
|
||||
*/
|
||||
public Trigger povUpLeft() {
|
||||
return pov(315);
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* Also includes a setting for whether it should invert its value.
|
||||
*
|
||||
* <p>This class is provided by the NewCommands VendorDep
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user