Skip to content

Commit 39188ac

Browse files
committed
Update documentation
1 parent abf1fe2 commit 39188ac

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/DeferredCommand.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
import java.util.function.Supplier;
1212

1313
/**
14-
* Runs the given command when this command is initialized, and ends when it ends. Useful for
15-
* performing runtime tasks before creating a new command. If this command is interrupted, it will
16-
* cancel the command.
14+
* Runs the command returned by the supplier when this command is initialized, and ends when it
15+
* ends. Useful for performing runtime tasks before creating a new command. If this command is
16+
* interrupted, it will cancel the command.
17+
*
18+
* <p>Note that the supplier <i>must</i> create a new Command each call. For selecting one of a
19+
* preallocated set of commands, use {@link SelectCommand}.
1720
*
1821
* <p>This class is provided by the NewCommands VendorDep
1922
*/

wpilibNewCommands/src/main/native/include/frc2/command/DeferredCommand.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515

1616
namespace frc2 {
1717
/**
18-
* Runs the given command when this command is initialized, and ends when it
19-
* ends. Useful for performing runtime tasks before creating a new command. If
20-
* this command is interrupted, it will cancel the command.
18+
* Runs the command returned by the supplier when this command is initialized,
19+
* and ends when it ends. Useful for performing runtime tasks before creating a
20+
* new command. If this command is interrupted, it will cancel the command.
21+
*
22+
* Note that the supplier <i>must</i> create a new Command each call. For
23+
* selecting one of a preallocated set of commands, use SelectCommand.
2124
*
2225
* <p>This class is provided by the NewCommands VendorDep
2326
*/

0 commit comments

Comments
 (0)