[commands] Improve documentation of addRequirements (NFC) (#5103)

This commit is contained in:
bovlb
2023-02-16 22:08:46 -08:00
committed by GitHub
parent 74dea9f05e
commit fd18577ba0
2 changed files with 33 additions and 1 deletions

View File

@@ -26,7 +26,11 @@ public abstract class CommandBase implements Sendable, Command {
}
/**
* Adds the specified requirements to the command.
* Adds the specified subsystems to the requirements of the command. The scheduler will prevent
* two commands that require the same subsystem from being scheduled simultaneously.
*
* <p>Note that the scheduler determines the requirements of a command when it is scheduled, so
* this method should normally be called from the command's constructor.
*
* @param requirements the requirements to add
*/