2.6 - Command Scheduler
Important
It’s generally inadvisable to mess with the scheduler yourself. Most of the features that you need are already implemented in a higher-level interface.
In Robot.java, the robotPeriodic() method is called every robot cycle.
This is where all commands are ran through the command scheduler.
A single call to run does the following things in order:
Subsystem
periodic()methods are called.Triggers are polled, and new commands are scheduled from them.Currently scheduled commands (not including the ones that were just scheduled from #2) are executed.
End conditions are checked on currently scheduled commands, and commands that ended have their
end()methods called.Any subsystem without requirements on them have their default commands started.