package org.usfirst.frc.team2339.Barracuda;

import edu.wpi.first.wpilibj.Joystick;

public class RobotMap {
	
	public static class Control {
		// Joystick for driving
		public static final Joystick DRIVE_STICK = new Joystick(0);
		// Joystick for lift control
		public static final Joystick OPERATOR_STICK = new Joystick(1);
	};
	
	public static class SwerveMap {
		public static class Constants {
			// These should be set to actual robot dimensions. 
			// I don't think the units matter but looks like the original is in inches
			public static final double WHEEL_BASE_LENGTH = 28;
			public static final double WHEEL_BASE_WIDTH = 38;
			// AndyMark Gearmotor am-2971. See http://www.andymark.com/product-p/am-2971.htm
			public static final double STEERING_ENC_PULSES_PER_REVOLUTION = 7;
			public static final double STEERING_PID_P = 0;
			public static final double STEERING_PID_I = 0;
			public static final double STEERING_PID_D = 0;
		};
		
		public static class Control {
			public static final Joystick DRIVE_STICK = RobotMap.Control.DRIVE_STICK;
			public static final int DRIVE_AXIS_FORWARD_BACK = 1;
			public static final int DRIVE_AXIS_SIDEWAYS = 2;
			public static final int DRIVE_AXIS_ROTATE = 3;
			public static final int DRIVE_CONTROLLER_SHIFT_LOW = 1;
			public static final int DRIVE_CONTROLLER_SHIFT_HIGH = 2;
		}

		public static class PWM {
			public static final int DRIVE_FRONT_LEFT = 0;
			public static final int DRIVE_FRONT_LEFT_STEERING = 1;
			public static final int DRIVE_FRONT_RIGHT = 2;
			public static final int DRIVE_FRONT_RIGHT_STEERING = 3;
			public static final int DRIVE_REAR_LEFT = 4;
			public static final int DRIVE_REAR_LEFT_STEERING = 5;
			public static final int DRIVE_REAR_RIGHT = 6;
			public static final int DRIVE_REAR_RIGHT_STEERING = 7;
		};
		
		public static class DIO {
			public static final int DRIVE_FRONT_LEFT_ENC_A = 0;
			public static final int DRIVE_FRONT_LEFT_ENC_B = 1;
			public static final int DRIVE_FRONT_RIGHT_ENC_A = 2;
			public static final int DRIVE_FRONT_RIGHT_ENC_B = 3;
			public static final int DRIVE_REAR_LEFT_ENC_A = 4;
			public static final int DRIVE_REAR_LEFT_ENC_B = 5;
			public static final int DRIVE_REAR_RIGHT_ENC_A = 6;
			public static final int DRIVE_REAR_RIGHT_ENC_B = 7;
		};

		public static class Solenoid {
			public static final int DRIVE_SHIFT_HIGH = 1;
			public static final int DRIVE_SHIFT_LOW = 2;
		}
	}
	
	public static class WinchMap {
		public static final Joystick WINCH_STICK = RobotMap.Control.OPERATOR_STICK;
		public static final int WINCH_CONTROLLER_UP = 1;
		public static final int WINCH_CONTROLLER_DOWN = 2;
		public static final int LIFT_WINCH = 8;
	}
}

@@ -716,16 +716,75 @@
 971.htm%0A
+%09%09%09// 497 = 7 pulse per motor revolution * 71 gear ratio. %0A
 %09%09%09publi
@@ -842,16 +842,18 @@
 UTION = 
+49
 7;%0A%09%09%09pu
@@ -1887,16 +1887,375 @@
 s DIO %7B%0A
+%09%09%09/*%0A%09%09%09 * Swapped values because of this note from AndyMark%0A%09%09%09 * Note: Because the encoder is connected to the back of the motor shaft, the rotation is %0A%09%09%09 * backwards from normal front mounted encoders so you will need compensate for this in software or %0A%09%09%09 * simply connect Ch. A output to your Ch. B input and Ch. B output to your Ch. A input.%0A%09%09%09 */%0A
 %09%09%09publi
@@ -2298,17 +2298,17 @@
 ENC_A = 
-0
+1
 ;%0A%09%09%09pub
@@ -2353,17 +2353,17 @@
 ENC_B = 
-1
+0
 ;%0A%09%09%09pub
@@ -2409,17 +2409,17 @@
 ENC_A = 
-2
+3
 ;%0A%09%09%09pub
@@ -2465,17 +2465,17 @@
 ENC_B = 
-3
+2
 ;%0A%09%09%09pub
@@ -2519,17 +2519,17 @@
 ENC_A = 
-4
+5
 ;%0A%09%09%09pub
@@ -2573,17 +2573,17 @@
 ENC_B = 
-5
+4
 ;%0A%09%09%09pub
@@ -2628,17 +2628,17 @@
 ENC_A = 
-6
+7
 ;%0A%09%09%09pub
@@ -2683,17 +2683,17 @@
 ENC_B = 
-7
+6
 ;%0A%09%09%7D;%0A%0A

Update encode information from AndyMark data.