Skip to content

Commit

Permalink
Fix docs, comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
rzblue committed Sep 15, 2023
1 parent 1df8964 commit 62d4918
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import java.util.function.Supplier;

/**
* Runs the command returned by the supplier when this command is initialized, and ends when it
* ends. Useful for performing runtime tasks before creating a new command. If this command is
* interrupted, it will cancel the command.
* Defers Command construction to runtime. Runs the command returned by the supplier when this
* command is initialized, and ends when it ends. Useful for performing runtime tasks before
* creating a new command. If this command is interrupted, it will cancel the command.
*
* <p>Note that the supplier <i>must</i> create a new Command each call. For selecting one of a
* preallocated set of commands, use {@link SelectCommand}.
Expand Down Expand Up @@ -72,6 +72,6 @@ public void end(boolean interrupted) {
public void initSendable(SendableBuilder builder) {
super.initSendable(builder);
builder.addStringProperty(
"deferred", () -> m_command.equals(m_nullCommand) ? "null" : m_command.getName(), null);
"deferred", () -> m_command == m_nullCommand ? "null" : m_command.getName(), null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@

namespace frc2 {
/**
* Runs the command returned by the supplier when this command is initialized,
* and ends when it ends. Useful for performing runtime tasks before creating a
* new command. If this command is interrupted, it will cancel the command.
* Defers Command construction to runtime. Runs the command returned by the
* supplier when this command is initialized, and ends when it ends. Useful for
* performing runtime tasks before creating a new command. If this command is
* interrupted, it will cancel the command.
*
* Note that the supplier <i>must</i> create a new Command each call. For
* selecting one of a preallocated set of commands, use SelectCommand.
Expand Down

0 comments on commit 62d4918

Please sign in to comment.