mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +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:
@@ -88,6 +88,10 @@ class CommandScheduler final : public wpi::Sendable,
|
||||
* interruptible. If this is the case, they will be interrupted and the
|
||||
* command will be scheduled.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
void Schedule(const CommandPtr& command);
|
||||
@@ -112,6 +116,10 @@ class CommandScheduler final : public wpi::Sendable,
|
||||
*
|
||||
* The pointer must remain valid through the entire lifecycle of the command.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
void Schedule(Command* command);
|
||||
@@ -120,6 +128,10 @@ class CommandScheduler final : public wpi::Sendable,
|
||||
* Schedules multiple commands for execution. Does nothing for commands
|
||||
* already scheduled.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
void Schedule(std::span<Command* const> commands);
|
||||
@@ -128,6 +140,10 @@ class CommandScheduler final : public wpi::Sendable,
|
||||
* Schedules multiple commands for execution. Does nothing for commands
|
||||
* already scheduled.
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
void Schedule(std::initializer_list<Command*> commands);
|
||||
|
||||
Reference in New Issue
Block a user