<reponame>DenfeldRobotics4009/2016_Dos_Point_Oh<filename>commands/manual/mecanum_drive_with_joystick.py
__author__ = 'nikolojedison'

from wpilib.command import Command

class MecanumDriveWithJoystick(Command):
    '''
        Have the robot drive mecanum style using the joystick until interrupted.
    '''

    def __init__(self, robot):
        super().__init__()

        self.robot = robot
        self.requires(self.robot.drivetrain)

    def execute(self):
        self.robot.drivetrain.driveJoystick(self.robot.oi.getStick())

    def isFinished(self):
        return False # Runs until interrupted

    def end(self):
        self.robot.drivetrain.driveManual(0,0,0)
        pass

    def interrupted(self):
        self.end()

__author__ = 'nikolojedison'

from wpilib.command import Command

class MecanumDriveWithJoystick(Command):
    '''
        Have the robot drive mecanum style using the joystick until interrupted.
    '''

    def __init__(self, robot):
        super().__init__()

        self.robot = robot
        self.requires(self.robot.drivetrain)

    def execute(self):
        self.robot.drivetrain.driveJoystick(self.robot.oi.getStick())

    def isFinished(self):
        return False # Runs until interrupted

    def end(self):
        self.robot.drivetrain.driveManual(0,0,0)
        pass

    def interrupted(self):
        self.end()
Have the robot drive mecanum style using the joystick until interrupted. # Runs until interrupted