Beispiel #1
0
    def robotInit(self):
        """Initialise the robot."""

        #Initialise the subsystems and the button mapping:
        self.drivetrain = Drivetrain(self)
        self.ears = Ears(self)
        self.hat = Hat(self)
        self.tilt = Tilt(self)
        self.oi = OI(self)

        #Initialise the macro shenanigans (should probably clean this up once I get the dashboard sorted)
        self.macroTimeout = self.oi.smart_dashboard.getInt("Macro", 15)
        self.macroName = self.oi.smart_dashboard.getString("Macro Name", "macro.csv")
        Settings.str_macro_name = self.macroName
        Settings.num_macro_timeout = self.macroTimeout
        macro_string = str(Settings.num_macro_timeout)
        print("Robot initialized with a macro timeout of " + macro_string)
        self.simpleAutonCommand = PlayMacro(self, "macro.csv")
        self.shooterAutonCommand = PlayMacro(self, "macro_launch.csv")