Improve command decorator names (#1945)

This commit is contained in:
Oblarg
2019-10-19 11:13:33 -04:00
committed by Peter Johnson
parent a38f183a98
commit 53816155ba
18 changed files with 47 additions and 46 deletions

View File

@@ -122,7 +122,7 @@ class Command : public frc::ErrorBase {
* @param condition the interrupt condition
* @return the command with the interrupt condition added
*/
ParallelRaceGroup InterruptOn(std::function<bool()> condition) &&;
ParallelRaceGroup WithInterrupt(std::function<bool()> condition) &&;
/**
* Decorates this command with a runnable to run before this command starts.
@@ -138,7 +138,7 @@ class Command : public frc::ErrorBase {
* @param toRun the Runnable to run
* @return the decorated command
*/
SequentialCommandGroup WhenFinished(std::function<void()> toRun) &&;
SequentialCommandGroup AndThen(std::function<void()> toRun) &&;
/**
* Decorates this command to run perpetually, ignoring its ordinary end

View File

@@ -19,7 +19,7 @@ namespace frc2 {
* A command that starts a notifier to run the given runnable periodically in a
* separate thread. Has no end condition as-is; either subclass it or use {@link
* Command#withTimeout(double)} or
* {@link Command#interruptOn(BooleanSupplier)} to give it one.
* {@link Command#withInterrupt(BooleanSupplier)} to give it one.
*
* <p>WARNING: Do not use this class unless you are confident in your ability to
* make the executed code thread-safe. If you do not know what "thread-safe"

View File

@@ -14,7 +14,7 @@ namespace frc2 {
/**
* A command that runs a Runnable continuously. Has no end condition as-is;
* either subclass it or use Command.WithTimeout() or
* Command.InterruptOn() to give it one. If you only wish
* Command.WithInterrupt() to give it one. If you only wish
* to execute a Runnable once, use InstantCommand.
*/
class RunCommand : public CommandHelper<CommandBase, RunCommand> {

View File

@@ -15,8 +15,8 @@ namespace frc2 {
* A command that runs a given runnable when it is initalized, and another
* runnable when it ends. Useful for running and then stopping a motor, or
* extending and then retracting a solenoid. Has no end condition as-is; either
* subclass it or use Command.WithTimeout() or Command.InterruptOn() to give it
* one.
* subclass it or use Command.WithTimeout() or Command.WithInterrupt() to give
* it one.
*/
class StartEndCommand : public CommandHelper<CommandBase, StartEndCommand> {
public: