Skip to content

Robot Modes

joelg236 edited this page Jun 21, 2013 · 2 revisions

Writing Robot Modes

There are 6 options for robot modes.

The base interface of all other robot modes. You should use this interface if you will take advantage of every method inside of it. It contains Iterative style methods.

An exception-safe executor of robot modes. You can't extend this class, and it every mode is wrapped in it by default in GamePeriods. There isn't many cases where you would want to use this mode.

The base of an iterative-style robot. Contains init, periodic and end methods for every mode. The init method is called once before starting the mode, the periodic method is called in a periodic loop every 20ms during the mode and the end method is called once at the very end of the mode.

An adapter class that lets you choose which methods you need and implement them in your robot mode. If you are not using every method in IterativeRobot, you should be using this class.

The base of a simple-style robot. Contains one method per mode, and executes it once when the mode starts. Every method should loop until the mode is over, doing whatever is necessary in that mode.

An adapter class that lets you choose which methods you need and implement them in your robot mode. If you are not using every method in SimpleRobot, you should be using this class.

Clone this wiki locally