mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[commands] Add RepeatCommand (#4009)
Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
88222daa3d
commit
1b26e2d5da
@@ -29,6 +29,7 @@ class ParallelDeadlineGroup;
|
||||
class SequentialCommandGroup;
|
||||
class PerpetualCommand;
|
||||
class ProxyScheduleCommand;
|
||||
class RepeatCommand;
|
||||
|
||||
/**
|
||||
* A state machine representing a complete action to be performed by the robot.
|
||||
@@ -185,6 +186,14 @@ class Command {
|
||||
*/
|
||||
virtual PerpetualCommand Perpetually() &&;
|
||||
|
||||
/**
|
||||
* Decorates this command to run repeatedly, restarting it when it ends, until
|
||||
* this command is interrupted. The decorated command can still be canceled.
|
||||
*
|
||||
* @return the decorated command
|
||||
*/
|
||||
virtual RepeatCommand Repeat() &&;
|
||||
|
||||
/**
|
||||
* Decorates this command to run "by proxy" by wrapping it in a
|
||||
* ProxyScheduleCommand. This is useful for "forking off" from command groups
|
||||
|
||||
Reference in New Issue
Block a user