bdfa1ad03bda9eca2287533dfc64a757f9b19ee4
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / Constants.java
1 package org.usfirst.frc.team3501.robot;
2
3 import edu.wpi.first.wpilibj.DoubleSolenoid;
4 import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
5
6 /**
7 * The Constants stores constant values for all subsystems. This includes the
8 * port values for motors and sensors, as well as important operational
9 * constants for subsystems such as max and min values.
10 */
11
12 public class Constants {
13 public final static int PCM_MODULE_A = 9;
14 public final static int PCM_MODULE_B = 10;
15
16 public static class OI {
17 // Computer Ports
18 public final static int LEFT_STICK_PORT = 0;
19 public final static int RIGHT_STICK_PORT = 1;
20
21 public final static int LEFT_JOYSTICK_TRIGGER_PORT = 1;
22
23 public final static int RIGHT_JOYSTICK_TRIGGER_PORT = 1;
24 public final static int RIGHT_JOYSTICK_THUMB_PORT = 2;
25 public final static int RIGHT_JOYSTICK_SHOOT_PORT = 3;
26
27 }
28
29 public static class DriveTrain {
30 // Drivetrain Motor Related Ports
31 public static final int FRONT_LEFT = 1;
32 public static final int FRONT_RIGHT = 6;
33 public static final int REAR_LEFT = 2;
34 public static final int REAR_RIGHT = 5;
35
36 // Encoder related ports
37 public final static int ENCODER_LEFT_A = 0;
38 public final static int ENCODER_LEFT_B = 1;
39 public final static int ENCODER_RIGHT_A = 3;
40 public final static int ENCODER_RIGHT_B = 4;
41
42 public static final int LEFT_MODULE = PCM_MODULE_B;
43 public static final int LEFT_FORWARD = 6, LEFT_REVERSE = 5;
44 public static final int RIGHT_MODULE = PCM_MODULE_B;
45 public static final int RIGHT_FORWARD = 0, RIGHT_REVERSE = 1;
46
47 public static final double INCHES_PER_PULSE = ((3.66 / 5.14) * 6 * Math.PI) / 256;
48
49 public static double kp = 0.013, ki = 0.000015, kd = -0.002;
50 public static double encoderTolerance = 8.0;
51
52 // Gearing constants
53 public static final Value HIGH_GEAR = DoubleSolenoid.Value.kForward;
54 public static final Value LOW_GEAR = DoubleSolenoid.Value.kReverse;
55 }
56
57 public static class Shooter {
58 public static final int CATAPULT1_MODULE = PCM_MODULE_B;
59 public static final int CATAPULT1_FORWARD = 0;
60 public static final int CATAPULT1_REVERSE = 6;
61 public static final int CATAPULT2_MODULE = PCM_MODULE_B;
62 public static final int CATAPULT2_FORWARD = 1;
63 public static final int CATAPULT2_REVERSE = 7;// TODO Determine actual
64 // shooter ports
65
66 public static final Value shoot = Value.kForward;
67 public static final Value reset = Value.kReverse;
68 public static final double WAIT_TIME = 2.0; // In seconds
69 }
70
71 public static class IntakeArm {
72 public static final int ROLLER_PORT = 3;
73
74 // for pistons
75 public static final int LEFT_FORWARD = 0;
76 public static final int LEFT_REVERSE = 1;
77
78 public static final int RIGHT_FORWARD = 2;
79 public static final int RIGHT_REVERSE = 3;
80
81 public static final Value EXTEND = DoubleSolenoid.Value.kForward;
82 public static final Value RETRACT = DoubleSolenoid.Value.kReverse;
83
84 // for roller
85 public static final double INTAKE_SPEED = 0.5;
86 public static final double OUTPUT_SPEED = -0.5;
87 }
88 }