mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[commands] Add a warning to schedule docs (NFC) (#7073)
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
This commit is contained in:
@@ -180,6 +180,9 @@ public final class CommandScheduler implements Sendable, AutoCloseable {
|
||||
* using those requirements have been scheduled as interruptible. If this is the case, they will
|
||||
* be interrupted and the command will be scheduled.
|
||||
*
|
||||
* <p>WARNING: using this function directly can often lead to unexpected behavior and should be
|
||||
* avoided. Instead Triggers should be used to schedule Commands.
|
||||
*
|
||||
* @param command the command to schedule. If null, no-op.
|
||||
*/
|
||||
private void schedule(Command command) {
|
||||
@@ -230,6 +233,9 @@ public final class CommandScheduler implements Sendable, AutoCloseable {
|
||||
/**
|
||||
* Schedules multiple commands for execution. Does nothing for commands already scheduled.
|
||||
*
|
||||
* <p>WARNING: using this function directly can often lead to unexpected behavior and should be
|
||||
* avoided. Instead Triggers should be used to schedule Commands.
|
||||
*
|
||||
* @param commands the commands to schedule. No-op on null.
|
||||
*/
|
||||
public void schedule(Command... commands) {
|
||||
|
||||
Reference in New Issue
Block a user