// RobotBuilder Version: 2.0 
//
// 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.frc157.ProtoBot2017;

import org.usfirst.frc157.ProtoBot2017.AnalogSelectSwitch;

// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=IMPORTS
import com.ctre.CANTalon;

import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.RobotDrive;

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=IMPORTS
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 CANTalon driveFL_Motor;
    public static CANTalon driveFR_Motor;
    public static CANTalon driveRL_Motor;
    public static CANTalon driveRR_Motor;
    public static RobotDrive driveMechDrive;
    public static CANTalon gearMotorLeft;
    public static CANTalon gearMotorRight;
    public static CANTalon collectMotor;
    public static CANTalon helixMotorRight;
    public static CANTalon helixMotorLeft;
    public static CANTalon shootMotor;
    public static CANTalon climbMotor;
    public static Relay leftGateRelay;
    public static Relay rightGateRelay;
    public final static int OnboardModeSelectSwitchAnalogInID = 3;
    public static AnalogSelectSwitch modeSelect;
    

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

    public static void init() {
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS 
    	modeSelect = new AnalogSelectSwitch(0);   // Analog Port 0
    	
        driveFL_Motor = new CANTalon(5);          // CAN ID 5
        LiveWindow.addActuator("Drive", "FL_Motor", driveFL_Motor);
        
        driveFR_Motor = new CANTalon(4);          // CAN ID 4
        LiveWindow.addActuator("Drive", "FR_Motor", driveFR_Motor);
        
        driveRL_Motor = new CANTalon(7);          // CAN ID 7
        LiveWindow.addActuator("Drive", "RL_Motor", driveRL_Motor);
        
        driveRR_Motor = new CANTalon(6) ;         // CAN ID 6
        LiveWindow.addActuator("Drive", "RR_Motor", driveRR_Motor);
        
        driveMechDrive = new RobotDrive(driveFL_Motor, driveRL_Motor,
              driveFR_Motor, driveRR_Motor);
        
        driveMechDrive.setSafetyEnabled(true);
        driveMechDrive.setExpiration(0.5);
        driveMechDrive.setSensitivity(0.5);
        driveMechDrive.setMaxOutput(1.0);

        gearMotorRight = new CANTalon(14);             // CAN ID 14
        LiveWindow.addActuator("Gear", "gearMotor", gearMotorRight);
        
        gearMotorLeft = new CANTalon(12);            
        LiveWindow.addActuator("Gear", "gearMotor", gearMotorLeft);
        
        collectMotor = new CANTalon(13);          // CAN ID 13
        LiveWindow.addActuator("Collect", "collectMotor", collectMotor);
        
        helixMotorRight = new CANTalon(9);        // CAN ID 9
        helixMotorLeft = new CANTalon(8);         // CAN ID 8
        shootMotor = new CANTalon(11);            // CAN ID 11
        climbMotor = new CANTalon(10);            // CAN ID 10
        rightGateRelay = new Relay(0);            // Relay Port 0
        leftGateRelay = new Relay(1);             // Relay Port 1
        // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
    }
}
