Utility decorators

The deocrator module provides several decorators to make certain things easier or possible.

marsutils.decorator.with_ctrl_manager(klass)[source]

A decorator to be used with MagicRobot robot classes which automatically processes ControlInterface members

Any ControlInterface with a _DISPLAY_NAME variable defined will be added to a chooser on the dashboard and its associated methods will be automatically called

If the _CONTROL_CHOOSER_KEY class variable is set, that value will be provided to the ControlManager

marsutils.decorator.with_setup(klass)[source]

As the MagicRobot class uses the robotInit() method, this decorator provides MagicRobot classes with a setup() function that is called after the createObjects() function is called

For more information, see robotpy/robotpy-wpilib-utilities#21