|
1 | | -from . import _init_impl |
| 1 | +from .button import Trigger |
| 2 | +from .command import Command, InterruptionBehavior |
2 | 3 |
|
3 | | -from .version import version as __version__ |
| 4 | +from . import cmd |
4 | 5 |
|
5 | | -# autogenerated by 'robotpy-build create-imports commands2 commands2._impl' |
6 | | -from ._impl import ( |
7 | | - Command, |
8 | | - CommandBase, |
9 | | - CommandGroupBase, |
10 | | - CommandScheduler, |
11 | | - ConditionalCommand, |
12 | | - FunctionalCommand, |
13 | | - InstantCommand, |
14 | | - MecanumControllerCommand, |
15 | | - NotifierCommand, |
16 | | - PIDCommand, |
17 | | - PIDSubsystem, |
18 | | - ParallelCommandGroup, |
19 | | - ParallelDeadlineGroup, |
20 | | - ParallelRaceGroup, |
21 | | - PerpetualCommand, |
22 | | - PrintCommand, |
23 | | - ProfiledPIDCommand, |
24 | | - ProfiledPIDSubsystem, |
25 | | - ProxyScheduleCommand, |
26 | | - RamseteCommand, |
27 | | - RepeatCommand, |
28 | | - RunCommand, |
29 | | - ScheduleCommand, |
30 | | - SelectCommand, |
31 | | - SequentialCommandGroup, |
32 | | - StartEndCommand, |
33 | | - Subsystem, |
34 | | - SubsystemBase, |
35 | | - Swerve2ControllerCommand, |
36 | | - Swerve3ControllerCommand, |
37 | | - Swerve4ControllerCommand, |
38 | | - Swerve6ControllerCommand, |
39 | | - TimedCommandRobot, |
40 | | - TrapezoidProfileCommand, |
41 | | - TrapezoidProfileCommandRadians, |
42 | | - TrapezoidProfileSubsystem, |
43 | | - TrapezoidProfileSubsystemRadians, |
44 | | - Trigger, |
45 | | - WaitCommand, |
46 | | - WaitUntilCommand, |
47 | | - # button, |
48 | | - # cmd, |
49 | | - requirementsDisjoint, |
50 | | -) |
| 6 | +# from .cmd import ( |
| 7 | +# deadline, |
| 8 | +# either, |
| 9 | +# none, |
| 10 | +# parallel, |
| 11 | +# print_, |
| 12 | +# race, |
| 13 | +# repeatingSequence, |
| 14 | +# run, |
| 15 | +# runEnd, |
| 16 | +# runOnce, |
| 17 | +# select, |
| 18 | +# sequence, |
| 19 | +# startEnd, |
| 20 | +# waitSeconds, |
| 21 | +# waitUntil, |
| 22 | +# ) |
| 23 | +from .commandgroup import CommandGroup, IllegalCommandUse |
| 24 | +from .commandscheduler import CommandScheduler |
| 25 | +from .conditionalcommand import ConditionalCommand |
| 26 | +from .functionalcommand import FunctionalCommand |
| 27 | +from .instantcommand import InstantCommand |
| 28 | +from .notifiercommand import NotifierCommand |
| 29 | +from .parallelcommandgroup import ParallelCommandGroup |
| 30 | +from .paralleldeadlinegroup import ParallelDeadlineGroup |
| 31 | +from .parallelracegroup import ParallelRaceGroup |
| 32 | +from .perpetualcommand import PerpetualCommand |
| 33 | +from .printcommand import PrintCommand |
| 34 | +from .proxycommand import ProxyCommand |
| 35 | +from .proxyschedulecommand import ProxyScheduleCommand |
| 36 | +from .repeatcommand import RepeatCommand |
| 37 | +from .runcommand import RunCommand |
| 38 | +from .schedulecommand import ScheduleCommand |
| 39 | +from .selectcommand import SelectCommand |
| 40 | +from .sequentialcommandgroup import SequentialCommandGroup |
| 41 | +from .startendcommand import StartEndCommand |
| 42 | +from .subsystem import Subsystem |
| 43 | +from .timedcommandrobot import TimedCommandRobot |
| 44 | +from .waitcommand import WaitCommand |
| 45 | +from .waituntilcommand import WaitUntilCommand |
| 46 | +from .wrappercommand import WrapperCommand |
51 | 47 |
|
52 | 48 | __all__ = [ |
| 49 | + "cmd", |
53 | 50 | "Command", |
54 | | - "CommandBase", |
55 | | - "CommandGroupBase", |
| 51 | + "CommandGroup", |
56 | 52 | "CommandScheduler", |
57 | 53 | "ConditionalCommand", |
58 | | - "SelectCommand", |
59 | 54 | "FunctionalCommand", |
| 55 | + "IllegalCommandUse", |
60 | 56 | "InstantCommand", |
61 | | - "MecanumControllerCommand", |
| 57 | + "InterruptionBehavior", |
62 | 58 | "NotifierCommand", |
63 | | - "PIDCommand", |
64 | | - "PIDSubsystem", |
65 | 59 | "ParallelCommandGroup", |
66 | 60 | "ParallelDeadlineGroup", |
67 | 61 | "ParallelRaceGroup", |
68 | 62 | "PerpetualCommand", |
69 | 63 | "PrintCommand", |
70 | | - "ProfiledPIDCommand", |
71 | | - "ProfiledPIDSubsystem", |
| 64 | + "ProxyCommand", |
72 | 65 | "ProxyScheduleCommand", |
73 | | - "RamseteCommand", |
74 | 66 | "RepeatCommand", |
75 | 67 | "RunCommand", |
76 | 68 | "ScheduleCommand", |
| 69 | + "SelectCommand", |
77 | 70 | "SequentialCommandGroup", |
78 | 71 | "StartEndCommand", |
79 | 72 | "Subsystem", |
80 | | - "SubsystemBase", |
81 | | - "Swerve2ControllerCommand", |
82 | | - "Swerve3ControllerCommand", |
83 | | - "Swerve4ControllerCommand", |
84 | | - "Swerve6ControllerCommand", |
85 | 73 | "TimedCommandRobot", |
86 | | - "TrapezoidProfileCommand", |
87 | | - "TrapezoidProfileCommandRadians", |
88 | | - "TrapezoidProfileSubsystem", |
89 | | - "TrapezoidProfileSubsystemRadians", |
90 | | - "Trigger", |
91 | 74 | "WaitCommand", |
92 | 75 | "WaitUntilCommand", |
93 | | - # "button", |
94 | | - # "cmd", |
95 | | - "requirementsDisjoint", |
| 76 | + "WrapperCommand", |
| 77 | + # "none", |
| 78 | + # "runOnce", |
| 79 | + # "run", |
| 80 | + # "startEnd", |
| 81 | + # "runEnd", |
| 82 | + # "print_", |
| 83 | + # "waitSeconds", |
| 84 | + # "waitUntil", |
| 85 | + # "either", |
| 86 | + # "select", |
| 87 | + # "sequence", |
| 88 | + # "repeatingSequence", |
| 89 | + # "parallel", |
| 90 | + # "race", |
| 91 | + # "deadline", |
| 92 | + "Trigger", # was here in 2023 |
96 | 93 | ] |
| 94 | + |
| 95 | + |
| 96 | +def __getattr__(attr): |
| 97 | + if attr == "SubsystemBase": |
| 98 | + import warnings |
| 99 | + |
| 100 | + warnings.warn("SubsystemBase is deprecated", DeprecationWarning, stacklevel=2) |
| 101 | + return Subsystem |
| 102 | + |
| 103 | + if attr == "CommandBase": |
| 104 | + import warnings |
| 105 | + |
| 106 | + warnings.warn("CommandBase is deprecated", DeprecationWarning, stacklevel=2) |
| 107 | + return Command |
| 108 | + |
| 109 | + raise AttributeError("module {!r} has no attribute " "{!r}".format(__name__, attr)) |
0 commit comments