Exemplo n.º 1
0
class Robot(wpilib.IterativeRobot):
    def robotInit(self):
        super().__init__()
        self.drive = Drive(self)
        self.oi = OI(self)

        self.DriveWithJoysticks = DriveWithJoysticks(self)

    def autonomousInit(self):
        pass

    def autonomousPeriodic(self):
        pass

    def disabledInit(self):
        self.DriveWithJoysticks.cancel()

    def disabledPeriodic(self):
        pass

    def teleopInit(self):
        self.DriveWithJoysticks.start()

    def teleopPeriodic(self):
        Scheduler.getInstance().run()

    def disabledInit(self):
        self.DriveWithJoysticks.cancel()
Exemplo n.º 2
0
    def robotInit(self):
        super().__init__()
        self.drive = Drive(self)
        self.oi = OI(self)

        self.DriveWithJoysticks = DriveWithJoysticks(self)