-
Notifications
You must be signed in to change notification settings - Fork 3
Commands
Peter Briggs edited this page Jul 8, 2025
·
13 revisions
When a command is kicked off (for example, by a controller button, or being run in a command group, etc.), the scheduler runs through the command's methods, using the following state machine:
flowchart TD
s([start])--> i["Run command.initialize()"]
i --> isfinished{"Check boolean command.isFinished()"}
isfinished -->|false| execute["Run command.execute()"]
execute --> isdying["Is another command needing to use a subsystem required by this command?"] -->|no| isfinished
isfinished --> |true| endNoInterrupt["Run command.end(isInterrupted=false)"]
isdying --> |yes 😢| endWithInterrupt["Run command.end(isInterrupted=true)"]
endNoInterrupt & endWithInterrupt --> done([Command done])
TODO