// RobotBuilder Version: 1.5
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.


package org.usfirst.frc692.RecycledRushDriveTrain;
    

import edu.wpi.first.wpilibj.CounterBase.EncodingType;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.Encoder;
import edu.wpi.first.wpilibj.Gyro;
import edu.wpi.first.wpilibj.PIDSource.PIDSourceParameter;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.TalonSRX;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;

/**
 * The RobotMap is a mapping from the ports sensors and actuators are wired into
 * to a variable name. This provides flexibility changing wiring, makes checking
 * the wiring easier and significantly reduces the number of magic numbers
 * floating around.
 */
public class RobotMap {
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
    public static SpeedController driveTrainleftFrontTalon0;
    public static SpeedController driveTrainleftBackTalon1;
    public static SpeedController driveTrainrightFrontTalon2;
    public static SpeedController driveTrainrightBackTalon3;
    public static RobotDrive driveTrainRobotDrive;
    public static Gyro driveTraingyro;
    public static Encoder driveTrainleftFrontEncoder;
    public static Encoder driveTrainleftBackEncoder;
    public static Encoder driveTrainrightFrontEncoder;
    public static Encoder driveTrainrightBackEncoder;

    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS

    public static void init() {
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
        driveTrainleftFrontTalon0 = new TalonSRX(0);
        LiveWindow.addActuator("DriveTrain", "leftFrontTalon0", (TalonSRX) driveTrainleftFrontTalon0);
        
        driveTrainleftBackTalon1 = new TalonSRX(1);
        LiveWindow.addActuator("DriveTrain", "leftBackTalon1", (TalonSRX) driveTrainleftBackTalon1);
        
        driveTrainrightFrontTalon2 = new TalonSRX(2);
        LiveWindow.addActuator("DriveTrain", "rightFrontTalon2", (TalonSRX) driveTrainrightFrontTalon2);
        
        driveTrainrightBackTalon3 = new TalonSRX(3);
        LiveWindow.addActuator("DriveTrain", "rightBackTalon3", (TalonSRX) driveTrainrightBackTalon3);
        
        driveTrainRobotDrive = new RobotDrive(driveTrainleftFrontTalon0, driveTrainleftBackTalon1,
              driveTrainrightFrontTalon2, driveTrainrightBackTalon3);
        
        driveTrainRobotDrive.setSafetyEnabled(true);
        driveTrainRobotDrive.setExpiration(0.1);
        driveTrainRobotDrive.setSensitivity(0.5);
        driveTrainRobotDrive.setMaxOutput(1.0);

        driveTraingyro = new Gyro(0);
        LiveWindow.addSensor("DriveTrain", "gyro", driveTraingyro);
        driveTraingyro.setSensitivity(0.007);
        driveTrainleftFrontEncoder = new Encoder(17, 18, false, EncodingType.k4X);
        LiveWindow.addSensor("DriveTrain", "leftFrontEncoder", driveTrainleftFrontEncoder);
        driveTrainleftFrontEncoder.setDistancePerPulse(1.0);
        driveTrainleftFrontEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);
        driveTrainleftBackEncoder = new Encoder(19, 20, false, EncodingType.k4X);
        LiveWindow.addSensor("DriveTrain", "leftBackEncoder", driveTrainleftBackEncoder);
        driveTrainleftBackEncoder.setDistancePerPulse(1.0);
        driveTrainleftBackEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);
        driveTrainrightFrontEncoder = new Encoder(21, 22, false, EncodingType.k4X);
        LiveWindow.addSensor("DriveTrain", "rightFrontEncoder", driveTrainrightFrontEncoder);
        driveTrainrightFrontEncoder.setDistancePerPulse(1.0);
        driveTrainrightFrontEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);
        driveTrainrightBackEncoder = new Encoder(23, 24, false, EncodingType.k4X);
        LiveWindow.addSensor("DriveTrain", "rightBackEncoder", driveTrainrightBackEncoder);
        driveTrainrightBackEncoder.setDistancePerPulse(1.0);
        driveTrainrightBackEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);

    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
    }
}
