|
18 | 18 | from .parallelcommandgroup import ParallelCommandGroup |
19 | 19 | from .repeatcommand import RepeatCommand |
20 | 20 | from .proxycommand import ProxyCommand |
| 21 | + from .schedulecommand import ScheduleCommand |
21 | 22 | from .conditionalcommand import ConditionalCommand |
22 | 23 | from .wrappercommand import WrapperCommand |
23 | 24 |
|
@@ -384,21 +385,20 @@ def asProxy(self) -> ProxyCommand: |
384 | 385 |
|
385 | 386 | return ProxyCommand(self) |
386 | 387 |
|
387 | | - def fork(self, *commands: Command) -> ProxyCommand: |
| 388 | + def fork(self, *commands: Command) -> ScheduleCommand: |
388 | 389 | """ |
389 | 390 | Decorates this command to run "forked" by wrapping it in a ScheduleCommand. Use this for |
390 | 391 | "forking off" from command compositions when the user does not wish to extend the command's |
391 | 392 | requirements to the entire command composition. Note that if run from a composition, the |
392 | 393 | composition will not know about the status of the scheduled commands, and will treat this |
393 | | - command as finishing instantly. Commands can be added to this and will be scheduled in order |
394 | | - with this command scheduled first., see the `WPILib docs <https://docs.wpilib.org/en/stable/docs/software/commandbased/command-compositions.html#scheduling-other-commands>`_ for a full explanation. |
| 394 | + command as finishing instantly., see the `WPILib docs <https://docs.wpilib.org/en/stable/docs/software/commandbased/command-compositions.html#scheduling-other-commands>`_ for a full explanation. |
395 | 395 |
|
396 | 396 | :param other: other commands to schedule along with this one. This command is scheduled first. |
397 | 397 | :returns: the decorated command |
398 | 398 | """ |
399 | 399 | from .schedulecommand import ScheduleCommand |
400 | 400 |
|
401 | | - return ScheduleCommand(self, [self] + commands) |
| 401 | + return ScheduleCommand(self) |
402 | 402 |
|
403 | 403 | def unless(self, condition: Callable[[], bool]) -> ConditionalCommand: |
404 | 404 | """ |
|
0 commit comments