diff --git a/magicbot/magicrobot.py b/magicbot/magicrobot.py index 0d1feb6..6a91cd6 100644 --- a/magicbot/magicrobot.py +++ b/magicbot/magicrobot.py @@ -498,6 +498,11 @@ def _create_components(self): if hasattr(component, 'setup'): component.setup() + # Call setup functions for autonomous modes + for mode in self._automodes.modes.values(): + if hasattr(mode, 'setup'): + mode.setup() + def _create_component(self, name, ctyp): # Create instance, set it on self component = ctyp()