Skip to content

Commands

Peter Briggs edited this page Jul 8, 2025 · 13 revisions

Command State Machine

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])
Loading

Command Groups

TODO

Clone this wiki locally