mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Improve command decorator names (#1945)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user