public Drivetrain() { frontLeft = new CANTalon(RobotMap.FRONT_LEFT_MOTOR); frontLeft.changeControlMode(CANTalon.TalonControlMode.Follower); frontLeft.enableControl(); rearLeft = new CANTalon(RobotMap.REAR_LEFT_MOTOR); rearLeft.enableControl(); frontRight = new CANTalon(RobotMap.FRONT_RIGHT_MOTOR); frontRight.changeControlMode(CANTalon.TalonControlMode.Follower); frontRight.enableControl(); rearRight = new CANTalon(RobotMap.REAR_RIGHT_MOTOR); rearRight.enableControl(); drive = new RobotDrive(rearLeft, rearRight); drive.setInvertedMotor(MotorType.kRearLeft, true); drive.setInvertedMotor(MotorType.kRearRight, true); }
/** Begin running the PIDController */ public synchronized void enable() { m_talon.ClearIaccum(); m_talon.enableControl(); if (m_debugging) SmartDashboard.putBoolean(m_name + " Enabled", true); }